// this can happen when the user varies and lacks permission on the $name database
if(isset($conn['disconnect (select failed)']))
++$conn['disconnect (select failed)'];
else
$conn['disconnect (select failed)']=1;
++$conn['disconnect (select failed)'];
$this->disconnect($dbhname);
break;
}
...
...
@@ -459,24 +445,17 @@ class hyperdb extends wpdb {
$this->last_connection=compact('dbhname','name');
if(!mysql_ping($this->dbhs[$dbhname])){
if(isset($conn['disconnect (ping failed)']))
++$conn['disconnect (ping failed)'];
else
$conn['disconnect (ping failed)']=1;
++$conn['disconnect (ping failed)'];
$this->disconnect($dbhname);
break;
}
if(isset($conn['queries']))
++$conn['queries'];
else
$conn['queries']=1;
++$conn['queries'];
return$this->dbhs[$dbhname];
}
if($use_master&&defined("MASTER_DB_DEAD")){
if($this->write&&defined("MASTER_DB_DEAD")){
return$this->bail("We're updating the database, please try back in 5 minutes. If you are posting to your blog please hit the refresh button on your browser in a few minutes to post the data again. It will be posted as soon as the database is back online again.");