Make sure mysql is fixed
[dbsrgits/DBIx-Class.git] / t / 71mysql.t
index c58c142..0c099f8 100644 (file)
@@ -45,6 +45,14 @@ $dbh->do("CREATE TABLE books (id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, so
 
 #'dbi:mysql:host=localhost;database=dbic_test', 'dbic_test', '');
 
+# make sure sqlt_type overrides work (::Storage::DBI::mysql does this) 
+{
+  my $schema = DBICTest::Schema->connect($dsn, $user, $pass);
+
+  ok (!$schema->storage->_dbh, 'definitely not connected');
+  is ($schema->storage->sqlt_type, 'MySQL', 'sqlt_type correct pre-connection');
+}
+
 # This is in Core now, but it's here just to test that it doesn't break
 $schema->class('Artist')->load_components('PK::Auto');
 
@@ -174,8 +182,7 @@ lives_ok { $cd->set_producers ([ $producer ]) } 'set_relationship doesnt die';
   }, 'join does not throw (mysql 3 test)';
 
   # induce a jointype override, make sure it works even if we don't have mysql3
-  no warnings qw/redefine/;
-  local *DBIx::Class::SQLAHacks::MySQL::_default_jointype = sub {'inner'};
+  local $schema->storage->sql_maker->{_default_jointype} = 'inner';
   is_same_sql_bind (
     $rs->as_query,
     '(