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 + ); } /**