Index: t/71mysql.t =================================================================== --- t/71mysql.t (revision 7824) +++ t/71mysql.t (working copy) @@ -227,4 +227,15 @@ => 'Nothing Found!'; } + +## If find() is the first query after connect() +## DBI::Storage::sql_maker() will be called before +## _determine_driver() and so the ::SQLHacks class for MySQL +## will not be used + +my $schema2 = DBICTest::Schema->connect($dsn, $user, $pass); +# $schema2->resultset("Artist")->search({ artistid => 4 })->first; # good +$schema2->resultset("Artist")->find(4); # bad +isa_ok($schema2->storage->sql_maker, 'DBIx::Class::SQLAHacks::MySQL'); + done_testing;