X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fsqlmaker%2Fmysql.t;h=0e2ad2961e43a687d0f2f0dc74a2d5a6f4633641;hb=c1f3f2e8a79c6a4081c9949fa30da09d18d64d3b;hp=6fb1526f8f5cc306f4dc0ea19a7bb465cafb9873;hpb=a5a7bb733a940db710b7408508374833683a2e79;p=dbsrgits%2FDBIx-Class.git diff --git a/t/sqlmaker/mysql.t b/t/sqlmaker/mysql.t index 6fb1526..0e2ad29 100644 --- a/t/sqlmaker/mysql.t +++ b/t/sqlmaker/mysql.t @@ -126,13 +126,18 @@ for ( ) { my ($ver, $join_op) = @$_; - no warnings 'redefine'; - local *DBIx::Class::Storage::DBI::mysql::_get_server_version = sub { $ver }; - # we do not care at this point if data is available, just do a reconnect cycle - # to clear all caches - $schema->storage->disconnect; - $schema->storage->ensure_connected; + # to clear the server version cache and then get a new maker + { + $schema->storage->disconnect; + $schema->storage->_sql_maker(undef); + + no warnings 'redefine'; + local *DBIx::Class::Storage::DBI::mysql::_get_server_version = sub { $ver }; + + $schema->storage->ensure_connected; + $schema->storage->sql_maker; + } is_same_sql_bind ( $schema->resultset('CD')->search ({}, { prefetch => 'artist' })->as_query,