Make Change Tags index name configurable with a new config variable $wgOldChangeTagsI...
authorAndrew Garrett <werdna@users.mediawiki.org>
Tue, 15 Sep 2009 10:28:01 +0000 (10:28 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Tue, 15 Sep 2009 10:28:01 +0000 (10:28 +0000)
includes/ChangeTags.php
includes/DefaultSettings.php

index ed7e29b..3b72bd1 100644 (file)
@@ -125,7 +125,9 @@ class ChangeTags {
                        // Add an INNER JOIN on change_tag
 
                        // FORCE INDEX -- change_tags will almost ALWAYS be the correct query plan.
-                       $options['USE INDEX'] = array( 'change_tag' => 'change_tag_tag_id' );
+                       global $wgOldChangeTagsIndex;
+                       $index = $wgOldChangeTagsIndex ? 'ct_tag' : 'change_tag_tag_id';
+                       $options['USE INDEX'] = array( 'change_tag' => $index );
                        unset( $options['FORCE INDEX'] );
                        $tables[] = 'change_tag';
                        $join_conds['change_tag'] = array( 'INNER JOIN', "ct_$join_cond=$join_cond" );
index 50417ff..bc4d85f 100644 (file)
@@ -4240,3 +4240,8 @@ $wgUseAJAXCategories = false;
  * To disable file delete/restore temporarily
  */
 $wgUploadMaintenance = false;
+
+/**
+ * Use old names for change_tags indices.
+ */
+$wgOldChangeTagsIndex = false;