Index: branches/REL1_10/phase3/maintenance/tables.sql |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | -- |
17 | 17 | -- |
18 | 18 | -- The MySQL table backend for MediaWiki currently uses |
| 19 | +-- 14-character BINARY or VARBINARY fields to store timestamps. |
19 | 20 | -- The format is YYYYMMDDHHMMSS, which is derived from the |
20 | 21 | -- text format of MySQL's TIMESTAMP fields. |
21 | 22 | -- |
— | — | @@ -49,7 +49,7 @@ |
50 | 50 | -- tables. |
51 | 51 | -- |
52 | 52 | CREATE TABLE /*$wgDBprefix*/user ( |
53 | | - user_id int(5) unsigned NOT NULL auto_increment, |
| 53 | + user_id int unsigned NOT NULL auto_increment, |
54 | 54 | |
55 | 55 | -- Usernames must be unique, must not be in the form of |
56 | 56 | -- an IP address. _Shouldn't_ allow slashes or case |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | |
78 | 78 | -- Timestamp of the last time when a new password was |
79 | 79 | -- sent, for throttling purposes |
80 | | - user_newpass_time char(14) binary, |
| 80 | + user_newpass_time binary(14), |
81 | 81 | |
82 | 82 | -- Note: email should be restricted, not public info. |
83 | 83 | -- Same with passwords. |
— | — | @@ -90,29 +90,29 @@ |
91 | 91 | -- logs in, logs out, changes preferences, or performs |
92 | 92 | -- some other action requiring HTML cache invalidation |
93 | 93 | -- to ensure that the UI is updated. |
94 | | - user_touched char(14) binary NOT NULL default '', |
| 94 | + user_touched binary(14) NOT NULL default '', |
95 | 95 | |
96 | 96 | -- A pseudorandomly generated value that is stored in |
97 | 97 | -- a cookie when the "remember password" feature is |
98 | 98 | -- used (previously, a hash of the password was used, but |
99 | 99 | -- this was vulnerable to cookie-stealing attacks) |
100 | | - user_token char(32) binary NOT NULL default '', |
| 100 | + user_token binary(32) NOT NULL default '', |
101 | 101 | |
102 | 102 | -- Initially NULL; when a user's e-mail address has been |
103 | 103 | -- validated by returning with a mailed token, this is |
104 | 104 | -- set to the current timestamp. |
105 | | - user_email_authenticated char(14) binary, |
| 105 | + user_email_authenticated binary(14), |
106 | 106 | |
107 | 107 | -- Randomly generated token created when the e-mail address |
108 | 108 | -- is set and a confirmation test mail sent. |
109 | | - user_email_token char(32) binary, |
| 109 | + user_email_token binary(32), |
110 | 110 | |
111 | 111 | -- Expiration date for the user_email_token |
112 | | - user_email_token_expires char(14) binary, |
| 112 | + user_email_token_expires binary(14), |
113 | 113 | |
114 | 114 | -- Timestamp of account registration. |
115 | 115 | -- Accounts predating this schema addition may contain NULL. |
116 | | - user_registration char(14) binary, |
| 116 | + user_registration binary(14), |
117 | 117 | |
118 | 118 | -- Count of edits and edit-like actions. |
119 | 119 | -- |
— | — | @@ -142,7 +142,7 @@ |
143 | 143 | -- |
144 | 144 | CREATE TABLE /*$wgDBprefix*/user_groups ( |
145 | 145 | -- Key to user_id |
146 | | - ug_user int(5) unsigned NOT NULL default '0', |
| 146 | + ug_user int unsigned NOT NULL default '0', |
147 | 147 | |
148 | 148 | -- Group names are short symbolic string keys. |
149 | 149 | -- The set of group names is open-ended, though in practice |
— | — | @@ -152,7 +152,7 @@ |
153 | 153 | -- with particular permissions. A user will have the combined |
154 | 154 | -- permissions of any group they're explicitly in, plus |
155 | 155 | -- the implicit '*' and 'user' groups. |
156 | | - ug_group char(16) NOT NULL default '', |
| 156 | + ug_group varbinary(16) NOT NULL default '', |
157 | 157 | |
158 | 158 | PRIMARY KEY (ug_user,ug_group), |
159 | 159 | KEY (ug_group) |
— | — | @@ -162,10 +162,10 @@ |
163 | 163 | -- of the "you have new messages" box |
164 | 164 | CREATE TABLE /*$wgDBprefix*/user_newtalk ( |
165 | 165 | -- Key to user.user_id |
166 | | - user_id int(5) NOT NULL default '0', |
| 166 | + user_id int NOT NULL default '0', |
167 | 167 | -- If the user is an anonymous user their IP address is stored here |
168 | 168 | -- since the user_id of 0 is ambiguous |
169 | | - user_ip varchar(40) NOT NULL default '', |
| 169 | + user_ip varbinary(40) NOT NULL default '', |
170 | 170 | INDEX user_id (user_id), |
171 | 171 | INDEX user_ip (user_ip) |
172 | 172 | |
— | — | @@ -179,7 +179,7 @@ |
180 | 180 | CREATE TABLE /*$wgDBprefix*/page ( |
181 | 181 | -- Unique identifier number. The page_id will be preserved across |
182 | 182 | -- 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, |
184 | 184 | |
185 | 185 | -- A page name is broken into a namespace and a title. |
186 | 186 | -- The namespace keys are UI-language-independent constants, |
— | — | @@ -195,14 +195,14 @@ |
196 | 196 | page_restrictions tinyblob NOT NULL, |
197 | 197 | |
198 | 198 | -- 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', |
200 | 200 | |
201 | 201 | -- 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', |
203 | 203 | |
204 | 204 | -- 1 indicates this is a new entry, with only one edit. |
205 | 205 | -- 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', |
207 | 207 | |
208 | 208 | -- Random value between 0 and 1, used for Special:Randompage |
209 | 209 | page_random real unsigned NOT NULL, |
— | — | @@ -212,15 +212,15 @@ |
213 | 213 | -- Aside from editing this includes permission changes, |
214 | 214 | -- creation or deletion of linked pages, and alteration |
215 | 215 | -- of contained templates. |
216 | | - page_touched char(14) binary NOT NULL default '', |
| 216 | + page_touched binary(14) NOT NULL default '', |
217 | 217 | |
218 | 218 | -- Handy key to revision.rev_id of the current revision. |
219 | 219 | -- This may be 0 during page creation, but that shouldn't |
220 | 220 | -- happen outside of a transaction... hopefully. |
221 | | - page_latest int(8) unsigned NOT NULL, |
| 221 | + page_latest int unsigned NOT NULL, |
222 | 222 | |
223 | 223 | -- 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, |
225 | 225 | |
226 | 226 | PRIMARY KEY page_id (page_id), |
227 | 227 | UNIQUE INDEX name_title (page_namespace,page_title), |
— | — | @@ -237,16 +237,16 @@ |
238 | 238 | -- to the text storage backend. |
239 | 239 | -- |
240 | 240 | CREATE TABLE /*$wgDBprefix*/revision ( |
241 | | - rev_id int(8) unsigned NOT NULL auto_increment, |
| 241 | + rev_id int unsigned NOT NULL auto_increment, |
242 | 242 | |
243 | 243 | -- Key to page_id. This should _never_ be invalid. |
244 | | - rev_page int(8) unsigned NOT NULL, |
| 244 | + rev_page int unsigned NOT NULL, |
245 | 245 | |
246 | 246 | -- Key to text.old_id, where the actual bulk text is stored. |
247 | 247 | -- It's possible for multiple revisions to use the same text, |
248 | 248 | -- for instance revisions where only metadata is altered |
249 | 249 | -- or a rollback to a previous version. |
250 | | - rev_text_id int(8) unsigned NOT NULL, |
| 250 | + rev_text_id int unsigned NOT NULL, |
251 | 251 | |
252 | 252 | -- Text comment summarizing the change. |
253 | 253 | -- This text is shown in the history and other changes lists, |
— | — | @@ -255,27 +255,27 @@ |
256 | 256 | |
257 | 257 | -- Key to user.user_id of the user who made this edit. |
258 | 258 | -- 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', |
260 | 260 | |
261 | 261 | -- Text username or IP address of the editor. |
262 | 262 | rev_user_text varchar(255) binary NOT NULL default '', |
263 | 263 | |
264 | 264 | -- Timestamp |
265 | | - rev_timestamp char(14) binary NOT NULL default '', |
| 265 | + rev_timestamp binary(14) NOT NULL default '', |
266 | 266 | |
267 | 267 | -- Records whether the user marked the 'minor edit' checkbox. |
268 | 268 | -- 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', |
270 | 270 | |
271 | 271 | -- 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', |
273 | 273 | |
274 | 274 | -- Length of this revision in bytes |
275 | | - rev_len int(8) unsigned, |
| 275 | + rev_len int unsigned, |
276 | 276 | |
277 | 277 | -- Key to revision.rev_id |
278 | 278 | -- 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, |
280 | 280 | |
281 | 281 | PRIMARY KEY rev_page_id (rev_page, rev_id), |
282 | 282 | UNIQUE INDEX rev_id (rev_id), |
— | — | @@ -301,7 +301,7 @@ |
302 | 302 | -- refer to this number anymore, but to rev_id. |
303 | 303 | -- |
304 | 304 | -- 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, |
306 | 306 | |
307 | 307 | -- Depending on the contents of the old_flags field, the text |
308 | 308 | -- may be convenient plain text, or it may be funkily encoded. |
— | — | @@ -343,10 +343,10 @@ |
344 | 344 | |
345 | 345 | -- Basic revision stuff... |
346 | 346 | ar_comment tinyblob NOT NULL, |
347 | | - ar_user int(5) unsigned NOT NULL default '0', |
| 347 | + ar_user int unsigned NOT NULL default '0', |
348 | 348 | 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', |
351 | 351 | |
352 | 352 | -- See ar_text note. |
353 | 353 | ar_flags tinyblob NOT NULL, |
— | — | @@ -358,7 +358,7 @@ |
359 | 359 | -- |
360 | 360 | -- Old entries from 1.4 will be NULL here, and a new rev_id will |
361 | 361 | -- be created on undeletion for those revisions. |
362 | | - ar_rev_id int(8) unsigned, |
| 362 | + ar_rev_id int unsigned, |
363 | 363 | |
364 | 364 | -- For newly deleted revisions, this is the text.old_id key to the |
365 | 365 | -- actual stored text. To avoid breaking the block-compression scheme |
— | — | @@ -369,13 +369,13 @@ |
370 | 370 | -- Old entries deleted under 1.2-1.4 will have NULL here, and their |
371 | 371 | -- ar_text and ar_flags fields will be used to create a new text |
372 | 372 | -- row upon undeletion. |
373 | | - ar_text_id int(8) unsigned, |
| 373 | + ar_text_id int unsigned, |
374 | 374 | |
375 | 375 | -- rev_deleted for archives |
376 | | - ar_deleted tinyint(1) unsigned NOT NULL default '0', |
| 376 | + ar_deleted tinyint unsigned NOT NULL default '0', |
377 | 377 | |
378 | 378 | -- Length of this revision in bytes |
379 | | - ar_len int(8) unsigned, |
| 379 | + ar_len int unsigned, |
380 | 380 | |
381 | 381 | KEY name_title_timestamp (ar_namespace,ar_title,ar_timestamp) |
382 | 382 | |
— | — | @@ -387,7 +387,7 @@ |
388 | 388 | -- |
389 | 389 | CREATE TABLE /*$wgDBprefix*/pagelinks ( |
390 | 390 | -- 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', |
392 | 392 | |
393 | 393 | -- Key to page_namespace/page_title of the target page. |
394 | 394 | -- The target page may or may not exist, and due to renames |
— | — | @@ -407,7 +407,7 @@ |
408 | 408 | -- |
409 | 409 | CREATE TABLE /*$wgDBprefix*/templatelinks ( |
410 | 410 | -- 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', |
412 | 412 | |
413 | 413 | -- Key to page_namespace/page_title of the target page. |
414 | 414 | -- The target page may or may not exist, and due to renames |
— | — | @@ -428,7 +428,7 @@ |
429 | 429 | -- |
430 | 430 | CREATE TABLE /*$wgDBprefix*/imagelinks ( |
431 | 431 | -- 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', |
433 | 433 | |
434 | 434 | -- Filename of target image. |
435 | 435 | -- This is also the page_title of the file's description page; |
— | — | @@ -447,7 +447,7 @@ |
448 | 448 | -- |
449 | 449 | CREATE TABLE /*$wgDBprefix*/categorylinks ( |
450 | 450 | -- 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', |
452 | 452 | |
453 | 453 | -- Name of the category. |
454 | 454 | -- This is also the page_title of the category's description page; |
— | — | @@ -460,11 +460,9 @@ |
461 | 461 | -- and dangerous new world in MySQL... The sortkey is updated |
462 | 462 | -- if no override exists and cl_from is renamed. |
463 | 463 | -- |
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 '', |
469 | 467 | |
470 | 468 | -- This isn't really used at present. Provided for an optional |
471 | 469 | -- sorting method by approximate addition time. |
— | — | @@ -485,7 +483,7 @@ |
486 | 484 | -- |
487 | 485 | CREATE TABLE /*$wgDBprefix*/externallinks ( |
488 | 486 | -- 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', |
490 | 488 | |
491 | 489 | -- The URL |
492 | 490 | el_to blob NOT NULL, |
— | — | @@ -513,10 +511,10 @@ |
514 | 512 | -- |
515 | 513 | CREATE TABLE /*$wgDBprefix*/langlinks ( |
516 | 514 | -- 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', |
518 | 516 | |
519 | 517 | -- Language code of the target |
520 | | - ll_lang varchar(10) binary NOT NULL default '', |
| 518 | + ll_lang varbinary(20) NOT NULL default '', |
521 | 519 | |
522 | 520 | -- Title of the target, including namespace |
523 | 521 | ll_title varchar(255) binary NOT NULL default '', |
— | — | @@ -531,32 +529,32 @@ |
532 | 530 | -- |
533 | 531 | CREATE TABLE /*$wgDBprefix*/site_stats ( |
534 | 532 | -- The single row should contain 1 here. |
535 | | - ss_row_id int(8) unsigned NOT NULL, |
| 533 | + ss_row_id int unsigned NOT NULL, |
536 | 534 | |
537 | 535 | -- 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', |
539 | 537 | |
540 | 538 | -- Total number of edits performed. |
541 | | - ss_total_edits bigint(20) unsigned default '0', |
| 539 | + ss_total_edits bigint unsigned default '0', |
542 | 540 | |
543 | 541 | -- An approximate count of pages matching the following criteria: |
544 | 542 | -- * in namespace 0 |
545 | 543 | -- * not a redirect |
546 | 544 | -- * contains the text '[[' |
547 | 545 | -- See Article::isCountable() in includes/Article.php |
548 | | - ss_good_articles bigint(20) unsigned default '0', |
| 546 | + ss_good_articles bigint unsigned default '0', |
549 | 547 | |
550 | 548 | -- 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', |
552 | 550 | |
553 | 551 | -- Number of users, theoretically equal to SELECT COUNT(*) FROM user; |
554 | | - ss_users bigint(20) default '-1', |
| 552 | + ss_users bigint default '-1', |
555 | 553 | |
556 | 554 | -- Deprecated, no longer updated as of 1.5 |
557 | | - ss_admins int(10) default '-1', |
| 555 | + ss_admins int default '-1', |
558 | 556 | |
559 | 557 | -- Number of images, equivalent to SELECT COUNT(*) FROM image |
560 | | - ss_images int(10) default '0', |
| 558 | + ss_images int default '0', |
561 | 559 | |
562 | 560 | UNIQUE KEY ss_row_id (ss_row_id) |
563 | 561 | |
— | — | @@ -580,23 +578,23 @@ |
581 | 579 | -- |
582 | 580 | CREATE TABLE /*$wgDBprefix*/ipblocks ( |
583 | 581 | -- Primary key, introduced for privacy. |
584 | | - ipb_id int(8) NOT NULL auto_increment, |
| 582 | + ipb_id int NOT NULL auto_increment, |
585 | 583 | |
586 | 584 | -- Blocked IP address in dotted-quad form or user name. |
587 | 585 | ipb_address tinyblob NOT NULL, |
588 | 586 | |
589 | 587 | -- 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', |
591 | 589 | |
592 | 590 | -- 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', |
594 | 592 | |
595 | 593 | -- Text comment made by blocker. |
596 | 594 | ipb_reason tinyblob NOT NULL, |
597 | 595 | |
598 | 596 | -- Creation (or refresh) date in standard YMDHMS form. |
599 | 597 | -- IP blocks expire automatically. |
600 | | - ipb_timestamp char(14) binary NOT NULL default '', |
| 598 | + ipb_timestamp binary(14) NOT NULL default '', |
601 | 599 | |
602 | 600 | -- Indicates that the IP address was banned because a banned |
603 | 601 | -- user accessed a page through it. If this is 1, ipb_address |
— | — | @@ -613,7 +611,8 @@ |
614 | 612 | ipb_enable_autoblock bool NOT NULL default '1', |
615 | 613 | |
616 | 614 | -- 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 '', |
618 | 617 | |
619 | 618 | -- Start and end of an address range, in hexadecimal |
620 | 619 | -- Size chosen to allow IPv6 |
— | — | @@ -647,17 +646,17 @@ |
648 | 647 | img_name varchar(255) binary NOT NULL default '', |
649 | 648 | |
650 | 649 | -- File size in bytes. |
651 | | - img_size int(8) unsigned NOT NULL default '0', |
| 650 | + img_size int unsigned NOT NULL default '0', |
652 | 651 | |
653 | 652 | -- 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', |
656 | 655 | |
657 | 656 | -- Extracted EXIF metadata stored as a serialized PHP array. |
658 | 657 | img_metadata mediumblob NOT NULL, |
659 | 658 | |
660 | 659 | -- For images, bits per pixel if known. |
661 | | - img_bits int(3) NOT NULL default '0', |
| 660 | + img_bits int NOT NULL default '0', |
662 | 661 | |
663 | 662 | -- Media type as defined by the MEDIATYPE_xxx constants |
664 | 663 | img_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, |
— | — | @@ -670,18 +669,18 @@ |
671 | 670 | -- the minor parts are not required to adher to any standard |
672 | 671 | -- but should be consistent throughout the database |
673 | 672 | -- 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", |
675 | 674 | |
676 | 675 | -- Description field as entered by the uploader. |
677 | 676 | -- This is displayed in image upload history and logs. |
678 | 677 | img_description tinyblob NOT NULL, |
679 | 678 | |
680 | 679 | -- 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', |
682 | 681 | img_user_text varchar(255) binary NOT NULL, |
683 | 682 | |
684 | 683 | -- Time of the upload. |
685 | | - img_timestamp char(14) binary NOT NULL default '', |
| 684 | + img_timestamp varbinary(14) NOT NULL default '', |
686 | 685 | |
687 | 686 | PRIMARY KEY img_name (img_name), |
688 | 687 | |
— | — | @@ -707,14 +706,14 @@ |
708 | 707 | oi_archive_name varchar(255) binary NOT NULL default '', |
709 | 708 | |
710 | 709 | -- 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, |
715 | 714 | oi_description tinyblob NOT NULL, |
716 | | - oi_user int(5) unsigned NOT NULL default '0', |
| 715 | + oi_user int unsigned NOT NULL default '0', |
717 | 716 | 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 '', |
719 | 718 | |
720 | 719 | INDEX oi_name (oi_name(10)) |
721 | 720 | |
— | — | @@ -736,36 +735,36 @@ |
737 | 736 | -- Which storage bin (directory tree or object store) the file data |
738 | 737 | -- is stored in. Should be 'deleted' for files that have been deleted; |
739 | 738 | -- any other bin is not yet in use. |
740 | | - fa_storage_group varchar(16), |
| 739 | + fa_storage_group varbinary(16), |
741 | 740 | |
742 | 741 | -- SHA-1 of the file contents plus extension, used as a key for storage. |
743 | 742 | -- eg 8f8a562add37052a1848ff7771a2c515db94baa9.jpg |
744 | 743 | -- |
745 | 744 | -- If NULL, the file was missing at deletion time or has been purged |
746 | 745 | -- from the archival storage. |
747 | | - fa_storage_key varchar(64) binary default '', |
| 746 | + fa_storage_key varbinary(64) default '', |
748 | 747 | |
749 | 748 | -- Deletion information, if this file is deleted. |
750 | 749 | fa_deleted_user int, |
751 | | - fa_deleted_timestamp char(14) binary default '', |
| 750 | + fa_deleted_timestamp binary(14) default '', |
752 | 751 | fa_deleted_reason text, |
753 | 752 | |
754 | 753 | -- 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', |
758 | 757 | fa_metadata mediumblob, |
759 | | - fa_bits int(3) default '0', |
| 758 | + fa_bits int default '0', |
760 | 759 | fa_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, |
761 | 760 | 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", |
763 | 762 | fa_description tinyblob, |
764 | | - fa_user int(5) unsigned default '0', |
| 763 | + fa_user int unsigned default '0', |
765 | 764 | fa_user_text varchar(255) binary, |
766 | | - fa_timestamp char(14) binary default '', |
| 765 | + fa_timestamp binary(14) default '', |
767 | 766 | |
768 | 767 | -- Visibility of deleted revisions, bitfield |
769 | | - fa_deleted tinyint(1) unsigned NOT NULL default '0', |
| 768 | + fa_deleted tinyint unsigned NOT NULL default '0', |
770 | 769 | |
771 | 770 | PRIMARY KEY (fa_id), |
772 | 771 | INDEX (fa_name, fa_timestamp), -- pick out by image name |
— | — | @@ -781,12 +780,12 @@ |
782 | 781 | -- the last few days, see Article::editUpdates() |
783 | 782 | -- |
784 | 783 | 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 '', |
788 | 787 | |
789 | 788 | -- As in revision |
790 | | - rc_user int(10) unsigned NOT NULL default '0', |
| 789 | + rc_user int unsigned NOT NULL default '0', |
791 | 790 | rc_user_text varchar(255) binary NOT NULL, |
792 | 791 | |
793 | 792 | -- When pages are renamed, their RC entries do _not_ change. |
— | — | @@ -795,55 +794,55 @@ |
796 | 795 | |
797 | 796 | -- as in revision... |
798 | 797 | 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', |
800 | 799 | |
801 | 800 | -- Edits by user accounts with the 'bot' rights key are |
802 | 801 | -- marked with a 1 here, and will be hidden from the |
803 | 802 | -- default view. |
804 | | - rc_bot tinyint(3) unsigned NOT NULL default '0', |
| 803 | + rc_bot tinyint unsigned NOT NULL default '0', |
805 | 804 | |
806 | | - rc_new tinyint(3) unsigned NOT NULL default '0', |
| 805 | + rc_new tinyint unsigned NOT NULL default '0', |
807 | 806 | |
808 | 807 | -- Key to page_id (was cur_id prior to 1.5). |
809 | 808 | -- This will keep links working after moves while |
810 | 809 | -- 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', |
812 | 811 | |
813 | 812 | -- 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', |
815 | 814 | |
816 | 815 | -- 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', |
818 | 817 | |
819 | 818 | -- 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', |
822 | 821 | rc_moved_to_title varchar(255) binary NOT NULL default '', |
823 | 822 | |
824 | 823 | -- If the Recent Changes Patrol option is enabled, |
825 | 824 | -- users may mark edits as having been reviewed to |
826 | 825 | -- remove a warning flag on the RC list. |
827 | 826 | -- 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', |
829 | 828 | |
830 | 829 | -- Recorded IP address the edit was made from, if the |
831 | 830 | -- $wgPutIPinRC option is enabled. |
832 | | - rc_ip char(15) NOT NULL default '', |
| 831 | + rc_ip varbinary(40) NOT NULL default '', |
833 | 832 | |
834 | 833 | -- Text length in characters before |
835 | 834 | -- 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, |
838 | 837 | |
839 | 838 | -- Visibility of deleted revisions, bitfield |
840 | | - rc_deleted tinyint(1) unsigned NOT NULL default '0', |
| 839 | + rc_deleted tinyint unsigned NOT NULL default '0', |
841 | 840 | |
842 | 841 | -- 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', |
844 | 843 | -- 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, |
846 | 845 | -- Store log action or null |
847 | | - rc_log_action varchar(255) binary NULL default NULL, |
| 846 | + rc_log_action varbinary(255) NULL default NULL, |
848 | 847 | -- Log params |
849 | 848 | rc_params blob NOT NULL default '', |
850 | 849 | |
— | — | @@ -860,7 +859,7 @@ |
861 | 860 | |
862 | 861 | CREATE TABLE /*$wgDBprefix*/watchlist ( |
863 | 862 | -- Key to user.user_id |
864 | | - wl_user int(5) unsigned NOT NULL, |
| 863 | + wl_user int unsigned NOT NULL, |
865 | 864 | |
866 | 865 | -- Key to page_namespace/page_title |
867 | 866 | -- Note that users may watch pages which do not exist yet, |
— | — | @@ -870,7 +869,7 @@ |
871 | 870 | |
872 | 871 | -- Timestamp when user was last sent a notification e-mail; |
873 | 872 | -- cleared when the user visits the page. |
874 | | - wl_notificationtimestamp varchar(14) binary, |
| 873 | + wl_notificationtimestamp varbinary(14), |
875 | 874 | |
876 | 875 | UNIQUE KEY (wl_user, wl_namespace, wl_title), |
877 | 876 | KEY namespace_title (wl_namespace, wl_title) |
— | — | @@ -884,14 +883,14 @@ |
885 | 884 | -- |
886 | 885 | CREATE TABLE /*$wgDBprefix*/math ( |
887 | 886 | -- 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, |
889 | 888 | |
890 | 889 | -- Not sure what this is, exactly... |
891 | | - math_outputhash varchar(16) NOT NULL, |
| 890 | + math_outputhash varbinary(16) NOT NULL, |
892 | 891 | |
893 | 892 | -- texvc reports how well it thinks the HTML conversion worked; |
894 | 893 | -- 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, |
896 | 895 | |
897 | 896 | -- HTML output from texvc, if any |
898 | 897 | math_html text, |
— | — | @@ -913,7 +912,7 @@ |
914 | 913 | -- |
915 | 914 | CREATE TABLE /*$wgDBprefix*/searchindex ( |
916 | 915 | -- Key to page_id |
917 | | - si_page int(8) unsigned NOT NULL, |
| 916 | + si_page int unsigned NOT NULL, |
918 | 917 | |
919 | 918 | -- Munged version of title |
920 | 919 | si_title varchar(255) NOT NULL default '', |
— | — | @@ -932,19 +931,19 @@ |
933 | 932 | -- |
934 | 933 | CREATE TABLE /*$wgDBprefix*/interwiki ( |
935 | 934 | -- 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, |
937 | 936 | |
938 | 937 | -- The URL of the wiki, with "$1" as a placeholder for an article name. |
939 | 938 | -- Any spaces in the name will be transformed to underscores before |
940 | 939 | -- insertion. |
941 | | - iw_url char(127) NOT NULL, |
| 940 | + iw_url blob NOT NULL, |
942 | 941 | |
943 | 942 | -- A boolean value indicating whether the wiki is in this project |
944 | 943 | -- (used, for example, to detect redirect loops) |
945 | 944 | iw_local bool NOT NULL, |
946 | 945 | |
947 | 946 | -- 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, |
949 | 948 | |
950 | 949 | UNIQUE KEY iw_prefix (iw_prefix) |
951 | 950 | |
— | — | @@ -955,10 +954,10 @@ |
956 | 955 | -- |
957 | 956 | CREATE TABLE /*$wgDBprefix*/querycache ( |
958 | 957 | -- 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, |
960 | 959 | |
961 | 960 | -- 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', |
963 | 962 | |
964 | 963 | -- Target namespace+title |
965 | 964 | qc_namespace int NOT NULL default '0', |
— | — | @@ -972,7 +971,7 @@ |
973 | 972 | -- For a few generic cache operations if not using Memcached |
974 | 973 | -- |
975 | 974 | CREATE TABLE /*$wgDBprefix*/objectcache ( |
976 | | - keyname char(255) binary NOT NULL default '', |
| 975 | + keyname varbinary(255) NOT NULL default '', |
977 | 976 | value mediumblob, |
978 | 977 | exptime datetime, |
979 | 978 | UNIQUE KEY (keyname), |
— | — | @@ -984,7 +983,7 @@ |
985 | 984 | -- Cache of interwiki transclusion |
986 | 985 | -- |
987 | 986 | CREATE TABLE /*$wgDBprefix*/transcache ( |
988 | | - tc_url varchar(255) NOT NULL, |
| 987 | + tc_url varbinary(255) NOT NULL, |
989 | 988 | tc_contents text, |
990 | 989 | tc_time int NOT NULL, |
991 | 990 | UNIQUE INDEX tc_url_idx (tc_url) |
— | — | @@ -994,11 +993,11 @@ |
995 | 994 | -- Symbolic keys for the general log type and the action type |
996 | 995 | -- within the log. The output format will be controlled by the |
997 | 996 | -- 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 '', |
1000 | 999 | |
1001 | 1000 | -- Timestamp. Duh. |
1002 | | - log_timestamp char(14) NOT NULL default '19700101000000', |
| 1001 | + log_timestamp binary(14) NOT NULL default '19700101000000', |
1003 | 1002 | |
1004 | 1003 | -- The user who performed this action; key to user_id |
1005 | 1004 | log_user int unsigned NOT NULL default 0, |
— | — | @@ -1018,7 +1017,7 @@ |
1019 | 1018 | log_id int unsigned NOT NULL auto_increment, |
1020 | 1019 | |
1021 | 1020 | -- rev_deleted for logs |
1022 | | - log_deleted tinyint(1) unsigned NOT NULL default '0', |
| 1021 | + log_deleted tinyint unsigned NOT NULL default '0', |
1023 | 1022 | |
1024 | 1023 | PRIMARY KEY log_id (log_id), |
1025 | 1024 | KEY type_time (log_type, log_timestamp), |
— | — | @@ -1032,7 +1031,7 @@ |
1033 | 1032 | tb_id int auto_increment, |
1034 | 1033 | tb_page int REFERENCES page(page_id) ON DELETE CASCADE, |
1035 | 1034 | tb_title varchar(255) NOT NULL, |
1036 | | - tb_url varchar(255) NOT NULL, |
| 1035 | + tb_url blob NOT NULL, |
1037 | 1036 | tb_ex text, |
1038 | 1037 | tb_name varchar(255), |
1039 | 1038 | |
— | — | @@ -1043,10 +1042,11 @@ |
1044 | 1043 | |
1045 | 1044 | -- Jobs performed by parallel apache threads or a command-line daemon |
1046 | 1045 | CREATE TABLE /*$wgDBprefix*/job ( |
1047 | | - job_id int(9) unsigned NOT NULL auto_increment, |
| 1046 | + job_id int unsigned NOT NULL auto_increment, |
1048 | 1047 | |
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 '', |
1051 | 1051 | |
1052 | 1052 | -- Namespace and title to act on |
1053 | 1053 | -- Should be 0 and '' if the command does not operate on a title |
— | — | @@ -1067,10 +1067,10 @@ |
1068 | 1068 | |
1069 | 1069 | -- Special page name |
1070 | 1070 | -- Corresponds to a qc_type value |
1071 | | - qci_type varchar(32) NOT NULL default '', |
| 1071 | + qci_type varbinary(32) NOT NULL default '', |
1072 | 1072 | |
1073 | 1073 | -- Timestamp of last update |
1074 | | - qci_timestamp char(14) NOT NULL default '19700101000000', |
| 1074 | + qci_timestamp binary(14) NOT NULL default '19700101000000', |
1075 | 1075 | |
1076 | 1076 | UNIQUE KEY ( qci_type ) |
1077 | 1077 | |
— | — | @@ -1079,7 +1079,7 @@ |
1080 | 1080 | -- For each redirect, this table contains exactly one row defining its target |
1081 | 1081 | CREATE TABLE /*$wgDBprefix*/redirect ( |
1082 | 1082 | -- 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', |
1084 | 1084 | |
1085 | 1085 | -- Key to page_namespace/page_title of the target page. |
1086 | 1086 | -- The target page may or may not exist, and due to renames |
— | — | @@ -1095,10 +1095,10 @@ |
1096 | 1096 | -- Used for caching expensive grouped queries that need two links (for example double-redirects) |
1097 | 1097 | CREATE TABLE /*$wgDBprefix*/querycachetwo ( |
1098 | 1098 | -- 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, |
1100 | 1100 | |
1101 | 1101 | -- 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', |
1103 | 1103 | |
1104 | 1104 | -- Target namespace+title |
1105 | 1105 | qcc_namespace int NOT NULL default '0', |
— | — | @@ -1117,17 +1117,17 @@ |
1118 | 1118 | --- Used for storing page restrictions (i.e. protection levels) |
1119 | 1119 | CREATE TABLE /*$wgDBprefix*/page_restrictions ( |
1120 | 1120 | -- Page to apply restrictions to (Foreign Key to page). |
1121 | | - pr_page int(8) NOT NULL, |
| 1121 | + pr_page int NOT NULL, |
1122 | 1122 | -- The protection type (edit, move, etc) |
1123 | | - pr_type varchar(255) NOT NULL, |
| 1123 | + pr_type varbinary(60) NOT NULL, |
1124 | 1124 | -- The protection level (Sysop, autoconfirmed, etc) |
1125 | | - pr_level varchar(255) NOT NULL, |
| 1125 | + pr_level varbinary(60) NOT NULL, |
1126 | 1126 | -- Whether or not to cascade the protection down to pages transcluded. |
1127 | | - pr_cascade tinyint(4) NOT NULL, |
| 1127 | + pr_cascade tinyint NOT NULL, |
1128 | 1128 | -- Field for future support of per-user restriction. |
1129 | | - pr_user int(8) NULL, |
| 1129 | + pr_user int NULL, |
1130 | 1130 | -- Field for time-limited protection. |
1131 | | - pr_expiry char(14) binary NULL, |
| 1131 | + pr_expiry varbinary(14) NULL, |
1132 | 1132 | -- Field for an ID for this restrictions row (sort-key for Special:ProtectedPages) |
1133 | 1133 | pr_id int unsigned NOT NULL auto_increment, |
1134 | 1134 | |
Index: branches/REL1_10/phase3/RELEASE-NOTES |
— | — | @@ -12,8 +12,10 @@ |
13 | 13 | * (bug 9908) Using tsearch2 with Postgres 8.1 no longer gives an error. |
14 | 14 | * (bug 9973) Changed size was shown in advanced recentchanges collapsible items |
15 | 15 | 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 |
16 | 19 | |
17 | | - |
18 | 20 | == MediaWiki 1.10.0 == |
19 | 21 | |
20 | 22 | May 9, 2007 |