From: Peter Rabbitson Date: Thu, 12 Nov 2009 01:14:37 +0000 (+0000) Subject: Add mysql determine_driver test by Pedro Melo X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=10176e1f9feac3f33603fd385a301c9d94de59fc;p=dbsrgits%2FDBIx-Class-Historic.git Add mysql determine_driver test by Pedro Melo --- diff --git a/t/71mysql.t b/t/71mysql.t index 0c099f8..0d49a0e 100644 --- a/t/71mysql.t +++ b/t/71mysql.t @@ -227,4 +227,14 @@ NULLINSEARCH: { => '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")->find(4); +isa_ok($schema2->storage->sql_maker, 'DBIx::Class::SQLAHacks::MySQL'); + done_testing;