Self-revert r80547 per CR, breaks stuff and is undesirable
authorRoan Kattouw <catrope@users.mediawiki.org>
Thu, 20 Jan 2011 23:56:47 +0000 (23:56 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Thu, 20 Jan 2011 23:56:47 +0000 (23:56 +0000)
38 files changed:
maintenance/archives/patch-category.sql
maintenance/archives/patch-categorylinks-better-collation.sql
maintenance/archives/patch-categorylinks.sql
maintenance/archives/patch-change_tag.sql
maintenance/archives/patch-external_user.sql
maintenance/archives/patch-filearchive.sql
maintenance/archives/patch-fix-il_from.sql
maintenance/archives/patch-interwiki.sql
maintenance/archives/patch-ipb_by_text.sql
maintenance/archives/patch-iw_api_and_wikiid.sql
maintenance/archives/patch-iwlinks.sql
maintenance/archives/patch-job.sql
maintenance/archives/patch-l10n_cache.sql
maintenance/archives/patch-langlinks.sql
maintenance/archives/patch-linktables.sql
maintenance/archives/patch-log_search.sql
maintenance/archives/patch-log_user_text.sql
maintenance/archives/patch-logging-title.sql
maintenance/archives/patch-logging.sql
maintenance/archives/patch-pagelinks.sql
maintenance/archives/patch-profiling.sql
maintenance/archives/patch-protected_titles.sql
maintenance/archives/patch-pt_title-encoding.sql
maintenance/archives/patch-querycache.sql
maintenance/archives/patch-querycachetwo.sql
maintenance/archives/patch-rc_type.sql
maintenance/archives/patch-rd_interwiki.sql
maintenance/archives/patch-redirect.sql
maintenance/archives/patch-restructure.sql
maintenance/archives/patch-searchindex.sql
maintenance/archives/patch-templatelinks.sql
maintenance/archives/patch-testrun.sql
maintenance/archives/patch-updatelog.sql
maintenance/archives/patch-user-realname.sql
maintenance/archives/patch-val_ip.sql
maintenance/archives/patch-validate.sql
maintenance/archives/patch-watchlist.sql
maintenance/tables.sql

index cb6aee0..416500c 100644 (file)
@@ -1,7 +1,7 @@
 CREATE TABLE /*$wgDBprefix*/category (
   cat_id int unsigned NOT NULL auto_increment,
 
-  cat_title varbinary(255) NOT NULL,
+  cat_title varchar(255) binary NOT NULL,
 
   cat_pages int signed NOT NULL default 0,
   cat_subcats int signed NOT NULL default 0,
index 4859e8e..c1499c1 100644 (file)
@@ -10,7 +10,7 @@
 -- sure to also change the check in LinksUpdate.php.
 ALTER TABLE /*$wgDBprefix*/categorylinks
        CHANGE COLUMN cl_sortkey cl_sortkey varbinary(230) NOT NULL default '',
-       ADD COLUMN cl_sortkey_prefix varbinary(255) NOT NULL default '',
+       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),
index 723c65e..02168d7 100644 (file)
@@ -10,7 +10,7 @@ CREATE TABLE /*$wgDBprefix*/categorylinks (
   -- Name of the category.
   -- This is also the page_title of the category's description page;
   -- all such pages are in namespace 14 (NS_CATEGORY).
-  cl_to varbinary(255) NOT NULL default '',
+  cl_to varchar(255) binary NOT NULL default '',
 
   -- The title of the linking page, or an optional override
   -- to determine sort order. Sorting is by binary order, which
@@ -19,7 +19,7 @@ CREATE TABLE /*$wgDBprefix*/categorylinks (
   --
   -- Truncate so that the cl_sortkey key fits in 1000 bytes 
   -- (MyISAM 5 with server_character_set=utf8)
-  cl_sortkey varbinary(70) NOT NULL default '',
+  cl_sortkey varchar(70) binary NOT NULL default '',
   
   -- This isn't really used at present. Provided for an optional
   -- sorting method by approximate addition time.
index 4828131..030e086 100644 (file)
@@ -4,7 +4,7 @@ CREATE TABLE /*_*/change_tag (
        ct_rc_id int NULL,
        ct_log_id int NULL,
        ct_rev_id int NULL,
-       ct_tag varbinary(255) NOT NULL,
+       ct_tag varchar(255) NOT NULL,
        ct_params BLOB NULL
 ) /*$wgDBTableOptions*/;
 
@@ -28,5 +28,5 @@ CREATE UNIQUE INDEX /*i*/tag_summary_rev_id ON /*_*/tag_summary (ts_rev_id);
 
 
 CREATE TABLE /*_*/valid_tag (
-       vt_tag varbinary(255) NOT NULL PRIMARY KEY
+       vt_tag varchar(255) NOT NULL PRIMARY KEY
 ) /*$wgDBTableOptions*/;
index ed06bf2..176b46d 100644 (file)
@@ -3,7 +3,7 @@ CREATE TABLE /*_*/external_user (
   eu_local_id int unsigned NOT NULL PRIMARY KEY,
 
   -- Some opaque identifier provided by the external database
-  eu_external_id varbinary(255) NOT NULL
+  eu_external_id varchar(255) binary NOT NULL
 ) /*$wgDBTableOptions*/;
 
 CREATE UNIQUE INDEX /*i*/eu_external_id ON /*_*/external_user (eu_external_id);
index 9ffa6f9..587a2ab 100644 (file)
@@ -6,10 +6,10 @@ CREATE TABLE /*$wgDBprefix*/filearchive (
   fa_id int not null auto_increment,
   
   -- Original base filename; key to image.img_name, page.page_title, etc
-  fa_name varbinary(255) NOT NULL default '',
+  fa_name varchar(255) binary NOT NULL default '',
   
   -- Filename of archived file, if an old revision
-  fa_archive_name varbinary(255) default '',
+  fa_archive_name varchar(255) binary default '',
   
   -- Which storage bin (directory tree or object store) the file data
   -- is stored in. Should be 'deleted' for files that have been deleted;
@@ -39,7 +39,7 @@ CREATE TABLE /*$wgDBprefix*/filearchive (
   fa_minor_mime varbinary(32) default "unknown",
   fa_description tinyblob,
   fa_user int unsigned default '0',
-  fa_user_text varbinary(255) default '',
+  fa_user_text varchar(255) binary default '',
   fa_timestamp binary(14) default '',
   
   PRIMARY KEY (fa_id),
index 4ae30fe..0a199e4 100644 (file)
@@ -3,7 +3,7 @@
 RENAME TABLE /*_*/imagelinks TO /*_*/imagelinks_old;
 CREATE TABLE /*_*/imagelinks (
   il_from int unsigned NOT NULL default 0,
-  il_to varbinary(255) NOT NULL default ''
+  il_to varchar(255) binary NOT NULL default ''
 ) /*$wgDBTableOptions*/;
 
 CREATE UNIQUE INDEX /*i*/il_from ON /*_*/imagelinks (il_from,il_to);
index 5808a48..321765b 100644 (file)
@@ -4,7 +4,7 @@
 
 CREATE TABLE /*$wgDBprefix*/interwiki (
   -- The interwiki prefix, (e.g. "Meatball", or the language prefix "de")
-  iw_prefix varbinary(32) NOT NULL,
+  iw_prefix varchar(32) NOT NULL,
   
   -- The URL of the wiki, with "$1" as a placeholder for an article name.
   -- Any spaces in the name will be transformed to underscores before
index 246248a..c0b620d 100644 (file)
@@ -2,7 +2,7 @@
 -- Required for crosswiki blocks.
 
 ALTER TABLE /*$wgDBprefix*/ipblocks
-       ADD ipb_by_text varbinary(255) NOT NULL default '';
+       ADD ipb_by_text varchar(255) binary NOT NULL default '';
 
 UPDATE /*$wgDBprefix*/ipblocks 
        JOIN /*$wgDBprefix*/user ON ipb_by = user_id
index 0c9205c..4384a71 100644 (file)
@@ -5,5 +5,5 @@
 ALTER TABLE /*_*/interwiki
        ADD iw_api BLOB NOT NULL;
 ALTER TABLE /*_*/interwiki
-       ADD iw_wikiid varbinary(64) NOT NULL;
+       ADD iw_wikiid varchar(64) NOT NULL;
 
index 07e4c82..89b34cb 100644 (file)
@@ -9,7 +9,7 @@ CREATE TABLE /*_*/iwlinks (
   iwl_prefix varbinary(20) NOT NULL default '',
 
   -- Title of the target, including namespace
-  iwl_title varbinary(255) NOT NULL default ''
+  iwl_title varchar(255) binary NOT NULL default ''
 ) /*$wgDBTableOptions*/;
 
 CREATE UNIQUE INDEX /*i*/iwl_from ON /*_*/iwlinks (iwl_from, iwl_prefix, iwl_title);
index 72d9c6d..c9199ef 100644 (file)
@@ -9,7 +9,7 @@ CREATE TABLE /*_*/job (
   -- Namespace and title to act on
   -- Should be 0 and '' if the command does not operate on a title
   job_namespace int NOT NULL,
-  job_title varbinary(255) NOT NULL,
+  job_title varchar(255) binary NOT NULL,
 
   -- Any other parameters to the command
   -- Stored as a PHP serialized array, or an empty string if there are no parameters
index 6f3d20d..4c865d7 100644 (file)
@@ -1,7 +1,7 @@
 -- Table for storing localisation data
 CREATE TABLE /*_*/l10n_cache (
   lc_lang varbinary(32) NOT NULL,
-  lc_key varbinary(255) NOT NULL,
+  lc_key varchar(255) NOT NULL,
   lc_value mediumblob NOT NULL
 ) /*$wgDBTableOptions*/;
 CREATE INDEX /*i*/lc_lang_key ON /*_*/l10n_cache (lc_lang, lc_key);
index 894f89d..ffff07c 100644 (file)
@@ -6,7 +6,7 @@ CREATE TABLE /*$wgDBprefix*/langlinks (
   ll_lang varbinary(20) NOT NULL default '',
 
   -- Title of the target, including namespace
-  ll_title varbinary(255) NOT NULL default '',
+  ll_title varchar(255) binary NOT NULL default '',
 
   UNIQUE KEY (ll_from, ll_lang),
   KEY (ll_lang, ll_title)
index 4825aa7..b15878c 100644 (file)
@@ -31,7 +31,7 @@ CREATE TABLE /*$wgDBprefix*/brokenlinks (
   -- Text of the target page title ("namesapce:title").
   -- Unfortunately this doesn't split the namespace index
   -- key and therefore can't easily be joined to anything.
-  bl_to varbinary(255) NOT NULL default '',
+  bl_to varchar(255) binary NOT NULL default '',
   UNIQUE KEY bl_from(bl_from,bl_to),
   KEY (bl_to)
 
@@ -50,7 +50,7 @@ CREATE TABLE /*$wgDBprefix*/imagelinks (
   -- Filename of target image.
   -- This is also the page_title of the file's description page;
   -- all such pages are in namespace 6 (NS_FILE).
-  il_to varbinary(255) NOT NULL default '',
+  il_to varchar(255) binary NOT NULL default '',
   
   UNIQUE KEY il_from(il_from,il_to),
   KEY (il_to)
index 008ba9e..8d92030 100644 (file)
@@ -2,7 +2,7 @@ CREATE TABLE /*_*/log_search (
   -- The type of ID (rev ID, log ID, rev timestamp, username)
   ls_field varbinary(32) NOT NULL,
   -- The value of the ID
-  ls_value varbinary(255) NOT NULL,
+  ls_value varchar(255) NOT NULL,
   -- Key to log_id
   ls_log_id int unsigned NOT NULL default 0
 ) /*$wgDBTableOptions*/;
index e50a09e..9a783d8 100644 (file)
@@ -1,5 +1,5 @@
 ALTER TABLE /*$wgDBprefix*/logging 
-       ADD log_user_text varbinary(255) NOT NULL default '',
+       ADD log_user_text varchar(255) binary NOT NULL default '',
        ADD log_page int unsigned NULL,
        CHANGE log_type log_type varbinary(32) NOT NULL,
        CHANGE log_action log_action varbinary(32) NOT NULL;
index dc1d637..c5da0dc 100644 (file)
@@ -3,4 +3,4 @@
 
 ALTER TABLE /*$wgDBprefix*/logging
   CHANGE COLUMN log_title
-    log_title varbinary(255) NOT NULL default '';
+    log_title varchar(255) binary NOT NULL default '';
index 2976237..b5cfdf7 100644 (file)
@@ -17,10 +17,10 @@ CREATE TABLE /*$wgDBprefix*/logging (
   -- Key to the page affected. Where a user is the target,
   -- this will point to the user page.
   log_namespace int NOT NULL default 0,
-  log_title varbinary(255) NOT NULL default '',
+  log_title varchar(255) binary NOT NULL default '',
   
   -- Freeform text. Interpreted as edit history comments.
-  log_comment varbinary(255) NOT NULL default '',
+  log_comment varchar(255) NOT NULL default '',
   
   -- LF separated list of miscellaneous parameters
   log_params blob NOT NULL,
index c1c645f..118592f 100644 (file)
@@ -25,7 +25,7 @@ CREATE TABLE /*$wgDBprefix*/pagelinks (
   -- and deletions may refer to different page records as time
   -- goes by.
   pl_namespace int NOT NULL default '0',
-  pl_title varbinary(255) NOT NULL default '',
+  pl_title varchar(255) binary NOT NULL default '',
   
   UNIQUE KEY pl_from(pl_from,pl_namespace,pl_title),
   KEY (pl_namespace,pl_title)
index 67f5f56..e748ca3 100644 (file)
@@ -5,7 +5,7 @@ CREATE TABLE /*$wgDBprefix*/profiling (
   pf_count int NOT NULL default 0,
   pf_time float NOT NULL default 0,
   pf_memory float NOT NULL default 0,
-  pf_name varbinary(255) NOT NULL default '',
-  pf_server varbinary(30) NOT NULL default '',
+  pf_name varchar(255) NOT NULL default '',
+  pf_server varchar(30) NOT NULL default '',
   UNIQUE KEY pf_name_server (pf_name, pf_server)
 ) ENGINE=HEAP;
index 98f4047..20b6035 100644 (file)
@@ -1,7 +1,7 @@
 -- Protected titles - nonexistent pages that have been protected
 CREATE TABLE /*$wgDBprefix*/protected_titles (
   pt_namespace int NOT NULL,
-  pt_title varbinary(255) NOT NULL,
+  pt_title varchar(255) binary NOT NULL,
   pt_user int unsigned NOT NULL,
   pt_reason tinyblob,
   pt_timestamp binary(14) NOT NULL,
index 84d1cb3..b0a2393 100644 (file)
@@ -2,4 +2,4 @@
 -- This might cause failures with JOINs, and could protect the wrong pages
 -- with different case variants or unrelated UTF-8 chars.
 ALTER TABLE /*$wgDBprefix*/protected_titles
-  CHANGE COLUMN pt_title pt_title varbinary(255) NOT NULL;
+  CHANGE COLUMN pt_title pt_title varchar(255) binary NOT NULL;
index 81f43c6..e6da79c 100644 (file)
@@ -9,7 +9,7 @@ CREATE TABLE /*$wgDBprefix*/querycache (
   
   -- Target namespace+title
   qc_namespace int NOT NULL default '0',
-  qc_title varbinary(255) NOT NULL default '',
+  qc_title varchar(255) binary NOT NULL default '',
   
   KEY (qc_type,qc_value)
 
index 2869d0c..01623bc 100644 (file)
@@ -9,11 +9,11 @@ CREATE TABLE /*$wgDBprefix*/querycachetwo (
   
   -- Target namespace+title
   qcc_namespace int NOT NULL default '0',
-  qcc_title varbinary(255) NOT NULL default '',
+  qcc_title varchar(255) binary NOT NULL default '',
   
   -- Target namespace+title2
   qcc_namespacetwo int NOT NULL default '0',
-  qcc_titletwo varbinary(255) NOT NULL default '',
+  qcc_titletwo varchar(255) binary NOT NULL default '',
 
   KEY qcc_type (qcc_type,qcc_value),
   KEY qcc_title (qcc_type,qcc_namespace,qcc_title),
index 6dec72c..f1fb18e 100644 (file)
@@ -3,7 +3,7 @@
 ALTER TABLE /*$wgDBprefix*/recentchanges
   ADD rc_type tinyint unsigned NOT NULL default '0',
   ADD rc_moved_to_ns tinyint unsigned NOT NULL default '0',
-  ADD rc_moved_to_title varbinary(255) NOT NULL default '';
+  ADD rc_moved_to_title varchar(255) binary NOT NULL default '';
 
 UPDATE /*$wgDBprefix*/recentchanges SET rc_type=1 WHERE rc_new;
 UPDATE /*$wgDBprefix*/recentchanges SET rc_type=3 WHERE rc_namespace=4 AND (rc_title='Deletion_log' OR rc_title='Upload_log');
index 5751122..a12f1a7 100644 (file)
@@ -1,6 +1,6 @@
 -- Add interwiki and fragment columns to redirect table
 
 ALTER TABLE /*$wgDBprefix*/redirect
-       ADD rd_interwiki varbinary(32) default NULL,
-       ADD rd_fragment varbinary(255) default NULL;
+       ADD rd_interwiki varchar(32) default NULL,
+       ADD rd_fragment varchar(255) binary default NULL;
 
index 3bf3c7a..5d7218b 100644 (file)
@@ -11,7 +11,7 @@ CREATE TABLE /*$wgDBprefix*/redirect (
   -- and deletions may refer to different page records as time
   -- goes by.
   rd_namespace int NOT NULL default '0',
-  rd_title varbinary(255) NOT NULL default '',
+  rd_title varchar(255) binary NOT NULL default '',
 
   PRIMARY KEY rd_from (rd_from),
   KEY rd_ns_title (rd_namespace,rd_title,rd_from)
index 1041fd9..7b63848 100644 (file)
@@ -12,7 +12,7 @@
 CREATE TABLE /*$wgDBprefix*/page (
   page_id int unsigned NOT NULL auto_increment,
   page_namespace tinyint NOT NULL,
-  page_title varbinary(255) NOT NULL,
+  page_title varchar(255) binary NOT NULL,
   page_restrictions tinyblob NOT NULL,
   page_counter bigint unsigned NOT NULL default '0',
   page_is_redirect tinyint unsigned NOT NULL default '0',
@@ -33,7 +33,7 @@ CREATE TABLE /*$wgDBprefix*/revision (
   rev_page int unsigned NOT NULL,
   rev_comment tinyblob NOT NULL,
   rev_user int unsigned NOT NULL default '0',
-  rev_user_text varbinary(255) NOT NULL default '',
+  rev_user_text varchar(255) binary NOT NULL default '',
   rev_timestamp binary(14) NOT NULL default '',
   rev_minor_edit tinyint unsigned NOT NULL default '0',
   rev_deleted tinyint unsigned NOT NULL default '0',
index c759e17..9b635a8 100644 (file)
@@ -12,7 +12,7 @@ CREATE TABLE /*$wgDBprefix*/searchindex (
   si_page int unsigned NOT NULL,
   
   -- Munged version of title
-  si_title varbinary(255) NOT NULL default '',
+  si_title varchar(255) NOT NULL default '',
   
   -- Munged version of body text
   si_text mediumtext NOT NULL,
index dae6c8a..a545b34 100644 (file)
@@ -10,7 +10,7 @@ CREATE TABLE /*$wgDBprefix*/templatelinks (
   -- and deletions may refer to different page records as time
   -- goes by.
   tl_namespace int NOT NULL default '0',
-  tl_title varbinary(255) NOT NULL default '',
+  tl_title varchar(255) binary NOT NULL default '',
   
   UNIQUE KEY tl_from(tl_from,tl_namespace,tl_title),
   KEY (tl_namespace,tl_title)
index 246dfc9..8591d81 100644 (file)
@@ -13,7 +13,7 @@ drop table if exists /*$wgDBprefix*/testrun;
 create table /*$wgDBprefix*/testrun (
   tr_id int not null auto_increment,
   
-  tr_date binary(14),
+  tr_date char(14) binary,
   tr_mw_version blob,
   tr_php_version blob,
   tr_db_version blob,
@@ -24,7 +24,7 @@ create table /*$wgDBprefix*/testrun (
 
 create table /*$wgDBprefix*/testitem (
   ti_run int not null,
-  ti_name varbinary(255),
+  ti_name varchar(255),
   ti_success bool,
   
   unique key (ti_run, ti_name),
index 87c7c1a..168ad08 100644 (file)
@@ -1,4 +1,4 @@
 CREATE TABLE /*$wgDBprefix*/updatelog (
-  ul_key varbinary(255) NOT NULL,
+  ul_key varchar(255) NOT NULL,
   PRIMARY KEY (ul_key)
 ) /*$wgDBTableOptions*/;
index 0f22607..96edaa4 100644 (file)
@@ -2,4 +2,4 @@
 -- used for author attribution or other places that real names matter.
 
 ALTER TABLE user 
-        ADD (user_real_name varbinary(255) NOT NULL default '');
+        ADD (user_real_name varchar(255) binary NOT NULL default '');
index f8b95c7..9214218 100644 (file)
@@ -1,4 +1,4 @@
 -- Column added 2005-05-24
 
 ALTER TABLE /*$wgDBprefix*/validate
-  ADD COLUMN val_ip varbinary(20) NOT NULL default '';
+  ADD COLUMN val_ip varchar(20) NOT NULL default '';
index 7b8a696..9701083 100644 (file)
@@ -7,7 +7,7 @@ CREATE TABLE /*$wgDBprefix*/validate (
   `val_revision` int(11) unsigned NOT NULL default '0',
   `val_type` int(11) unsigned NOT NULL default '0',
   `val_value` int(11) default '0',
-  `val_comment` varbinary(255) NOT NULL default '',
-  `val_ip` varbinary(20) NOT NULL default '',
+  `val_comment` varchar(255) NOT NULL default '',
+  `val_ip` varchar(20) NOT NULL default '',
   KEY `val_user` (`val_user`,`val_revision`)
 ) /*$wgDBTableOptions*/;
index 475ea0d..83826b7 100644 (file)
@@ -12,7 +12,7 @@ DROP TABLE IF EXISTS watchlist2;
 CREATE TABLE watchlist2 (
   wl_user int unsigned NOT NULL,
   wl_namespace int unsigned NOT NULL default '0',
-  wl_title varbinary(255) NOT NULL default '',
+  wl_title varchar(255) binary NOT NULL default '',
   UNIQUE KEY (wl_user, wl_namespace, wl_title)
 ) /*$wgDBTableOptions*/;
 
index 3d999dc..fba27cd 100644 (file)
@@ -58,10 +58,10 @@ CREATE TABLE /*_*/user (
   -- conflicts. Spaces are allowed, and are _not_ converted
   -- to underscores like titles. See the User::newFromName() for
   -- the specific tests that usernames have to pass.
-  user_name varbinary(255) NOT NULL default '',
+  user_name varchar(255) binary NOT NULL default '',
 
   -- Optional 'real name' to be displayed in credit listings
-  user_real_name varbinary(255) NOT NULL default '',
+  user_real_name varchar(255) binary NOT NULL default '',
 
   -- Password hashes, see User::crypt() and User::comparePasswords()
   -- in User.php for the algorithm
@@ -223,7 +223,7 @@ CREATE TABLE /*_*/page (
 
   -- The rest of the title, as text.
   -- Spaces are transformed into underscores in title storage.
-  page_title varbinary(255) NOT NULL,
+  page_title varchar(255) binary NOT NULL,
 
   -- Comma-separated set of permission keys indicating who
   -- can move or edit the page.
@@ -290,7 +290,7 @@ CREATE TABLE /*_*/revision (
   rev_user int unsigned NOT NULL default 0,
 
   -- Text username or IP address of the editor.
-  rev_user_text varbinary(255) NOT NULL default '',
+  rev_user_text varchar(255) binary NOT NULL default '',
 
   -- Timestamp
   rev_timestamp binary(14) NOT NULL default '',
@@ -360,7 +360,7 @@ CREATE TABLE /*_*/text (
 --
 CREATE TABLE /*_*/archive (
   ar_namespace int NOT NULL default 0,
-  ar_title varbinary(255) NOT NULL default '',
+  ar_title varchar(255) binary NOT NULL default '',
 
   -- Newly deleted pages will not store text in this table,
   -- but will reference the separately existing text rows.
@@ -373,7 +373,7 @@ CREATE TABLE /*_*/archive (
   -- Basic revision stuff...
   ar_comment tinyblob NOT NULL,
   ar_user int unsigned NOT NULL default 0,
-  ar_user_text varbinary(255) NOT NULL,
+  ar_user_text varchar(255) binary NOT NULL,
   ar_timestamp binary(14) NOT NULL default '',
   ar_minor_edit tinyint NOT NULL default 0,
 
@@ -434,7 +434,7 @@ CREATE TABLE /*_*/pagelinks (
   -- and deletions may refer to different page records as time
   -- goes by.
   pl_namespace int NOT NULL default 0,
-  pl_title varbinary(255) NOT NULL default ''
+  pl_title varchar(255) binary NOT NULL default ''
 ) /*$wgDBTableOptions*/;
 
 CREATE UNIQUE INDEX /*i*/pl_from ON /*_*/pagelinks (pl_from,pl_namespace,pl_title);
@@ -453,7 +453,7 @@ CREATE TABLE /*_*/templatelinks (
   -- and deletions may refer to different page records as time
   -- goes by.
   tl_namespace int NOT NULL default 0,
-  tl_title varbinary(255) NOT NULL default ''
+  tl_title varchar(255) binary NOT NULL default ''
 ) /*$wgDBTableOptions*/;
 
 CREATE UNIQUE INDEX /*i*/tl_from ON /*_*/templatelinks (tl_from,tl_namespace,tl_title);
@@ -472,7 +472,7 @@ CREATE TABLE /*_*/imagelinks (
   -- Filename of target image.
   -- This is also the page_title of the file's description page;
   -- all such pages are in namespace 6 (NS_FILE).
-  il_to varbinary(255) NOT NULL default ''
+  il_to varchar(255) binary NOT NULL default ''
 ) /*$wgDBTableOptions*/;
 
 CREATE UNIQUE INDEX /*i*/il_from ON /*_*/imagelinks (il_from,il_to);
@@ -490,7 +490,7 @@ CREATE TABLE /*_*/categorylinks (
   -- Name of the category.
   -- This is also the page_title of the category's description page;
   -- all such pages are in namespace 14 (NS_CATEGORY).
-  cl_to varbinary(255) NOT NULL default '',
+  cl_to varchar(255) binary NOT NULL default '',
 
   -- A binary string obtained by applying a sortkey generation algorithm
   -- (Collation::getSortKey()) to page_title, or cl_sortkey_prefix . "\n"
@@ -504,7 +504,7 @@ CREATE TABLE /*_*/categorylinks (
   -- collations without reparsing all pages.
   -- Note: If you change the length of this field, you also need to change
   -- code in LinksUpdate.php. See bug 25254.
-  cl_sortkey_prefix varbinary(255) NOT NULL default '',
+  cl_sortkey_prefix varchar(255) binary NOT NULL default '',
 
   -- This isn't really used at present. Provided for an optional
   -- sorting method by approximate addition time.
@@ -549,7 +549,7 @@ CREATE TABLE /*_*/category (
   -- Name of the category, in the same form as page_title (with underscores).
   -- If there is a category page corresponding to this category, by definition,
   -- it has this name (in the Category namespace).
-  cat_title varbinary(255) NOT NULL,
+  cat_title varchar(255) binary NOT NULL,
 
   -- The numbers of member pages (including categories and media), subcatego-
   -- ries, and Image: namespace members, respectively.  These are signed to
@@ -607,7 +607,7 @@ CREATE TABLE /*_*/external_user (
   eu_local_id int unsigned NOT NULL PRIMARY KEY,
 
   -- Some opaque identifier provided by the external database
-  eu_external_id varbinary(255) NOT NULL
+  eu_external_id varchar(255) binary NOT NULL
 ) /*$wgDBTableOptions*/;
 
 CREATE UNIQUE INDEX /*i*/eu_external_id ON /*_*/external_user (eu_external_id);
@@ -624,7 +624,7 @@ CREATE TABLE /*_*/langlinks (
   ll_lang varbinary(20) NOT NULL default '',
 
   -- Title of the target, including namespace
-  ll_title varbinary(255) NOT NULL default ''
+  ll_title varchar(255) binary NOT NULL default ''
 ) /*$wgDBTableOptions*/;
 
 CREATE UNIQUE INDEX /*i*/ll_from ON /*_*/langlinks (ll_from, ll_lang);
@@ -642,7 +642,7 @@ CREATE TABLE /*_*/iwlinks (
   iwl_prefix varbinary(20) NOT NULL default '',
 
   -- Title of the target, including namespace
-  iwl_title varbinary(255) NOT NULL default ''
+  iwl_title varchar(255) binary NOT NULL default ''
 ) /*$wgDBTableOptions*/;
 
 CREATE UNIQUE INDEX /*i*/iwl_from ON /*_*/iwlinks (iwl_from, iwl_prefix, iwl_title);
@@ -720,7 +720,7 @@ CREATE TABLE /*_*/ipblocks (
   ipb_by int unsigned NOT NULL default 0,
 
   -- User name of blocker
-  ipb_by_text varbinary(255) NOT NULL default '',
+  ipb_by_text varchar(255) binary NOT NULL default '',
 
   -- Text comment made by blocker.
   ipb_reason tinyblob NOT NULL,
@@ -780,7 +780,7 @@ CREATE TABLE /*_*/image (
   -- Filename.
   -- This is also the title of the associated description page,
   -- which will be in namespace 6 (NS_FILE).
-  img_name varbinary(255) NOT NULL default '' PRIMARY KEY,
+  img_name varchar(255) binary NOT NULL default '' PRIMARY KEY,
 
   -- File size in bytes.
   img_size int unsigned NOT NULL default 0,
@@ -814,7 +814,7 @@ CREATE TABLE /*_*/image (
 
   -- user_id and user_name of uploader.
   img_user int unsigned NOT NULL default 0,
-  img_user_text varbinary(255) NOT NULL,
+  img_user_text varchar(255) binary NOT NULL,
 
   -- Time of the upload.
   img_timestamp varbinary(14) NOT NULL default '',
@@ -839,11 +839,11 @@ CREATE INDEX /*i*/img_sha1 ON /*_*/image (img_sha1);
 --
 CREATE TABLE /*_*/oldimage (
   -- Base filename: key to image.img_name
-  oi_name varbinary(255) NOT NULL default '',
+  oi_name varchar(255) binary NOT NULL default '',
 
   -- Filename of the archived file.
   -- This is generally a timestamp and '!' prepended to the base name.
-  oi_archive_name varbinary(255) NOT NULL default '',
+  oi_archive_name varchar(255) binary NOT NULL default '',
 
   -- Other fields as in image...
   oi_size int unsigned NOT NULL default 0,
@@ -852,7 +852,7 @@ CREATE TABLE /*_*/oldimage (
   oi_bits int NOT NULL default 0,
   oi_description tinyblob NOT NULL,
   oi_user int unsigned NOT NULL default 0,
-  oi_user_text varbinary(255) NOT NULL,
+  oi_user_text varchar(255) binary NOT NULL,
   oi_timestamp binary(14) NOT NULL default '',
 
   oi_metadata mediumblob NOT NULL,
@@ -878,10 +878,10 @@ CREATE TABLE /*_*/filearchive (
   fa_id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
 
   -- Original base filename; key to image.img_name, page.page_title, etc
-  fa_name varbinary(255) NOT NULL default '',
+  fa_name varchar(255) binary NOT NULL default '',
 
   -- Filename of archived file, if an old revision
-  fa_archive_name varbinary(255) default '',
+  fa_archive_name varchar(255) binary default '',
 
   -- Which storage bin (directory tree or object store) the file data
   -- is stored in. Should be 'deleted' for files that have been deleted;
@@ -911,7 +911,7 @@ CREATE TABLE /*_*/filearchive (
   fa_minor_mime varbinary(100) default "unknown",
   fa_description tinyblob,
   fa_user int unsigned default 0,
-  fa_user_text varbinary(255),
+  fa_user_text varchar(255) binary,
   fa_timestamp binary(14) default '',
 
   -- Visibility of deleted revisions, bitfield
@@ -940,14 +940,14 @@ CREATE TABLE /*_*/recentchanges (
 
   -- As in revision
   rc_user int unsigned NOT NULL default 0,
-  rc_user_text varbinary(255) NOT NULL,
+  rc_user_text varchar(255) binary NOT NULL,
 
   -- When pages are renamed, their RC entries do _not_ change.
   rc_namespace int NOT NULL default 0,
-  rc_title varbinary(255) NOT NULL default '',
+  rc_title varchar(255) binary NOT NULL default '',
 
   -- as in revision...
-  rc_comment varbinary(255) NOT NULL default '',
+  rc_comment varchar(255) binary NOT NULL default '',
   rc_minor tinyint unsigned NOT NULL default 0,
 
   -- Edits by user accounts with the 'bot' rights key are
@@ -971,7 +971,7 @@ CREATE TABLE /*_*/recentchanges (
   -- These may no longer be used, with the new move log.
   rc_type tinyint unsigned NOT NULL default 0,
   rc_moved_to_ns tinyint unsigned NOT NULL default 0,
-  rc_moved_to_title varbinary(255) NOT NULL default '',
+  rc_moved_to_title varchar(255) binary NOT NULL default '',
 
   -- If the Recent Changes Patrol option is enabled,
   -- users may mark edits as having been reviewed to
@@ -1018,7 +1018,7 @@ CREATE TABLE /*_*/watchlist (
   -- Note that users may watch pages which do not exist yet,
   -- or existed in the past but have been deleted.
   wl_namespace int NOT NULL default 0,
-  wl_title varbinary(255) NOT NULL default '',
+  wl_title varchar(255) binary NOT NULL default '',
 
   -- Timestamp when user was last sent a notification e-mail;
   -- cleared when the user visits the page.
@@ -1068,7 +1068,7 @@ CREATE TABLE /*_*/searchindex (
   si_page int unsigned NOT NULL,
 
   -- Munged version of title
-  si_title varbinary(255) NOT NULL default '',
+  si_title varchar(255) NOT NULL default '',
 
   -- Munged version of body text
   si_text mediumtext NOT NULL
@@ -1084,7 +1084,7 @@ CREATE FULLTEXT INDEX /*i*/si_text ON /*_*/searchindex (si_text);
 --
 CREATE TABLE /*_*/interwiki (
   -- The interwiki prefix, (e.g. "Meatball", or the language prefix "de")
-  iw_prefix varbinary(32) NOT NULL,
+  iw_prefix varchar(32) NOT NULL,
 
   -- The URL of the wiki, with "$1" as a placeholder for an article name.
   -- Any spaces in the name will be transformed to underscores before
@@ -1095,7 +1095,7 @@ CREATE TABLE /*_*/interwiki (
   iw_api blob NOT NULL,
 
   -- The name of the database (for a connection to be established with wfGetLB( 'wikiid' ))
-  iw_wikiid varbinary(64) NOT NULL,
+  iw_wikiid varchar(64) NOT NULL,
 
   -- A boolean value indicating whether the wiki is in this project
   -- (used, for example, to detect redirect loops)
@@ -1120,7 +1120,7 @@ CREATE TABLE /*_*/querycache (
 
   -- Target namespace+title
   qc_namespace int NOT NULL default 0,
-  qc_title varbinary(255) NOT NULL default ''
+  qc_title varchar(255) binary NOT NULL default ''
 ) /*$wgDBTableOptions*/;
 
 CREATE INDEX /*i*/qc_type ON /*_*/querycache (qc_type,qc_value);
@@ -1166,16 +1166,16 @@ CREATE TABLE /*_*/logging (
   log_user int unsigned NOT NULL default 0,
 
   -- Name of the user who performed this action
-  log_user_text varbinary(255) NOT NULL default '',
+  log_user_text varchar(255) binary NOT NULL default '',
 
   -- Key to the page affected. Where a user is the target,
   -- this will point to the user page.
   log_namespace int NOT NULL default 0,
-  log_title varbinary(255) NOT NULL default '',
+  log_title varchar(255) binary NOT NULL default '',
   log_page int unsigned NULL,
 
   -- Freeform text. Interpreted as edit history comments.
-  log_comment varbinary(255) NOT NULL default '',
+  log_comment varchar(255) NOT NULL default '',
 
   -- LF separated list of miscellaneous parameters
   log_params blob NOT NULL,
@@ -1196,7 +1196,7 @@ CREATE TABLE /*_*/log_search (
   -- The type of ID (rev ID, log ID, rev timestamp, username)
   ls_field varbinary(32) NOT NULL,
   -- The value of the ID
-  ls_value varbinary(255) NOT NULL,
+  ls_value varchar(255) NOT NULL,
   -- Key to log_id
   ls_log_id int unsigned NOT NULL default 0
 ) /*$wgDBTableOptions*/;
@@ -1207,10 +1207,10 @@ CREATE INDEX /*i*/ls_log_id ON /*_*/log_search (ls_log_id);
 CREATE TABLE /*_*/trackbacks (
   tb_id int PRIMARY KEY AUTO_INCREMENT,
   tb_page int REFERENCES /*_*/page(page_id) ON DELETE CASCADE,
-  tb_title varbinary(255) NOT NULL,
+  tb_title varchar(255) NOT NULL,
   tb_url blob NOT NULL,
   tb_ex text,
-  tb_name varbinary(255)
+  tb_name varchar(255)
 ) /*$wgDBTableOptions*/;
 CREATE INDEX /*i*/tb_page ON /*_*/trackbacks (tb_page);
 
@@ -1226,7 +1226,7 @@ CREATE TABLE /*_*/job (
   -- Namespace and title to act on
   -- Should be 0 and '' if the command does not operate on a title
   job_namespace int NOT NULL,
-  job_title varbinary(255) NOT NULL,
+  job_title varchar(255) binary NOT NULL,
 
   -- Any other parameters to the command
   -- Stored as a PHP serialized array, or an empty string if there are no parameters
@@ -1259,9 +1259,9 @@ CREATE TABLE /*_*/redirect (
   -- and deletions may refer to different page records as time
   -- goes by.
   rd_namespace int NOT NULL default 0,
-  rd_title varbinary(255) NOT NULL default '',
-  rd_interwiki varbinary(32) default NULL,
-  rd_fragment varbinary(255) default NULL
+  rd_title varchar(255) binary NOT NULL default '',
+  rd_interwiki varchar(32) default NULL,
+  rd_fragment varchar(255) binary default NULL
 ) /*$wgDBTableOptions*/;
 
 CREATE INDEX /*i*/rd_ns_title ON /*_*/redirect (rd_namespace,rd_title,rd_from);
@@ -1277,11 +1277,11 @@ CREATE TABLE /*_*/querycachetwo (
 
   -- Target namespace+title
   qcc_namespace int NOT NULL default 0,
-  qcc_title varbinary(255) NOT NULL default '',
+  qcc_title varchar(255) binary NOT NULL default '',
 
   -- Target namespace+title2
   qcc_namespacetwo int NOT NULL default 0,
-  qcc_titletwo varbinary(255) NOT NULL default ''
+  qcc_titletwo varchar(255) binary NOT NULL default ''
 ) /*$wgDBTableOptions*/;
 
 CREATE INDEX /*i*/qcc_type ON /*_*/querycachetwo (qcc_type,qcc_value);
@@ -1316,7 +1316,7 @@ CREATE INDEX /*i*/pr_cascade ON /*_*/page_restrictions (pr_cascade);
 -- Protected titles - nonexistent pages that have been protected
 CREATE TABLE /*_*/protected_titles (
   pt_namespace int NOT NULL,
-  pt_title varbinary(255) NOT NULL,
+  pt_title varchar(255) binary NOT NULL,
   pt_user int unsigned NOT NULL,
   pt_reason tinyblob,
   pt_timestamp binary(14) NOT NULL,
@@ -1340,7 +1340,7 @@ CREATE UNIQUE INDEX /*i*/pp_page_propname ON /*_*/page_props (pp_page,pp_propnam
 
 -- A table to log updates, one text key row per update.
 CREATE TABLE /*_*/updatelog (
-  ul_key varbinary(255) NOT NULL PRIMARY KEY,
+  ul_key varchar(255) NOT NULL PRIMARY KEY,
   ul_value blob
 ) /*$wgDBTableOptions*/;
 
@@ -1354,7 +1354,7 @@ CREATE TABLE /*_*/change_tag (
   -- REVID for the change
   ct_rev_id int NULL,
   -- Tag applied
-  ct_tag varbinary(255) NOT NULL,
+  ct_tag varchar(255) NOT NULL,
   -- Parameters for the tag, presently unused
   ct_params blob NULL
 ) /*$wgDBTableOptions*/;
@@ -1385,7 +1385,7 @@ CREATE UNIQUE INDEX /*i*/tag_summary_rev_id ON /*_*/tag_summary (ts_rev_id);
 
 
 CREATE TABLE /*_*/valid_tag (
-  vt_tag varbinary(255) NOT NULL PRIMARY KEY
+  vt_tag varchar(255) NOT NULL PRIMARY KEY
 ) /*$wgDBTableOptions*/;
 
 -- Table for storing localisation data
@@ -1393,7 +1393,7 @@ CREATE TABLE /*_*/l10n_cache (
   -- Language code
   lc_lang varbinary(32) NOT NULL,
   -- Cache key
-  lc_key varbinary(255) NOT NULL,
+  lc_key varchar(255) NOT NULL,
   -- Value
   lc_value mediumblob NOT NULL
 ) /*$wgDBTableOptions*/;