Reedy has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/53470


Change subject: Kill cl_timestamp and cl_collation indexes from categorylinks
......................................................................

Kill cl_timestamp and cl_collation indexes from categorylinks

WIP, only mysql done

Change-Id: I5f882ceea3da6ff1e3fbb461632705deafbd7765
---
M includes/installer/MysqlUpdater.php
M maintenance/archives/patch-categorylinks-better-collation.sql
A maintenance/archives/patch-categorylinks-killindexes.sql
M maintenance/archives/patch-categorylinks.sql
M maintenance/archives/patch-categorylinksindex.sql
M maintenance/tables.sql
6 files changed, 4 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/70/53470/1

diff --git a/includes/installer/MysqlUpdater.php 
b/includes/installer/MysqlUpdater.php
index 9978a92..b10d1df 100644
--- a/includes/installer/MysqlUpdater.php
+++ b/includes/installer/MysqlUpdater.php
@@ -229,6 +229,7 @@
                        array( 'modifyField', 'user_groups', 'ug_group', 
'patch-ug_group-length-increase-255.sql' ),
                        array( 'modifyField', 'user_former_groups', 
'ufg_group', 'patch-ufg_group-length-increase-255.sql' ),
                        array( 'addIndex', 'page_props', 'pp_propname_page',  
'patch-page_props-propname-page-index.sql' ),
+                       array( 'dropIndex', 'categorylinks',      
'cl_timestamp',       'patch-categorylinks-killindexes.sql' ),
                );
        }
 
diff --git a/maintenance/archives/patch-categorylinks-better-collation.sql 
b/maintenance/archives/patch-categorylinks-better-collation.sql
index c1499c1..012dd78 100644
--- a/maintenance/archives/patch-categorylinks-better-collation.sql
+++ b/maintenance/archives/patch-categorylinks-better-collation.sql
@@ -13,7 +13,6 @@
        ADD COLUMN cl_sortkey_prefix varchar(255) binary NOT NULL default '',
        ADD COLUMN cl_collation varbinary(32) NOT NULL default '',
        ADD COLUMN cl_type ENUM('page', 'subcat', 'file') NOT NULL default 
'page',
-       ADD INDEX (cl_collation),
        DROP INDEX cl_sortkey,
        ADD INDEX cl_sortkey (cl_to, cl_type, cl_sortkey, cl_from);
 INSERT IGNORE INTO /*$wgDBprefix*/updatelog (ul_key) VALUES 
('cl_fields_update');
diff --git a/maintenance/archives/patch-categorylinks-killindexes.sql 
b/maintenance/archives/patch-categorylinks-killindexes.sql
new file mode 100644
index 0000000..49f39b2
--- /dev/null
+++ b/maintenance/archives/patch-categorylinks-killindexes.sql
@@ -0,0 +1,2 @@
+DROP INDEX /*i*/cl_timestamp ON /*_*/categorylinks;
+DROP INDEX /*i*/cl_collation ON /*_*/categorylinks;
diff --git a/maintenance/archives/patch-categorylinks.sql 
b/maintenance/archives/patch-categorylinks.sql
index 0af0cf9..db69c67 100644
--- a/maintenance/archives/patch-categorylinks.sql
+++ b/maintenance/archives/patch-categorylinks.sql
@@ -31,7 +31,4 @@
   -- when collation is set to UTF-8. Bleeeacch!
   KEY cl_sortkey(cl_to,cl_sortkey),
 
-  -- Not really used?
-  KEY cl_timestamp(cl_to,cl_timestamp)
-
 ) /*$wgDBTableOptions*/;
diff --git a/maintenance/archives/patch-categorylinksindex.sql 
b/maintenance/archives/patch-categorylinksindex.sql
index 24ad84f..ed8d819 100644
--- a/maintenance/archives/patch-categorylinksindex.sql
+++ b/maintenance/archives/patch-categorylinksindex.sql
@@ -7,5 +7,5 @@
 --
 
 ALTER TABLE /*$wgDBprefix*/categorylinks
-   DROP INDEX cl_sortkey,
+   DROP INDEX IF EXISTS cl_sortkey,
    ADD INDEX cl_sortkey(cl_to, cl_sortkey, cl_from);
diff --git a/maintenance/tables.sql b/maintenance/tables.sql
index a917783..c7a5381 100644
--- a/maintenance/tables.sql
+++ b/maintenance/tables.sql
@@ -562,12 +562,6 @@
 -- callers won't be using an index: fix this?
 CREATE INDEX /*i*/cl_sortkey ON /*_*/categorylinks 
(cl_to,cl_type,cl_sortkey,cl_from);
 
--- Not really used?
-CREATE INDEX /*i*/cl_timestamp ON /*_*/categorylinks (cl_to,cl_timestamp);
-
--- For finding rows with outdated collation
-CREATE INDEX /*i*/cl_collation ON /*_*/categorylinks (cl_collation);
-
 --
 -- Track all existing categories.  Something is a category if 1) it has an en-
 -- try somewhere in categorylinks, or 2) it once did.  Categories might not

-- 
To view, visit https://gerrit.wikimedia.org/r/53470
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f882ceea3da6ff1e3fbb461632705deafbd7765
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to