db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DDLUTILS-111) Handle Silent Column Specification Changes in the test cases
Date Thu, 08 Jun 2006 21:41:30 GMT
     [ http://issues.apache.org/jira/browse/DDLUTILS-111?page=all ]
     
Thomas Dudziak resolved DDLUTILS-111:
-------------------------------------

    Resolution: Fixed

I've simply changed the effected tests to use VARCHAR instead of CHAR (the type of that column
was not important anyway).
In general, I won't go to great length just to work around such deficiencies in a database.
Honestly, why on earth would I want the database to silently change the datatypes ? If a database
does that, it just seems like a stupid thing to do IMHO. If I specify VARCHAR(4) then I *want*
VARCHAR(4) and not CHAR(4), not to mention that even if I insert a single character now -
because the semantics are changed - I always get four characters back.
So in short, I won't add a lot of code just to work around such a defect in a database. Rather,
I change the tests as they are not intended to test the databases but rather DdlUtils' interaction
with them.

> Handle Silent Column Specification Changes in the test cases
> ------------------------------------------------------------
>
>          Key: DDLUTILS-111
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-111
>      Project: DdlUtils
>         Type: Bug

>   Components: Tests
>  Environment: trunk + mysql 4.1
>     Reporter: Vincent Siveton
>     Assignee: Thomas Dudziak
>  Attachments: DDLUTILS-111.diff
>
> In some cases, MySQL silently changes column specifications from those given in a CREATE
TABLE or ALTER TABLE statement [1]
> So TestAlteration.testAddColumns() failed with:
> junit.framework.ComparisonFailure: Type not the same for column avalue4. expected:<...>
but was:<VAR...>
> 	at junit.framework.Assert.assertEquals(Assert.java:81)
> 	at org.apache.ddlutils.io.RoundtripTestBase.assertEquals(RoundtripTestBase.java:441)
> 	at org.apache.ddlutils.io.RoundtripTestBase.assertEquals(RoundtripTestBase.java:369)
> 	at org.apache.ddlutils.io.RoundtripTestBase.assertEquals(RoundtripTestBase.java:315)
> 	at org.apache.ddlutils.io.TestAlteration.testAddColumns(TestAlteration.java:526)
> [1] http://dev.mysql.com/doc/refman/5.0/en/silent-column-changes.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message