[Dbix-class] [Fwd: returning incorrect results for select on mysql database]

Peter Rabbitson rabbit+dbic at rabbit.us
Thu Jun 17 10:38:47 GMT 2010


piotr pogorzelski wrote:
> hi,
> i've posted today attached mail to dbi-users list, but after
> some more inspection i think that maybe this list is more
> appropriate.
> 
> for query
> SELECT me.customer_id, me.company_id, me.person_id, me.customer_position,
> me.instance_id FROM customer me WHERE ( me.customer_id IS NULL )
> 
> ubuntu
>   DB<3> p $DBI::VERSION
> 1.609
>   DB<4> p $DBD::mysql::VERSION
> 4.012
>   DB<5> p $DBIx::Class::VERSION
> 0.08115
> 
> mysql Server version:		5.1.41-3ubuntu12.1-log (Ubuntu)
> This is perl, v5.10.1 (*) built for i486-linux-gnu-thread-multi
> 

Meet MySQL:
http://dev.mysql.com/doc/refman/4.1/en/server-system-variables.html#sysvar_sql_auto_is_null

Now meet a saner MySQL:
http://search.cpan.org/~frew/DBIx-Class-0.08123/lib/DBIx/Class/Storage/DBI/mysql.pm#set_strict_mode

Cheers



More information about the DBIx-Class mailing list