From: Aaron Schulz Date: Tue, 22 Apr 2014 05:58:36 +0000 (-0700) Subject: Fixed slow query in LocalFileDeleteBatch::getHashes() X-Git-Tag: 1.31.0-rc.0~16113 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=2354da05389233189e85580f1312d40b22baaa76;p=lhc%2Fweb%2Fwiklou.git Fixed slow query in LocalFileDeleteBatch::getHashes() * All the old files will have the oi_name of the $file bug: 62360 Change-Id: Ie3aeee44a7ec1ef4cad0c0fcde9b7d0dba003da2 --- diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 1832f21edf..dbf6918c0c 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -2002,7 +2002,8 @@ class LocalFileDeleteBatch { $res = $dbw->select( 'oldimage', array( 'oi_archive_name', 'oi_sha1' ), - array( 'oi_archive_name' => array_keys( $oldRels ) ), + array( 'oi_archive_name' => array_keys( $oldRels ), + 'oi_name' => $this->file->getName() ), // performance __METHOD__ );