Index: core/kernel/db/db_connection.php =================================================================== --- core/kernel/db/db_connection.php +++ 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 . ']'; + } + + return call_user_func( + $this->errorHandler, + $this->errorCode, + $error_msg, + $sql + ); } /**