On 28/06/06, Matt S Trout <[EMAIL PROTECTED]> wrote:
Carl Franks wrote:
> On 27/06/06, Matt S Trout <[EMAIL PROTECTED]> wrote:
>> Brandon Black wrote:
>>> On 6/27/06, Matt S Trout <[EMAIL PROTECTED]> wrote:
>>>> Carl Franks wrote:
>>>>> t\71mysql.......................NOK 5
>>>>> #   Failed test 'columns_info_for - column data types'
>>>>> #   in t\71mysql.t at line 71.
>>>>> #     Structures begin differing at:
>>>>> #          $got->{charfield}{data_type} = 'VARCHAR'
>>>>> #     $expected->{charfield}{data_type} = 'CHAR'
>>>>> # Looks like you failed 1 test of 5.
>>>> Argh. I'm sure we changed this because of test failures for somebody else. 
Can
>>>> anybody else with MySQL run this please and see if it's a uniform failure?
>>>>
>>> Its not.  I just tested the CPAN tarball of 0.06999_03 here and got
>>> success on 71mysql.t.  Relevant environmental details:
>> Right. Sod it. Test disabled until we figure out how to deal with this
>> properly. I'm not blocking a release because either mysql or its DB is 
retarded.
>
> woohoo! - "Silent Column Specification Changes" :)
> http://dev.mysql.com/doc/refman/5.0/en/silent-column-changes.html
>
> If any column in a table has a variable length, the entire row becomes
> variable-length as a result. Therefore, if a table contains any
> variable-length columns (VARCHAR, TEXT, or BLOB), all CHAR  columns
> longer than three characters are changed to VARCHAR columns.
>
> These occur prior to MySQL 5.0.3. As of 5.0.3, an error occurs if a
> column cannot be created using the specified data type.

Can you try fiddling the data types in that test so it remains sane after
mysql's been retarded at it? If we can get 4.x to not coerce, presumably 5.x
will pass the same tests again.

Change the create table SQL, so that _both_ cols are either VARCHAR _or_ CHAR.
And change both the data_type in $test_type_info

I've just tried both methods - (1) both CHAR - (2) both VARCHAR
Either way resulted in all tests passing.

I've attached a patch.

Carl

Attachment: 71mysql.t.diff
Description: Binary data

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to