From: Sam Reed Date: Thu, 6 Jan 2011 19:27:17 +0000 (+0000) Subject: Followup r79702, r66793, r66822 X-Git-Tag: 1.31.0-rc.0~32750 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=dcb603bc61ef8f61f35b93c136cebf15ea29c7c1;p=lhc%2Fweb%2Fwiklou.git Followup r79702, r66793, r66822 Add patch to kill bad original ar_page_revid index (did exist as 2 definitions under the same name). Add patch to add index ar_revid per FIXME, though, hopefully only a temporary index Updated tables.sql with new index --- diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index 12c14f6c08..cceef11410 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -171,6 +171,8 @@ class MysqlUpdater extends DatabaseUpdater { array( 'doCollationUpdate' ), array( 'addTable', 'msg_resource', 'patch-msg_resource.sql' ), array( 'addTable', 'module_deps', 'patch-module_deps.sql' ), + array( 'dropIndex', 'archive', 'ar_page_revid', 'patch-archive_kill_ar_page_revid.sql' ), + array( 'addIndex', 'archive', 'ar_revid', 'patch-archive_ar_revid.sql' ), ); } diff --git a/maintenance/archives/patch-archive_ar_revid.sql b/maintenance/archives/patch-archive_ar_revid.sql new file mode 100644 index 0000000000..67ee97b1be --- /dev/null +++ b/maintenance/archives/patch-archive_ar_revid.sql @@ -0,0 +1,4 @@ +-- Hopefully temporary index. +-- For https://bugzilla.wikimedia.org/show_bug.cgi?id=21279 +ALTER TABLE /*$wgDBprefix*/archive + ADD INDEX ar_revid ( ar_rev_id ); \ No newline at end of file diff --git a/maintenance/archives/patch-archive_kill_ar_page_revid.sql b/maintenance/archives/patch-archive_kill_ar_page_revid.sql new file mode 100644 index 0000000000..2e6fe45372 --- /dev/null +++ b/maintenance/archives/patch-archive_kill_ar_page_revid.sql @@ -0,0 +1,4 @@ +-- Used for killing the wrong index added during SVN for 1.17 +-- Won't affect most people, but it doesn't need to exist +ALTER TABLE /*$wgDBprefix*/archive + DROP INDEX ar_page_revid; \ No newline at end of file diff --git a/maintenance/tables.sql b/maintenance/tables.sql index 7a3f1eac6e..f9c5cd6e8f 100644 --- a/maintenance/tables.sql +++ b/maintenance/tables.sql @@ -419,7 +419,7 @@ CREATE TABLE /*_*/archive ( CREATE INDEX /*i*/name_title_timestamp ON /*_*/archive (ar_namespace,ar_title,ar_timestamp); CREATE INDEX /*i*/ar_usertext_timestamp ON /*_*/archive (ar_user_text,ar_timestamp); -CREATE INDEX /*i*/ar_page_revid ON /*_*/archive (ar_rev_id); +CREATE INDEX /*i*/ar_revid ON /*_*/archive (ar_rev_id); --