jenkins-bot has submitted this change and it was merged.

Change subject: Truncate super long SQL in DB error log lines (useful for blobs)
......................................................................


Truncate super long SQL in DB error log lines (useful for blobs)

Change-Id: Ibb9b9178de80e691406e5c1a7113f0511055d18d
---
M includes/db/Database.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Chad: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/db/Database.php b/includes/db/Database.php
index 9ba1851..f70934b 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -1105,7 +1105,7 @@
                        wfDebug( "SQL ERROR (ignored): $error\n" );
                        $this->ignoreErrors( $ignore );
                } else {
-                       $sql1line = str_replace( "\n", "\\n", $sql );
+                       $sql1line = mb_substr( str_replace( "\n", "\\n", $sql 
), 0, 5*1024 );
                        wfLogDBError( 
"$fname\t{$this->mServer}\t$errno\t$error\t$sql1line\n" );
                        wfDebug( "SQL ERROR: " . $error . "\n" );
                        throw new DBQueryError( $this, $error, $errno, $sql, 
$fname );

-- 
To view, visit https://gerrit.wikimedia.org/r/96906
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb9b9178de80e691406e5c1a7113f0511055d18d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to