My log says no: DBD::mysql::st execute failed: MySQL server has gone away [for Statement "SELECT `me`.`variable`, `me`.`value`, `me`.`options`, `me`.`explanation`, `me`.`type` FROM `systempreferences` `me` WHERE ( `me`.`variable` = ? )" with ParamValues: 0='opacgroupresults'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832. I see them quite often, always for preferences. Note that we do not test the cached $database->{schema} in sub schema. If we do, we will however add some time. ( 0.0043 instead of 0.0003 ) What do you think?
For the record: - return $database->{schema} if defined $database->{schema}; + my $schema = $database->{schema}; + if( $schema && $schema->storage->connected ) { + return $schema;