summaryrefslogtreecommitdiff
path: root/www/wiki/maintenance/archives/patch-pl-tl-il-nonunique.sql
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/maintenance/archives/patch-pl-tl-il-nonunique.sql')
-rw-r--r--www/wiki/maintenance/archives/patch-pl-tl-il-nonunique.sql11
1 files changed, 11 insertions, 0 deletions
diff --git a/www/wiki/maintenance/archives/patch-pl-tl-il-nonunique.sql b/www/wiki/maintenance/archives/patch-pl-tl-il-nonunique.sql
new file mode 100644
index 00000000..8e1715b3
--- /dev/null
+++ b/www/wiki/maintenance/archives/patch-pl-tl-il-nonunique.sql
@@ -0,0 +1,11 @@
+-- Make reorderings of UNIQUE indices non-UNIQUE
+-- Since 1.24, these indices have been non-UNIQUE in tables.sql.
+-- However, an earlier update from 1.15 that made the indices
+-- UNIQUE was not removed until 1.28 (T78513).
+
+DROP INDEX /*i*/pl_namespace ON /*_*/pagelinks;
+CREATE INDEX /*i*/pl_namespace ON /*_*/pagelinks (pl_namespace, pl_title, pl_from);
+DROP INDEX /*i*/tl_namespace ON /*_*/templatelinks;
+CREATE INDEX /*i*/tl_namespace ON /*_*/templatelinks (tl_namespace, tl_title, tl_from);
+DROP INDEX /*i*/il_to ON /*_*/imagelinks;
+CREATE INDEX /*i*/il_to ON /*_*/imagelinks (il_to, il_from);