sub _populate_dbh {
$_[0]->_dbh(undef); # in case ->connected failed we might get sent here
+
$_[0]->_dbh_details({}); # reset everything we know
- $_[0]->_sql_maker(undef); # this may also end up being different
+
+ # FIXME - this needs reenabling with the proper "no reset on same DSN" check
+ #$_[0]->_sql_maker(undef); # this may also end up being different
$_[0]->_dbh($_[0]->_connect);
) {
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,