From: Tim Starling Date: Wed, 29 Feb 2012 22:30:23 +0000 (+0000) Subject: Fix comment from r54410, add rationale for using MySQL command line pipe X-Git-Tag: 1.31.0-rc.0~24454 X-Git-Url: http://git.cyclocoop.org/%24dirpuce/puce%24spip_lang_rtl.gif?a=commitdiff_plain;h=4055b64afad039066c6810e36c74955d4a85734f;p=lhc%2Fweb%2Fwiklou.git Fix comment from r54410, add rationale for using MySQL command line pipe --- diff --git a/maintenance/populateImageSha1.php b/maintenance/populateImageSha1.php index 4cd2747c2f..a009223412 100644 --- a/maintenance/populateImageSha1.php +++ b/maintenance/populateImageSha1.php @@ -74,7 +74,10 @@ class PopulateImageSha1 extends LoggedUpdateMaintenance { $imageTable = $dbw->tableName( 'image' ); if ( $method == 'pipe' ) { - // @todo FIXME: Kill this and replace with a second unbuffered DB connection. + // Opening a pipe allows the SHA-1 operation to be done in parallel + // with the database write operation, because the writes are queued + // in the pipe buffer. This can improve performance by up to a + // factor of 2. global $wgDBuser, $wgDBserver, $wgDBpassword, $wgDBname; $cmd = 'mysql -u' . wfEscapeShellArg( $wgDBuser ) . ' -h' . wfEscapeShellArg( $wgDBserver ) .