r23651 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23650‎ | r23651 | r23652 >
Date:16:53, 2 July 2007
Author:tstarling
Status:old
Tags:
Comment:
Backported schema changes from r23239 and r23247.
Modified paths:
  • /branches/REL1_10/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_10/phase3/maintenance/tables.sql (modified) (history)

Diff [purge]

Index: branches/REL1_10/phase3/maintenance/tables.sql
@@ -15,7 +15,7 @@
1616 --
1717 --
1818 -- The MySQL table backend for MediaWiki currently uses
 19+-- 14-character BINARY or VARBINARY fields to store timestamps.
1920 -- The format is YYYYMMDDHHMMSS, which is derived from the
2021 -- text format of MySQL's TIMESTAMP fields.
2122 --
@@ -49,7 +49,7 @@
5050 -- tables.
5151 --
5252 CREATE TABLE /*$wgDBprefix*/user (
53 - user_id int(5) unsigned NOT NULL auto_increment,
 53+ user_id int unsigned NOT NULL auto_increment,
5454
5555 -- Usernames must be unique, must not be in the form of
5656 -- an IP address. _Shouldn't_ allow slashes or case
@@ -76,7 +76,7 @@
7777
7878 -- Timestamp of the last time when a new password was
7979 -- sent, for throttling purposes
80 - user_newpass_time char(14) binary,
 80+ user_newpass_time binary(14),
8181
8282 -- Note: email should be restricted, not public info.
8383 -- Same with passwords.
@@ -90,29 +90,29 @@
9191 -- logs in, logs out, changes preferences, or performs
9292 -- some other action requiring HTML cache invalidation
9393 -- to ensure that the UI is updated.
94 - user_touched char(14) binary NOT NULL default '',
 94+ user_touched binary(14) NOT NULL default '',
9595
9696 -- A pseudorandomly generated value that is stored in
9797 -- a cookie when the "remember password" feature is
9898 -- used (previously, a hash of the password was used, but
9999 -- this was vulnerable to cookie-stealing attacks)
100 - user_token char(32) binary NOT NULL default '',
 100+ user_token binary(32) NOT NULL default '',
101101
102102 -- Initially NULL; when a user's e-mail address has been
103103 -- validated by returning with a mailed token, this is
104104 -- set to the current timestamp.
105 - user_email_authenticated char(14) binary,
 105+ user_email_authenticated binary(14),
106106
107107 -- Randomly generated token created when the e-mail address
108108 -- is set and a confirmation test mail sent.
109 - user_email_token char(32) binary,
 109+ user_email_token binary(32),
110110
111111 -- Expiration date for the user_email_token
112 - user_email_token_expires char(14) binary,
 112+ user_email_token_expires binary(14),
113113
114114 -- Timestamp of account registration.
115115 -- Accounts predating this schema addition may contain NULL.
116 - user_registration char(14) binary,
 116+ user_registration binary(14),
117117
118118 -- Count of edits and edit-like actions.
119119 --
@@ -142,7 +142,7 @@
143143 --
144144 CREATE TABLE /*$wgDBprefix*/user_groups (
145145 -- Key to user_id
146 - ug_user int(5) unsigned NOT NULL default '0',
 146+ ug_user int unsigned NOT NULL default '0',
147147
148148 -- Group names are short symbolic string keys.
149149 -- The set of group names is open-ended, though in practice
@@ -152,7 +152,7 @@
153153 -- with particular permissions. A user will have the combined
154154 -- permissions of any group they're explicitly in, plus
155155 -- the implicit '*' and 'user' groups.
156 - ug_group char(16) NOT NULL default '',
 156+ ug_group varbinary(16) NOT NULL default '',
157157
158158 PRIMARY KEY (ug_user,ug_group),
159159 KEY (ug_group)
@@ -162,10 +162,10 @@
163163 -- of the "you have new messages" box
164164 CREATE TABLE /*$wgDBprefix*/user_newtalk (
165165 -- Key to user.user_id
166 - user_id int(5) NOT NULL default '0',
 166+ user_id int NOT NULL default '0',
167167 -- If the user is an anonymous user their IP address is stored here
168168 -- since the user_id of 0 is ambiguous
169 - user_ip varchar(40) NOT NULL default '',
 169+ user_ip varbinary(40) NOT NULL default '',
170170 INDEX user_id (user_id),
171171 INDEX user_ip (user_ip)
172172
@@ -179,7 +179,7 @@
180180 CREATE TABLE /*$wgDBprefix*/page (
181181 -- Unique identifier number. The page_id will be preserved across
182182 -- edits and rename operations, but not deletions and recreations.
183 - page_id int(8) unsigned NOT NULL auto_increment,
 183+ page_id int unsigned NOT NULL auto_increment,
184184
185185 -- A page name is broken into a namespace and a title.
186186 -- The namespace keys are UI-language-independent constants,
@@ -195,14 +195,14 @@
196196 page_restrictions tinyblob NOT NULL,
197197
198198 -- Number of times this page has been viewed.
199 - page_counter bigint(20) unsigned NOT NULL default '0',
 199+ page_counter bigint unsigned NOT NULL default '0',
200200
201201 -- 1 indicates the article is a redirect.
202 - page_is_redirect tinyint(1) unsigned NOT NULL default '0',
 202+ page_is_redirect tinyint unsigned NOT NULL default '0',
203203
204204 -- 1 indicates this is a new entry, with only one edit.
205205 -- Not all pages with one edit are new pages.
206 - page_is_new tinyint(1) unsigned NOT NULL default '0',
 206+ page_is_new tinyint unsigned NOT NULL default '0',
207207
208208 -- Random value between 0 and 1, used for Special:Randompage
209209 page_random real unsigned NOT NULL,
@@ -212,15 +212,15 @@
213213 -- Aside from editing this includes permission changes,
214214 -- creation or deletion of linked pages, and alteration
215215 -- of contained templates.
216 - page_touched char(14) binary NOT NULL default '',
 216+ page_touched binary(14) NOT NULL default '',
217217
218218 -- Handy key to revision.rev_id of the current revision.
219219 -- This may be 0 during page creation, but that shouldn't
220220 -- happen outside of a transaction... hopefully.
221 - page_latest int(8) unsigned NOT NULL,
 221+ page_latest int unsigned NOT NULL,
222222
223223 -- Uncompressed length in bytes of the page's current source text.
224 - page_len int(8) unsigned NOT NULL,
 224+ page_len int unsigned NOT NULL,
225225
226226 PRIMARY KEY page_id (page_id),
227227 UNIQUE INDEX name_title (page_namespace,page_title),
@@ -237,16 +237,16 @@
238238 -- to the text storage backend.
239239 --
240240 CREATE TABLE /*$wgDBprefix*/revision (
241 - rev_id int(8) unsigned NOT NULL auto_increment,
 241+ rev_id int unsigned NOT NULL auto_increment,
242242
243243 -- Key to page_id. This should _never_ be invalid.
244 - rev_page int(8) unsigned NOT NULL,
 244+ rev_page int unsigned NOT NULL,
245245
246246 -- Key to text.old_id, where the actual bulk text is stored.
247247 -- It's possible for multiple revisions to use the same text,
248248 -- for instance revisions where only metadata is altered
249249 -- or a rollback to a previous version.
250 - rev_text_id int(8) unsigned NOT NULL,
 250+ rev_text_id int unsigned NOT NULL,
251251
252252 -- Text comment summarizing the change.
253253 -- This text is shown in the history and other changes lists,
@@ -255,27 +255,27 @@
256256
257257 -- Key to user.user_id of the user who made this edit.
258258 -- Stores 0 for anonymous edits and for some mass imports.
259 - rev_user int(5) unsigned NOT NULL default '0',
 259+ rev_user int unsigned NOT NULL default '0',
260260
261261 -- Text username or IP address of the editor.
262262 rev_user_text varchar(255) binary NOT NULL default '',
263263
264264 -- Timestamp
265 - rev_timestamp char(14) binary NOT NULL default '',
 265+ rev_timestamp binary(14) NOT NULL default '',
266266
267267 -- Records whether the user marked the 'minor edit' checkbox.
268268 -- Many automated edits are marked as minor.
269 - rev_minor_edit tinyint(1) unsigned NOT NULL default '0',
 269+ rev_minor_edit tinyint unsigned NOT NULL default '0',
270270
271271 -- Not yet used; reserved for future changes to the deletion system.
272 - rev_deleted tinyint(1) unsigned NOT NULL default '0',
 272+ rev_deleted tinyint unsigned NOT NULL default '0',
273273
274274 -- Length of this revision in bytes
275 - rev_len int(8) unsigned,
 275+ rev_len int unsigned,
276276
277277 -- Key to revision.rev_id
278278 -- This field is used to add support for a tree structure (The Adjacency List Model)
279 - rev_parent_id int(8) unsigned default NULL,
 279+ rev_parent_id int unsigned default NULL,
280280
281281 PRIMARY KEY rev_page_id (rev_page, rev_id),
282282 UNIQUE INDEX rev_id (rev_id),
@@ -301,7 +301,7 @@
302302 -- refer to this number anymore, but to rev_id.
303303 --
304304 -- revision.rev_text_id is a key to this column
305 - old_id int(8) unsigned NOT NULL auto_increment,
 305+ old_id int unsigned NOT NULL auto_increment,
306306
307307 -- Depending on the contents of the old_flags field, the text
308308 -- may be convenient plain text, or it may be funkily encoded.
@@ -343,10 +343,10 @@
344344
345345 -- Basic revision stuff...
346346 ar_comment tinyblob NOT NULL,
347 - ar_user int(5) unsigned NOT NULL default '0',
 347+ ar_user int unsigned NOT NULL default '0',
348348 ar_user_text varchar(255) binary NOT NULL,
349 - ar_timestamp char(14) binary NOT NULL default '',
350 - ar_minor_edit tinyint(1) NOT NULL default '0',
 349+ ar_timestamp binary(14) NOT NULL default '',
 350+ ar_minor_edit tinyint NOT NULL default '0',
351351
352352 -- See ar_text note.
353353 ar_flags tinyblob NOT NULL,
@@ -358,7 +358,7 @@
359359 --
360360 -- Old entries from 1.4 will be NULL here, and a new rev_id will
361361 -- be created on undeletion for those revisions.
362 - ar_rev_id int(8) unsigned,
 362+ ar_rev_id int unsigned,
363363
364364 -- For newly deleted revisions, this is the text.old_id key to the
365365 -- actual stored text. To avoid breaking the block-compression scheme
@@ -369,13 +369,13 @@
370370 -- Old entries deleted under 1.2-1.4 will have NULL here, and their
371371 -- ar_text and ar_flags fields will be used to create a new text
372372 -- row upon undeletion.
373 - ar_text_id int(8) unsigned,
 373+ ar_text_id int unsigned,
374374
375375 -- rev_deleted for archives
376 - ar_deleted tinyint(1) unsigned NOT NULL default '0',
 376+ ar_deleted tinyint unsigned NOT NULL default '0',
377377
378378 -- Length of this revision in bytes
379 - ar_len int(8) unsigned,
 379+ ar_len int unsigned,
380380
381381 KEY name_title_timestamp (ar_namespace,ar_title,ar_timestamp)
382382
@@ -387,7 +387,7 @@
388388 --
389389 CREATE TABLE /*$wgDBprefix*/pagelinks (
390390 -- Key to the page_id of the page containing the link.
391 - pl_from int(8) unsigned NOT NULL default '0',
 391+ pl_from int unsigned NOT NULL default '0',
392392
393393 -- Key to page_namespace/page_title of the target page.
394394 -- The target page may or may not exist, and due to renames
@@ -407,7 +407,7 @@
408408 --
409409 CREATE TABLE /*$wgDBprefix*/templatelinks (
410410 -- Key to the page_id of the page containing the link.
411 - tl_from int(8) unsigned NOT NULL default '0',
 411+ tl_from int unsigned NOT NULL default '0',
412412
413413 -- Key to page_namespace/page_title of the target page.
414414 -- The target page may or may not exist, and due to renames
@@ -428,7 +428,7 @@
429429 --
430430 CREATE TABLE /*$wgDBprefix*/imagelinks (
431431 -- Key to page_id of the page containing the image / media link.
432 - il_from int(8) unsigned NOT NULL default '0',
 432+ il_from int unsigned NOT NULL default '0',
433433
434434 -- Filename of target image.
435435 -- This is also the page_title of the file's description page;
@@ -447,7 +447,7 @@
448448 --
449449 CREATE TABLE /*$wgDBprefix*/categorylinks (
450450 -- Key to page_id of the page defined as a category member.
451 - cl_from int(8) unsigned NOT NULL default '0',
 451+ cl_from int unsigned NOT NULL default '0',
452452
453453 -- Name of the category.
454454 -- This is also the page_title of the category's description page;
@@ -460,11 +460,9 @@
461461 -- and dangerous new world in MySQL... The sortkey is updated
462462 -- if no override exists and cl_from is renamed.
463463 --
464 - -- For MySQL 4.1+ with charset set to utf8, the sort key *index*
465 - -- needs cut to be smaller than 1024 bytes (at 3 bytes per char).
466 - -- To sort properly on the shorter key, this field needs to be
467 - -- the same shortness.
468 - cl_sortkey varchar(86) binary NOT NULL default '',
 464+ -- Truncate so that the cl_sortkey key fits in 1000 bytes
 465+ -- (MyISAM 5 with server_character_set=utf8)
 466+ cl_sortkey varchar(70) binary NOT NULL default '',
469467
470468 -- This isn't really used at present. Provided for an optional
471469 -- sorting method by approximate addition time.
@@ -485,7 +483,7 @@
486484 --
487485 CREATE TABLE /*$wgDBprefix*/externallinks (
488486 -- page_id of the referring page
489 - el_from int(8) unsigned NOT NULL default '0',
 487+ el_from int unsigned NOT NULL default '0',
490488
491489 -- The URL
492490 el_to blob NOT NULL,
@@ -513,10 +511,10 @@
514512 --
515513 CREATE TABLE /*$wgDBprefix*/langlinks (
516514 -- page_id of the referring page
517 - ll_from int(8) unsigned NOT NULL default '0',
 515+ ll_from int unsigned NOT NULL default '0',
518516
519517 -- Language code of the target
520 - ll_lang varchar(10) binary NOT NULL default '',
 518+ ll_lang varbinary(20) NOT NULL default '',
521519
522520 -- Title of the target, including namespace
523521 ll_title varchar(255) binary NOT NULL default '',
@@ -531,32 +529,32 @@
532530 --
533531 CREATE TABLE /*$wgDBprefix*/site_stats (
534532 -- The single row should contain 1 here.
535 - ss_row_id int(8) unsigned NOT NULL,
 533+ ss_row_id int unsigned NOT NULL,
536534
537535 -- Total number of page views, if hit counters are enabled.
538 - ss_total_views bigint(20) unsigned default '0',
 536+ ss_total_views bigint unsigned default '0',
539537
540538 -- Total number of edits performed.
541 - ss_total_edits bigint(20) unsigned default '0',
 539+ ss_total_edits bigint unsigned default '0',
542540
543541 -- An approximate count of pages matching the following criteria:
544542 -- * in namespace 0
545543 -- * not a redirect
546544 -- * contains the text '[['
547545 -- See Article::isCountable() in includes/Article.php
548 - ss_good_articles bigint(20) unsigned default '0',
 546+ ss_good_articles bigint unsigned default '0',
549547
550548 -- Total pages, theoretically equal to SELECT COUNT(*) FROM page; except faster
551 - ss_total_pages bigint(20) default '-1',
 549+ ss_total_pages bigint default '-1',
552550
553551 -- Number of users, theoretically equal to SELECT COUNT(*) FROM user;
554 - ss_users bigint(20) default '-1',
 552+ ss_users bigint default '-1',
555553
556554 -- Deprecated, no longer updated as of 1.5
557 - ss_admins int(10) default '-1',
 555+ ss_admins int default '-1',
558556
559557 -- Number of images, equivalent to SELECT COUNT(*) FROM image
560 - ss_images int(10) default '0',
 558+ ss_images int default '0',
561559
562560 UNIQUE KEY ss_row_id (ss_row_id)
563561
@@ -580,23 +578,23 @@
581579 --
582580 CREATE TABLE /*$wgDBprefix*/ipblocks (
583581 -- Primary key, introduced for privacy.
584 - ipb_id int(8) NOT NULL auto_increment,
 582+ ipb_id int NOT NULL auto_increment,
585583
586584 -- Blocked IP address in dotted-quad form or user name.
587585 ipb_address tinyblob NOT NULL,
588586
589587 -- Blocked user ID or 0 for IP blocks.
590 - ipb_user int(8) unsigned NOT NULL default '0',
 588+ ipb_user int unsigned NOT NULL default '0',
591589
592590 -- User ID who made the block.
593 - ipb_by int(8) unsigned NOT NULL default '0',
 591+ ipb_by int unsigned NOT NULL default '0',
594592
595593 -- Text comment made by blocker.
596594 ipb_reason tinyblob NOT NULL,
597595
598596 -- Creation (or refresh) date in standard YMDHMS form.
599597 -- IP blocks expire automatically.
600 - ipb_timestamp char(14) binary NOT NULL default '',
 598+ ipb_timestamp binary(14) NOT NULL default '',
601599
602600 -- Indicates that the IP address was banned because a banned
603601 -- user accessed a page through it. If this is 1, ipb_address
@@ -613,7 +611,8 @@
614612 ipb_enable_autoblock bool NOT NULL default '1',
615613
616614 -- Time at which the block will expire.
617 - ipb_expiry char(14) binary NOT NULL default '',
 615+ -- May be "infinity"
 616+ ipb_expiry varbinary(14) NOT NULL default '',
618617
619618 -- Start and end of an address range, in hexadecimal
620619 -- Size chosen to allow IPv6
@@ -647,17 +646,17 @@
648647 img_name varchar(255) binary NOT NULL default '',
649648
650649 -- File size in bytes.
651 - img_size int(8) unsigned NOT NULL default '0',
 650+ img_size int unsigned NOT NULL default '0',
652651
653652 -- For images, size in pixels.
654 - img_width int(5) NOT NULL default '0',
655 - img_height int(5) NOT NULL default '0',
 653+ img_width int NOT NULL default '0',
 654+ img_height int NOT NULL default '0',
656655
657656 -- Extracted EXIF metadata stored as a serialized PHP array.
658657 img_metadata mediumblob NOT NULL,
659658
660659 -- For images, bits per pixel if known.
661 - img_bits int(3) NOT NULL default '0',
 660+ img_bits int NOT NULL default '0',
662661
663662 -- Media type as defined by the MEDIATYPE_xxx constants
664663 img_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
@@ -670,18 +669,18 @@
671670 -- the minor parts are not required to adher to any standard
672671 -- but should be consistent throughout the database
673672 -- see http://www.iana.org/assignments/media-types/
674 - img_minor_mime varchar(32) NOT NULL default "unknown",
 673+ img_minor_mime varbinary(32) NOT NULL default "unknown",
675674
676675 -- Description field as entered by the uploader.
677676 -- This is displayed in image upload history and logs.
678677 img_description tinyblob NOT NULL,
679678
680679 -- user_id and user_name of uploader.
681 - img_user int(5) unsigned NOT NULL default '0',
 680+ img_user int unsigned NOT NULL default '0',
682681 img_user_text varchar(255) binary NOT NULL,
683682
684683 -- Time of the upload.
685 - img_timestamp char(14) binary NOT NULL default '',
 684+ img_timestamp varbinary(14) NOT NULL default '',
686685
687686 PRIMARY KEY img_name (img_name),
688687
@@ -707,14 +706,14 @@
708707 oi_archive_name varchar(255) binary NOT NULL default '',
709708
710709 -- Other fields as in image...
711 - oi_size int(8) unsigned NOT NULL default 0,
712 - oi_width int(5) NOT NULL default 0,
713 - oi_height int(5) NOT NULL default 0,
714 - oi_bits int(3) NOT NULL default 0,
 710+ oi_size int unsigned NOT NULL default 0,
 711+ oi_width int NOT NULL default 0,
 712+ oi_height int NOT NULL default 0,
 713+ oi_bits int NOT NULL default 0,
715714 oi_description tinyblob NOT NULL,
716 - oi_user int(5) unsigned NOT NULL default '0',
 715+ oi_user int unsigned NOT NULL default '0',
717716 oi_user_text varchar(255) binary NOT NULL,
718 - oi_timestamp char(14) binary NOT NULL default '',
 717+ oi_timestamp binary(14) NOT NULL default '',
719718
720719 INDEX oi_name (oi_name(10))
721720
@@ -736,36 +735,36 @@
737736 -- Which storage bin (directory tree or object store) the file data
738737 -- is stored in. Should be 'deleted' for files that have been deleted;
739738 -- any other bin is not yet in use.
740 - fa_storage_group varchar(16),
 739+ fa_storage_group varbinary(16),
741740
742741 -- SHA-1 of the file contents plus extension, used as a key for storage.
743742 -- eg 8f8a562add37052a1848ff7771a2c515db94baa9.jpg
744743 --
745744 -- If NULL, the file was missing at deletion time or has been purged
746745 -- from the archival storage.
747 - fa_storage_key varchar(64) binary default '',
 746+ fa_storage_key varbinary(64) default '',
748747
749748 -- Deletion information, if this file is deleted.
750749 fa_deleted_user int,
751 - fa_deleted_timestamp char(14) binary default '',
 750+ fa_deleted_timestamp binary(14) default '',
752751 fa_deleted_reason text,
753752
754753 -- Duped fields from image
755 - fa_size int(8) unsigned default '0',
756 - fa_width int(5) default '0',
757 - fa_height int(5) default '0',
 754+ fa_size int unsigned default '0',
 755+ fa_width int default '0',
 756+ fa_height int default '0',
758757 fa_metadata mediumblob,
759 - fa_bits int(3) default '0',
 758+ fa_bits int default '0',
760759 fa_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
761760 fa_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") default "unknown",
762 - fa_minor_mime varchar(32) default "unknown",
 761+ fa_minor_mime varbinary(32) default "unknown",
763762 fa_description tinyblob,
764 - fa_user int(5) unsigned default '0',
 763+ fa_user int unsigned default '0',
765764 fa_user_text varchar(255) binary,
766 - fa_timestamp char(14) binary default '',
 765+ fa_timestamp binary(14) default '',
767766
768767 -- Visibility of deleted revisions, bitfield
769 - fa_deleted tinyint(1) unsigned NOT NULL default '0',
 768+ fa_deleted tinyint unsigned NOT NULL default '0',
770769
771770 PRIMARY KEY (fa_id),
772771 INDEX (fa_name, fa_timestamp), -- pick out by image name
@@ -781,12 +780,12 @@
782781 -- the last few days, see Article::editUpdates()
783782 --
784783 CREATE TABLE /*$wgDBprefix*/recentchanges (
785 - rc_id int(8) NOT NULL auto_increment,
786 - rc_timestamp varchar(14) binary NOT NULL default '',
787 - rc_cur_time varchar(14) binary NOT NULL default '',
 784+ rc_id int NOT NULL auto_increment,
 785+ rc_timestamp varbinary(14) NOT NULL default '',
 786+ rc_cur_time varbinary(14) NOT NULL default '',
788787
789788 -- As in revision
790 - rc_user int(10) unsigned NOT NULL default '0',
 789+ rc_user int unsigned NOT NULL default '0',
791790 rc_user_text varchar(255) binary NOT NULL,
792791
793792 -- When pages are renamed, their RC entries do _not_ change.
@@ -795,55 +794,55 @@
796795
797796 -- as in revision...
798797 rc_comment varchar(255) binary NOT NULL default '',
799 - rc_minor tinyint(3) unsigned NOT NULL default '0',
 798+ rc_minor tinyint unsigned NOT NULL default '0',
800799
801800 -- Edits by user accounts with the 'bot' rights key are
802801 -- marked with a 1 here, and will be hidden from the
803802 -- default view.
804 - rc_bot tinyint(3) unsigned NOT NULL default '0',
 803+ rc_bot tinyint unsigned NOT NULL default '0',
805804
806 - rc_new tinyint(3) unsigned NOT NULL default '0',
 805+ rc_new tinyint unsigned NOT NULL default '0',
807806
808807 -- Key to page_id (was cur_id prior to 1.5).
809808 -- This will keep links working after moves while
810809 -- retaining the at-the-time name in the changes list.
811 - rc_cur_id int(10) unsigned NOT NULL default '0',
 810+ rc_cur_id int unsigned NOT NULL default '0',
812811
813812 -- rev_id of the given revision
814 - rc_this_oldid int(10) unsigned NOT NULL default '0',
 813+ rc_this_oldid int unsigned NOT NULL default '0',
815814
816815 -- rev_id of the prior revision, for generating diff links.
817 - rc_last_oldid int(10) unsigned NOT NULL default '0',
 816+ rc_last_oldid int unsigned NOT NULL default '0',
818817
819818 -- These may no longer be used, with the new move log.
820 - rc_type tinyint(3) unsigned NOT NULL default '0',
821 - rc_moved_to_ns tinyint(3) unsigned NOT NULL default '0',
 819+ rc_type tinyint unsigned NOT NULL default '0',
 820+ rc_moved_to_ns tinyint unsigned NOT NULL default '0',
822821 rc_moved_to_title varchar(255) binary NOT NULL default '',
823822
824823 -- If the Recent Changes Patrol option is enabled,
825824 -- users may mark edits as having been reviewed to
826825 -- remove a warning flag on the RC list.
827826 -- A value of 1 indicates the page has been reviewed.
828 - rc_patrolled tinyint(3) unsigned NOT NULL default '0',
 827+ rc_patrolled tinyint unsigned NOT NULL default '0',
829828
830829 -- Recorded IP address the edit was made from, if the
831830 -- $wgPutIPinRC option is enabled.
832 - rc_ip char(15) NOT NULL default '',
 831+ rc_ip varbinary(40) NOT NULL default '',
833832
834833 -- Text length in characters before
835834 -- and after the edit
836 - rc_old_len int(10),
837 - rc_new_len int(10),
 835+ rc_old_len int,
 836+ rc_new_len int,
838837
839838 -- Visibility of deleted revisions, bitfield
840 - rc_deleted tinyint(1) unsigned NOT NULL default '0',
 839+ rc_deleted tinyint unsigned NOT NULL default '0',
841840
842841 -- Value corresonding to log_id, specific log entries
843 - rc_logid int(10) unsigned NOT NULL default '0',
 842+ rc_logid int unsigned NOT NULL default '0',
844843 -- Store log type info here, or null
845 - rc_log_type varchar(255) binary NULL default NULL,
 844+ rc_log_type varbinary(255) NULL default NULL,
846845 -- Store log action or null
847 - rc_log_action varchar(255) binary NULL default NULL,
 846+ rc_log_action varbinary(255) NULL default NULL,
848847 -- Log params
849848 rc_params blob NOT NULL default '',
850849
@@ -860,7 +859,7 @@
861860
862861 CREATE TABLE /*$wgDBprefix*/watchlist (
863862 -- Key to user.user_id
864 - wl_user int(5) unsigned NOT NULL,
 863+ wl_user int unsigned NOT NULL,
865864
866865 -- Key to page_namespace/page_title
867866 -- Note that users may watch pages which do not exist yet,
@@ -870,7 +869,7 @@
871870
872871 -- Timestamp when user was last sent a notification e-mail;
873872 -- cleared when the user visits the page.
874 - wl_notificationtimestamp varchar(14) binary,
 873+ wl_notificationtimestamp varbinary(14),
875874
876875 UNIQUE KEY (wl_user, wl_namespace, wl_title),
877876 KEY namespace_title (wl_namespace, wl_title)
@@ -884,14 +883,14 @@
885884 --
886885 CREATE TABLE /*$wgDBprefix*/math (
887886 -- Binary MD5 hash of the latex fragment, used as an identifier key.
888 - math_inputhash varchar(16) NOT NULL,
 887+ math_inputhash varbinary(16) NOT NULL,
889888
890889 -- Not sure what this is, exactly...
891 - math_outputhash varchar(16) NOT NULL,
 890+ math_outputhash varbinary(16) NOT NULL,
892891
893892 -- texvc reports how well it thinks the HTML conversion worked;
894893 -- if it's a low level the PNG rendering may be preferred.
895 - math_html_conservativeness tinyint(1) NOT NULL,
 894+ math_html_conservativeness tinyint NOT NULL,
896895
897896 -- HTML output from texvc, if any
898897 math_html text,
@@ -913,7 +912,7 @@
914913 --
915914 CREATE TABLE /*$wgDBprefix*/searchindex (
916915 -- Key to page_id
917 - si_page int(8) unsigned NOT NULL,
 916+ si_page int unsigned NOT NULL,
918917
919918 -- Munged version of title
920919 si_title varchar(255) NOT NULL default '',
@@ -932,19 +931,19 @@
933932 --
934933 CREATE TABLE /*$wgDBprefix*/interwiki (
935934 -- The interwiki prefix, (e.g. "Meatball", or the language prefix "de")
936 - iw_prefix char(32) NOT NULL,
 935+ iw_prefix varchar(32) NOT NULL,
937936
938937 -- The URL of the wiki, with "$1" as a placeholder for an article name.
939938 -- Any spaces in the name will be transformed to underscores before
940939 -- insertion.
941 - iw_url char(127) NOT NULL,
 940+ iw_url blob NOT NULL,
942941
943942 -- A boolean value indicating whether the wiki is in this project
944943 -- (used, for example, to detect redirect loops)
945944 iw_local bool NOT NULL,
946945
947946 -- Boolean value indicating whether interwiki transclusions are allowed.
948 - iw_trans tinyint(1) NOT NULL default 0,
 947+ iw_trans tinyint NOT NULL default 0,
949948
950949 UNIQUE KEY iw_prefix (iw_prefix)
951950
@@ -955,10 +954,10 @@
956955 --
957956 CREATE TABLE /*$wgDBprefix*/querycache (
958957 -- A key name, generally the base name of of the special page.
959 - qc_type char(32) NOT NULL,
 958+ qc_type varbinary(32) NOT NULL,
960959
961960 -- Some sort of stored value. Sizes, counts...
962 - qc_value int(5) unsigned NOT NULL default '0',
 961+ qc_value int unsigned NOT NULL default '0',
963962
964963 -- Target namespace+title
965964 qc_namespace int NOT NULL default '0',
@@ -972,7 +971,7 @@
973972 -- For a few generic cache operations if not using Memcached
974973 --
975974 CREATE TABLE /*$wgDBprefix*/objectcache (
976 - keyname char(255) binary NOT NULL default '',
 975+ keyname varbinary(255) NOT NULL default '',
977976 value mediumblob,
978977 exptime datetime,
979978 UNIQUE KEY (keyname),
@@ -984,7 +983,7 @@
985984 -- Cache of interwiki transclusion
986985 --
987986 CREATE TABLE /*$wgDBprefix*/transcache (
988 - tc_url varchar(255) NOT NULL,
 987+ tc_url varbinary(255) NOT NULL,
989988 tc_contents text,
990989 tc_time int NOT NULL,
991990 UNIQUE INDEX tc_url_idx (tc_url)
@@ -994,11 +993,11 @@
995994 -- Symbolic keys for the general log type and the action type
996995 -- within the log. The output format will be controlled by the
997996 -- action field, but only the type controls categorization.
998 - log_type char(10) NOT NULL default '',
999 - log_action char(10) NOT NULL default '',
 997+ log_type varbinary(10) NOT NULL default '',
 998+ log_action varbinary(10) NOT NULL default '',
1000999
10011000 -- Timestamp. Duh.
1002 - log_timestamp char(14) NOT NULL default '19700101000000',
 1001+ log_timestamp binary(14) NOT NULL default '19700101000000',
10031002
10041003 -- The user who performed this action; key to user_id
10051004 log_user int unsigned NOT NULL default 0,
@@ -1018,7 +1017,7 @@
10191018 log_id int unsigned NOT NULL auto_increment,
10201019
10211020 -- rev_deleted for logs
1022 - log_deleted tinyint(1) unsigned NOT NULL default '0',
 1021+ log_deleted tinyint unsigned NOT NULL default '0',
10231022
10241023 PRIMARY KEY log_id (log_id),
10251024 KEY type_time (log_type, log_timestamp),
@@ -1032,7 +1031,7 @@
10331032 tb_id int auto_increment,
10341033 tb_page int REFERENCES page(page_id) ON DELETE CASCADE,
10351034 tb_title varchar(255) NOT NULL,
1036 - tb_url varchar(255) NOT NULL,
 1035+ tb_url blob NOT NULL,
10371036 tb_ex text,
10381037 tb_name varchar(255),
10391038
@@ -1043,10 +1042,11 @@
10441043
10451044 -- Jobs performed by parallel apache threads or a command-line daemon
10461045 CREATE TABLE /*$wgDBprefix*/job (
1047 - job_id int(9) unsigned NOT NULL auto_increment,
 1046+ job_id int unsigned NOT NULL auto_increment,
10481047
1049 - -- Command name, currently only refreshLinks is defined
1050 - job_cmd varchar(255) NOT NULL default '',
 1048+ -- Command name
 1049+ -- Limited to 60 to prevent key length overflow
 1050+ job_cmd varbinary(60) NOT NULL default '',
10511051
10521052 -- Namespace and title to act on
10531053 -- Should be 0 and '' if the command does not operate on a title
@@ -1067,10 +1067,10 @@
10681068
10691069 -- Special page name
10701070 -- Corresponds to a qc_type value
1071 - qci_type varchar(32) NOT NULL default '',
 1071+ qci_type varbinary(32) NOT NULL default '',
10721072
10731073 -- Timestamp of last update
1074 - qci_timestamp char(14) NOT NULL default '19700101000000',
 1074+ qci_timestamp binary(14) NOT NULL default '19700101000000',
10751075
10761076 UNIQUE KEY ( qci_type )
10771077
@@ -1079,7 +1079,7 @@
10801080 -- For each redirect, this table contains exactly one row defining its target
10811081 CREATE TABLE /*$wgDBprefix*/redirect (
10821082 -- Key to the page_id of the redirect page
1083 - rd_from int(8) unsigned NOT NULL default '0',
 1083+ rd_from int unsigned NOT NULL default '0',
10841084
10851085 -- Key to page_namespace/page_title of the target page.
10861086 -- The target page may or may not exist, and due to renames
@@ -1095,10 +1095,10 @@
10961096 -- Used for caching expensive grouped queries that need two links (for example double-redirects)
10971097 CREATE TABLE /*$wgDBprefix*/querycachetwo (
10981098 -- A key name, generally the base name of of the special page.
1099 - qcc_type char(32) NOT NULL,
 1099+ qcc_type varbinary(32) NOT NULL,
11001100
11011101 -- Some sort of stored value. Sizes, counts...
1102 - qcc_value int(5) unsigned NOT NULL default '0',
 1102+ qcc_value int unsigned NOT NULL default '0',
11031103
11041104 -- Target namespace+title
11051105 qcc_namespace int NOT NULL default '0',
@@ -1117,17 +1117,17 @@
11181118 --- Used for storing page restrictions (i.e. protection levels)
11191119 CREATE TABLE /*$wgDBprefix*/page_restrictions (
11201120 -- Page to apply restrictions to (Foreign Key to page).
1121 - pr_page int(8) NOT NULL,
 1121+ pr_page int NOT NULL,
11221122 -- The protection type (edit, move, etc)
1123 - pr_type varchar(255) NOT NULL,
 1123+ pr_type varbinary(60) NOT NULL,
11241124 -- The protection level (Sysop, autoconfirmed, etc)
1125 - pr_level varchar(255) NOT NULL,
 1125+ pr_level varbinary(60) NOT NULL,
11261126 -- Whether or not to cascade the protection down to pages transcluded.
1127 - pr_cascade tinyint(4) NOT NULL,
 1127+ pr_cascade tinyint NOT NULL,
11281128 -- Field for future support of per-user restriction.
1129 - pr_user int(8) NULL,
 1129+ pr_user int NULL,
11301130 -- Field for time-limited protection.
1131 - pr_expiry char(14) binary NULL,
 1131+ pr_expiry varbinary(14) NULL,
11321132 -- Field for an ID for this restrictions row (sort-key for Special:ProtectedPages)
11331133 pr_id int unsigned NOT NULL auto_increment,
11341134
Index: branches/REL1_10/phase3/RELEASE-NOTES
@@ -12,8 +12,10 @@
1313 * (bug 9908) Using tsearch2 with Postgres 8.1 no longer gives an error.
1414 * (bug 9973) Changed size was shown in advanced recentchanges collapsible items
1515 with $wgRCShowChangedSized = false.
 16+* Fixed installation on MyISAM or old InnoDB with charset=utf8, was giving
 17+ overlong key errors.
 18+* Fixed zero-padding issues with MySQL 5 binary schema
1619
17 -
1820 == MediaWiki 1.10.0 ==
1921
2022 May 9, 2007

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r23239* Fixed complete breakage for MySQL instances with a maximum key length of 10...tstarling18:31, 22 June 2007
r23247Converted a couple of missed fields. Reverted expansion of log_type/log_actio...tstarling20:11, 22 June 2007

Status & tagging log