Index: branches/wmf-deployment-work/includes/ChangeTags.php |
— | — | @@ -125,7 +125,9 @@ |
126 | 126 | // Add an INNER JOIN on change_tag |
127 | 127 | |
128 | 128 | // FORCE INDEX -- change_tags will almost ALWAYS be the correct query plan. |
129 | | - $options['USE INDEX'] = array( 'change_tag' => 'change_tag_tag_id' ); |
| 129 | + global $wgOldChangeTagsIndex; |
| 130 | + $index = $wgOldChangeTagsIndex ? 'ct_tag' : 'change_tag_tag_id'; |
| 131 | + $options['USE INDEX'] = array( 'change_tag' => $index ); |
130 | 132 | unset( $options['FORCE INDEX'] ); |
131 | 133 | $tables[] = 'change_tag'; |
132 | 134 | $join_conds['change_tag'] = array( 'INNER JOIN', "ct_$join_cond=$join_cond" ); |
Index: branches/wmf-deployment-work/includes/DefaultSettings.php |
— | — | @@ -4235,3 +4235,8 @@ |
4236 | 4236 | |
4237 | 4237 | // to disable image delete/restore temporarily |
4238 | 4238 | $wgUploadMaintenance = false; |
| 4239 | + |
| 4240 | +/** |
| 4241 | + * Use old names for change_tags indices. |
| 4242 | + */ |
| 4243 | +$wgOldChangeTagsIndex = false; |