r56356 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56355‎ | r56356 | r56357 >
Date:10:28, 15 September 2009
Author:werdna
Status:ok
Tags:
Comment:
Make Change Tags index name configurable with a new config variable $wgOldChangeTagsIndex, replacement for live hack at r1=53207&r2=53208">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 (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
@@ -4240,3 +4240,8 @@
42414241 * To disable file delete/restore temporarily
42424242 */
42434243 $wgUploadMaintenance = false;
 4244+
 4245+/**
 4246+ * Use old names for change_tags indices.
 4247+ */
 4248+$wgOldChangeTagsIndex = false;
Index: trunk/phase3/includes/ChangeTags.php
@@ -125,7 +125,9 @@
126126 // Add an INNER JOIN on change_tag
127127
128128 // 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 );
130132 unset( $options['FORCE INDEX'] );
131133 $tables[] = 'change_tag';
132134 $join_conds['change_tag'] = array( 'INNER JOIN', "ct_$join_cond=$join_cond" );

Follow-up revisions

RevisionCommit summaryAuthorDate
r56419Merge r56356 from trunk -- workaround to let us deal with the index setup fun...brion17:06, 16 September 2009

Status & tagging log