Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F803911
D437.id1168.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Feb 26, 9:01 AM
Size
749 B
Mime Type
text/x-diff
Expires
Thu, Feb 27, 9:01 AM (7 h, 40 m)
Engine
blob
Format
Raw Data
Handle
576633
Attached To
D437: INP-1833 - Add database server index to the error messages
D437.id1168.diff
View Options
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
Log In to Comment