On 1/4/06, Martin van den Bemt <[EMAIL PROTECTED]> wrote: > 4.1.13 on windows 2000. Default install. After I hit the problem I tried > fiddling with the > lower_case_table_names setting and 2 gave some reasonable results, but if you > do a rerun of the > tests a couple of times, it is not that predictable anymore...
MySql is a stupid database in any case. But anyway... I think we can safely change the tests to use lowercase table and column names anyways. It won't matter semantically for the other databases: in delimited mode they are supposed to use the name as-is, and in undelimited mode they have to convert them to uppercase anyway. So in both cases we should not run into any problems. And after all its not about testing the databases but rather testing DdlUtils handling. E.g. I changed the datatypes tests to not hit any boundaries in PostgreSql which are somewhat different from the Java type ones. > The tests are with delimited table names. Maybe just changing that could do > the trick, but we also > want something working with delimeters I guess :) > Maybe you missed this link about the case sensitivity : > http://dev.mysql.com/doc/refman/4.1/en/name-case-sensitivity.html (added that > in MysqlModelReader). > But I guess we will end up trying to work around these problems, since mysql > is used pretty much, or > maybe we should state on the website to use lowercase tablenames to be on the > safe site or even > maybe add a setting to not quote any tablenames. > Btw if I create a table in mysql administrator in capitals (on anaother mysql > instance, on windows > XP, default install), it will create the table with lowercase names. The problem is the stupid mapping to filenames that MySql does for table names. Shouldn't be too hard for them to add a map table name -> filename, shouldn't it ? But I digress ... > > I can have a quick look at it tomorrow or in the next like 20 minutes > > if you want ? > > A sanity check would be nice.. I'll focus on the Datatypes and a double > roundtrip, since > roundtripping doesn't cover everything (eg the stuff that I wrote on the wiki > about automatic > conversion of VARCHAR 1024 to TEXT, which when reading back from mysql > returns a LONGVARCHAR type, > which ends up in mysql again as MEDIUMTEXT, you get the drift). That's what the third argument in the addNativeTypeMapping is for. E.g. for PostgreSql: info.addNativeTypeMapping(Types.ARRAY, "BYTEA", Types.BINARY); means that Types.ARRAY will be mapped to PostgreSql's type BYTEA which when read back via the JdbcModelReader, will result in a Types.BINARY column. This is for the ALTER TABLE stuff which otherwise would always try to change the column type. Tom
