Return-Path: Delivered-To: apmail-db-ddlutils-dev-archive@www.apache.org Received: (qmail 85002 invoked from network); 4 Jan 2006 18:15:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Jan 2006 18:15:45 -0000 Received: (qmail 39149 invoked by uid 500); 4 Jan 2006 18:15:45 -0000 Delivered-To: apmail-db-ddlutils-dev-archive@db.apache.org Received: (qmail 39120 invoked by uid 500); 4 Jan 2006 18:15:44 -0000 Mailing-List: contact ddlutils-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ddlutils-dev@db.apache.org Delivered-To: mailing list ddlutils-dev@db.apache.org Received: (qmail 39109 invoked by uid 99); 4 Jan 2006 18:15:44 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jan 2006 10:15:44 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [69.55.235.171] (HELO mvdb.net) (69.55.235.171) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 04 Jan 2006 10:15:43 -0800 Received: (qmail 2648 invoked from network); 4 Jan 2006 18:15:29 -0000 Received: from unknown (HELO [10.21.21.40]) (80.126.215.98) by 69.55.235.171 with SMTP; Wed, 04 Jan 2006 18:15:29 +0000 Message-ID: <43BC104E.7090109@mvdb.net> Date: Wed, 04 Jan 2006 19:13:34 +0100 From: Martin van den Bemt User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: ddlutils-dev@db.apache.org Subject: Re: svn commit: r365722 - /db/ddlutils/trunk/src/test/org/apache/ddlutils/io/ConstraintsTestBase.java References: <20060103195302.45696.qmail@minotaur.apache.org> <224f32340601031203g29baf52egcd8dfa5539c96117@mail.gmail.com> <43BAE7CE.9060806@mvdb.net> <224f32340601031449n7f8ba2b6o312b2b790909fe93@mail.gmail.com> <43BB0FDE.4060609@mvdb.net> <224f32340601031605w194eb352w88a23e5f6d21b69f@mail.gmail.com> <43BC06EF.3020102@mvdb.net> <224f32340601040949x6298fecdjad2019bcdb65d3e1@mail.gmail.com> In-Reply-To: <224f32340601040949x6298fecdjad2019bcdb65d3e1@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thomas Dudziak wrote: > On 1/4/06, Martin van den Bemt 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 Column names in delimited mode works correctly in mysql. I think axion had the same kind of semantics with a difference in behaviour in delimiting tables and column names (although I am not sure anymore these days :) > 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. Hitting boundaries is pretty simple indeed and testing the database a bit is quite inevitable (hope that is english:) if you consider some user scenario's. (eg difference in behaviour of MyISAM and innoDB). > > >>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 ... It worked a lot better in 3.x, see complaints in comment of the link I send :) Hope 5 does a better job, but I will test on that first with the new base tests you created last night. > > >>>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. Sweet.. I'll have a look at that and see if it solves (part) of the problem.. In any case roundtripping a VARCHAR of 1024 is going to be tedious, since I have no way of knowing what the original definition was. The only thing I know from eg MEDIUMTEXT resulting from the VARCHAR 1024 is that the size specified in the VARCHAR is at least xxxx (couldn't find a reference yet..). Afaik Oracle just accepts a VARCHAR of 1024 without messing with your type. Enough complaining :) Mvgr, Martin > > Tom > >