From: Andrew Garrett Date: Tue, 15 Sep 2009 10:28:01 +0000 (+0000) Subject: Make Change Tags index name configurable with a new config variable $wgOldChangeTagsI... X-Git-Tag: 1.31.0-rc.0~39723 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=5cf5ed4994c6983ec903e6f72a1e5035b830f829;p=lhc%2Fweb%2Fwiklou.git Make Change Tags index name configurable with a new config variable $wgOldChangeTagsIndex, replacement for live hack at svn.wikimedia.org/viewvc/mediawiki/branches/wmf-deployment/includes/ChangeTags.php?&pathrev=53208&r1=53207&r2=53208 --- diff --git a/includes/ChangeTags.php b/includes/ChangeTags.php index ed7e29b32b..3b72bd1899 100644 --- a/includes/ChangeTags.php +++ b/includes/ChangeTags.php @@ -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" ); diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 50417ffa45..bc4d85f1c2 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -4240,3 +4240,8 @@ $wgUseAJAXCategories = false; * To disable file delete/restore temporarily */ $wgUploadMaintenance = false; + +/** + * Use old names for change_tags indices. + */ +$wgOldChangeTagsIndex = false;