dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8aaf446
)
Avoid stupid mariadb filesort in findMissingFiles.php
author
Aaron Schulz
<aschulz@wikimedia.org>
Wed, 1 Oct 2014 21:21:26 +0000
(14:21 -0700)
committer
Aaron Schulz
<aschulz@wikimedia.org>
Wed, 1 Oct 2014 21:21:26 +0000
(14:21 -0700)
Change-Id: I6267cfaf375fcc0eea8291fd7a2a0f7daa05a941
maintenance/findMissingFiles.php
patch
|
blob
|
history
diff --git
a/maintenance/findMissingFiles.php
b/maintenance/findMissingFiles.php
index
67864c5
..
add7108
100644
(file)
--- a/
maintenance/findMissingFiles.php
+++ b/
maintenance/findMissingFiles.php
@@
-59,11
+59,13
@@
class FindMissingFiles extends Maintenance {
do {
$res = $dbr->select(
array_merge( array( 'page' ), $joinTables ),
- array( 'name' => '
DISTINCT(page_title)
' ),
+ array( 'name' => '
img_name
' ),
array( 'page_namespace' => NS_FILE,
"page_title >= " . $dbr->addQuotes( $lastName ) ),
__METHOD__,
- array( 'ORDER BY' => 'page_title', 'LIMIT' => $this->mBatchSize ),
+ // DISTINCT causes a pointless filesort
+ array( 'ORDER BY' => 'name', 'GROUP BY' => 'name',
+ 'LIMIT' => $this->mBatchSize ),
$joinConds
);