http://www.mediawiki.org/wiki/Special:Code/MediaWiki/56356
Revision: 56356 Author: werdna Date: 2009-09-15 10:28:01 +0000 (Tue, 15 Sep 2009) Log Message: ----------- Make Change Tags index name configurable with a new config variable $wgOldChangeTagsIndex, replacement for live hack at http://svn.wikimedia.org/viewvc/mediawiki/branches/wmf-deployment/includes/ChangeTags.php?&pathrev=53208&r1=53207&r2=53208 Modified Paths: -------------- trunk/phase3/includes/ChangeTags.php trunk/phase3/includes/DefaultSettings.php Modified: trunk/phase3/includes/ChangeTags.php =================================================================== --- trunk/phase3/includes/ChangeTags.php 2009-09-15 10:25:15 UTC (rev 56355) +++ trunk/phase3/includes/ChangeTags.php 2009-09-15 10:28:01 UTC (rev 56356) @@ -125,7 +125,9 @@ // 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" ); Modified: trunk/phase3/includes/DefaultSettings.php =================================================================== --- trunk/phase3/includes/DefaultSettings.php 2009-09-15 10:25:15 UTC (rev 56355) +++ trunk/phase3/includes/DefaultSettings.php 2009-09-15 10:28:01 UTC (rev 56356) @@ -4240,3 +4240,8 @@ * To disable file delete/restore temporarily */ $wgUploadMaintenance = false; + +/** + * Use old names for change_tags indices. + */ +$wgOldChangeTagsIndex = false; _______________________________________________ MediaWiki-CVS mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
