r76150 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76149‎ | r76150 | r76151 >
Date:22:15, 5 November 2010
Author:catrope
Status:ok
Tags:
Comment:
Per bug 25503 comment #11, use varbinary instead of varchar for ResourceLoader-related tables to avoid errors about indexes being too long. Only really needed for msg_resource_links, changed the rest for consistency. No updater needed: anyone who's already gotten this set up without these errors doesn't need this change.
Modified paths:
  • /trunk/phase3/maintenance/archives/patch-module_deps.sql (modified) (history)
  • /trunk/phase3/maintenance/archives/patch-msg_resource.sql (modified) (history)
  • /trunk/phase3/maintenance/tables.sql (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/archives/patch-msg_resource.sql
@@ -1,7 +1,7 @@
22 -- Table for storing JSON message blobs for the resource loader
33 CREATE TABLE /*_*/msg_resource (
44 -- Resource name
5 - mr_resource varchar(255) NOT NULL,
 5+ mr_resource varbinary(255) NOT NULL,
66 -- Language code
77 mr_lang varbinary(32) NOT NULL,
88 -- JSON blob. This is an incomplete JSON object, i.e. without the wrapping {}
@@ -13,8 +13,8 @@
1414
1515 -- Table for administering which message is contained in which resource
1616 CREATE TABLE /*_*/msg_resource_links (
17 - mrl_resource varchar(255) NOT NULL,
 17+ mrl_resource varbinary(255) NOT NULL,
1818 -- Message key
19 - mrl_message varchar(255) NOT NULL
 19+ mrl_message varbinary(255) NOT NULL
2020 ) /*$wgDBTableOptions*/;
2121 CREATE UNIQUE INDEX /*i*/mrl_message_resource ON /*_*/msg_resource_links (mrl_message, mrl_resource);
Index: trunk/phase3/maintenance/archives/patch-module_deps.sql
@@ -3,9 +3,9 @@
44 -- Currently only used for tracking images that CSS depends on
55 CREATE TABLE /*_*/module_deps (
66 -- Module name
7 - md_module varchar(255) NOT NULL,
 7+ md_module varbinary(255) NOT NULL,
88 -- Skin name
9 - md_skin varchar(32) NOT NULL,
 9+ md_skin varbinary(32) NOT NULL,
1010 -- JSON blob with file dependencies
1111 md_deps mediumblob NOT NULL
1212 ) /*$wgDBTableOptions*/;
Index: trunk/phase3/maintenance/tables.sql
@@ -1397,7 +1397,7 @@
13981398 -- Table for storing JSON message blobs for the resource loader
13991399 CREATE TABLE /*_*/msg_resource (
14001400 -- Resource name
1401 - mr_resource varchar(255) NOT NULL,
 1401+ mr_resource varbinary(255) NOT NULL,
14021402 -- Language code
14031403 mr_lang varbinary(32) NOT NULL,
14041404 -- JSON blob
@@ -1409,9 +1409,9 @@
14101410
14111411 -- Table for administering which message is contained in which resource
14121412 CREATE TABLE /*_*/msg_resource_links (
1413 - mrl_resource varchar(255) NOT NULL,
 1413+ mrl_resource varbinary(255) NOT NULL,
14141414 -- Message key
1415 - mrl_message varchar(255) NOT NULL
 1415+ mrl_message varbinary(255) NOT NULL
14161416 ) /*$wgDBTableOptions*/;
14171417 CREATE UNIQUE INDEX /*i*/mrl_message_resource ON /*_*/msg_resource_links (mrl_message, mrl_resource);
14181418
@@ -1420,9 +1420,9 @@
14211421 -- Currently only used for tracking images that CSS depends on
14221422 CREATE TABLE /*_*/module_deps (
14231423 -- Module name
1424 - md_module varchar(255) NOT NULL,
 1424+ md_module varbinary(255) NOT NULL,
14251425 -- Skin name
1426 - md_skin varchar(32) NOT NULL,
 1426+ md_skin varbinary(32) NOT NULL,
14271427 -- JSON blob with file dependencies
14281428 md_deps mediumblob NOT NULL
14291429 ) /*$wgDBTableOptions*/;

Status & tagging log