Page MenuHomeIn-Portal Phabricator

D437.id1168.diff
No OneTemporary

File Metadata

Created
Wed, Feb 26, 9:01 AM

D437.id1168.diff

Index: branches/5.2.x/core/kernel/db/db_connection.php
===================================================================
--- branches/5.2.x/core/kernel/db/db_connection.php
+++ branches/5.2.x/core/kernel/db/db_connection.php
@@ -393,7 +393,19 @@
*/
protected function callErrorHandler($sql)
{
- return call_user_func($this->errorHandler, $this->errorCode, $this->errorMessage, $sql);
+ $error_msg = $this->errorMessage;
+
+ // Specify slave servers or nothing for master/single database setups.
+ if ( $this->serverIndex ) {
+ $error_msg = '[Server #' . $this->serverIndex . '] ' . $error_msg;
+ }
+
+ return call_user_func(
+ $this->errorHandler,
+ $this->errorCode,
+ $error_msg,
+ $sql
+ );
}
/**

Event Timeline