On 3/15/06, Yauheni Prykhodzka <[EMAIL PROTECTED]> wrote: > i'm developing now a small tool that should compare > databases (of the same type). I need to get native > types possibly without any modifications. For example > the base implementation of DdlUtils returns SMALLINT > instead of TYNIINT for MySql. Probably i can get > SMALLINT both for TYNIINT and for some other native > type if i'll use the current implementation of > DdlUtils. So the result of the compare can be wrong in > this case!
The problem is that MySql's TINYINT is not a valid JDBC TINYINT according to the JDBC spec. Hence, DdlUtils maps it to MySql's SMALLINT instead. > I agree with you that isn't a common case. But you > need to know the native type sometimes. You might be better off using the JDBC metadata directly which gives you access to more info that might be of use to you. See the DumpMetadataTask for reference. Tom