diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
commit | 9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch) | |
tree | 46d1a0dee7febef5c2d57a9f7b972be16a163b3d /maintenance/archives | |
parent | 78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff) |
update to MediaWiki 1.17.0
Diffstat (limited to 'maintenance/archives')
18 files changed, 164 insertions, 7 deletions
diff --git a/maintenance/archives/patch-archive_ar_revid.sql b/maintenance/archives/patch-archive_ar_revid.sql new file mode 100644 index 00000000..67ee97b1 --- /dev/null +++ b/maintenance/archives/patch-archive_ar_revid.sql @@ -0,0 +1,4 @@ +-- Hopefully temporary index. +-- For https://bugzilla.wikimedia.org/show_bug.cgi?id=21279 +ALTER TABLE /*$wgDBprefix*/archive + ADD INDEX ar_revid ( ar_rev_id );
\ No newline at end of file diff --git a/maintenance/archives/patch-archive_kill_ar_page_revid.sql b/maintenance/archives/patch-archive_kill_ar_page_revid.sql new file mode 100644 index 00000000..2e6fe453 --- /dev/null +++ b/maintenance/archives/patch-archive_kill_ar_page_revid.sql @@ -0,0 +1,4 @@ +-- Used for killing the wrong index added during SVN for 1.17 +-- Won't affect most people, but it doesn't need to exist +ALTER TABLE /*$wgDBprefix*/archive + DROP INDEX ar_page_revid;
\ No newline at end of file diff --git a/maintenance/archives/patch-categorylinks-better-collation.sql b/maintenance/archives/patch-categorylinks-better-collation.sql new file mode 100644 index 00000000..c1499c15 --- /dev/null +++ b/maintenance/archives/patch-categorylinks-better-collation.sql @@ -0,0 +1,19 @@ +-- +-- patch-categorylinks-better-collation.sql +-- +-- Bugs 164, 1211, 23682. This is the second version of this patch; the +-- changes are also incorporated into patch-categorylinks-better-collation2.sql, +-- for the benefit of trunk users who applied the original. +-- +-- Due to bug 25254, the length limit of 255 bytes for cl_sortkey_prefix +-- is also enforced in php. If you change the length of that field, make +-- 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 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), + DROP INDEX cl_sortkey, + ADD INDEX cl_sortkey (cl_to, cl_type, cl_sortkey, cl_from); +INSERT IGNORE INTO /*$wgDBprefix*/updatelog (ul_key) VALUES ('cl_fields_update'); diff --git a/maintenance/archives/patch-categorylinks-better-collation2.sql b/maintenance/archives/patch-categorylinks-better-collation2.sql new file mode 100644 index 00000000..e9574693 --- /dev/null +++ b/maintenance/archives/patch-categorylinks-better-collation2.sql @@ -0,0 +1,12 @@ +-- +-- patch-categorylinks-better-collation2.sql +-- +-- Bugs 164, 1211, 23682. This patch exists for trunk users who already +-- applied the first patch in its original version. The first patch was +-- updated to incorporate the changes as well, so as not to do two alters on a +-- large table unnecessarily for people upgrading from 1.16, so this will be +-- skipped if unneeded. +ALTER TABLE /*$wgDBprefix*/categorylinks + CHANGE COLUMN cl_sortkey cl_sortkey varbinary(230) NOT NULL default '', + CHANGE COLUMN cl_collation cl_collation varbinary(32) NOT NULL default ''; +INSERT IGNORE INTO /*$wgDBprefix*/updatelog (ul_key) VALUES ('cl_fields_update'); diff --git a/maintenance/archives/patch-iw_api_and_wikiid.sql b/maintenance/archives/patch-iw_api_and_wikiid.sql new file mode 100644 index 00000000..4384a715 --- /dev/null +++ b/maintenance/archives/patch-iw_api_and_wikiid.sql @@ -0,0 +1,9 @@ +-- +-- Add iw_api and iw_wikiid to interwiki table +-- + +ALTER TABLE /*_*/interwiki + ADD iw_api BLOB NOT NULL; +ALTER TABLE /*_*/interwiki + ADD iw_wikiid varchar(64) NOT NULL; + diff --git a/maintenance/archives/patch-iwlinks.sql b/maintenance/archives/patch-iwlinks.sql new file mode 100644 index 00000000..89b34cb1 --- /dev/null +++ b/maintenance/archives/patch-iwlinks.sql @@ -0,0 +1,16 @@ +-- +-- Track inline interwiki links +-- +CREATE TABLE /*_*/iwlinks ( + -- page_id of the referring page + iwl_from int unsigned NOT NULL default 0, + + -- Interwiki prefix code of the target + iwl_prefix varbinary(20) NOT NULL default '', + + -- Title of the target, including namespace + iwl_title varchar(255) binary NOT NULL default '' +) /*$wgDBTableOptions*/; + +CREATE UNIQUE INDEX /*i*/iwl_from ON /*_*/iwlinks (iwl_from, iwl_prefix, iwl_title); +CREATE UNIQUE INDEX /*i*/iwl_prefix_title_from ON /*_*/iwlinks (iwl_prefix, iwl_title, iwl_from); diff --git a/maintenance/archives/patch-kill-iwl_pft.sql b/maintenance/archives/patch-kill-iwl_pft.sql new file mode 100644 index 00000000..96e14356 --- /dev/null +++ b/maintenance/archives/patch-kill-iwl_pft.sql @@ -0,0 +1,7 @@ +-- +-- Kill the old iwl_prefix_from_title index, which may be present on some +-- installs if they ran update.php between it being added and being renamed +-- + +DROP INDEX /*i*/iwl_prefix_from_title ON /*_*/iwlinks; + diff --git a/maintenance/archives/patch-kill-iwl_prefix.sql b/maintenance/archives/patch-kill-iwl_prefix.sql new file mode 100644 index 00000000..1cd9b454 --- /dev/null +++ b/maintenance/archives/patch-kill-iwl_prefix.sql @@ -0,0 +1,7 @@ +-- +-- Kill the old iwl_prefix index, which may be present on some +-- installs if they ran update.php between it being added and being renamed +-- + +DROP INDEX /*i*/iwl_prefix ON /*_*/iwlinks; + diff --git a/maintenance/archives/patch-langlinks-ll_lang-20.sql b/maintenance/archives/patch-langlinks-ll_lang-20.sql new file mode 100644 index 00000000..ce026382 --- /dev/null +++ b/maintenance/archives/patch-langlinks-ll_lang-20.sql @@ -0,0 +1,3 @@ +ALTER TABLE /*$wgDBprefix*/langlinks + MODIFY `ll_lang` + VARBINARY(20) NOT NULL DEFAULT '';
\ No newline at end of file diff --git a/maintenance/archives/patch-mime_minor_length.sql b/maintenance/archives/patch-mime_minor_length.sql index 3a3c5c4f..8b63d1f0 100644 --- a/maintenance/archives/patch-mime_minor_length.sql +++ b/maintenance/archives/patch-mime_minor_length.sql @@ -7,4 +7,4 @@ ALTER TABLE /*_*/image ALTER TABLE /*_*/oldimage MODIFY COLUMN oi_minor_mime varbinary(100) NOT NULL default "unknown"; -INSERT INTO /*_*/updatelog VALUES ('mime_minor_length');
\ No newline at end of file +INSERT INTO /*_*/updatelog(ul_key) VALUES ('mime_minor_length'); diff --git a/maintenance/archives/patch-module_deps.sql b/maintenance/archives/patch-module_deps.sql new file mode 100644 index 00000000..ffc94829 --- /dev/null +++ b/maintenance/archives/patch-module_deps.sql @@ -0,0 +1,12 @@ +-- Table for tracking which local files a module depends on that aren't +-- registered directly. +-- Currently only used for tracking images that CSS depends on +CREATE TABLE /*_*/module_deps ( + -- Module name + md_module varbinary(255) NOT NULL, + -- Skin name + md_skin varbinary(32) NOT NULL, + -- JSON blob with file dependencies + md_deps mediumblob NOT NULL +) /*$wgDBTableOptions*/; +CREATE UNIQUE INDEX /*i*/md_module_skin ON /*_*/module_deps (md_module, md_skin); diff --git a/maintenance/archives/patch-msg_resource.sql b/maintenance/archives/patch-msg_resource.sql new file mode 100644 index 00000000..f4f35339 --- /dev/null +++ b/maintenance/archives/patch-msg_resource.sql @@ -0,0 +1,20 @@ +-- Table for storing JSON message blobs for the resource loader +CREATE TABLE /*_*/msg_resource ( + -- Resource name + mr_resource varbinary(255) NOT NULL, + -- Language code + mr_lang varbinary(32) NOT NULL, + -- JSON blob. This is an incomplete JSON object, i.e. without the wrapping {} + mr_blob mediumblob NOT NULL, + -- Timestamp of last update + mr_timestamp binary(14) NOT NULL +) /*$wgDBTableOptions*/; +CREATE UNIQUE INDEX /*i*/mr_resource_lang ON /*_*/msg_resource(mr_resource, mr_lang); + +-- Table for administering which message is contained in which resource +CREATE TABLE /*_*/msg_resource_links ( + mrl_resource varbinary(255) NOT NULL, + -- Message key + mrl_message varbinary(255) NOT NULL +) /*$wgDBTableOptions*/; +CREATE UNIQUE INDEX /*i*/mrl_message_resource ON /*_*/msg_resource_links (mrl_message, mrl_resource); diff --git a/maintenance/archives/patch-profiling.sql b/maintenance/archives/patch-profiling.sql index e748ca31..29663341 100644 --- a/maintenance/archives/patch-profiling.sql +++ b/maintenance/archives/patch-profiling.sql @@ -1,11 +1,12 @@ -- profiling table -- This is optional -CREATE TABLE /*$wgDBprefix*/profiling ( +CREATE TABLE /*_*/profiling ( pf_count int NOT NULL default 0, pf_time float NOT NULL default 0, pf_memory float NOT NULL default 0, pf_name varchar(255) NOT NULL default '', - pf_server varchar(30) NOT NULL default '', - UNIQUE KEY pf_name_server (pf_name, pf_server) + pf_server varchar(30) NOT NULL default '' ) ENGINE=HEAP; + +CREATE UNIQUE INDEX /*i*/pf_name_server ON /*_*/profiling (pf_name, pf_server)
\ No newline at end of file diff --git a/maintenance/archives/patch-rename-iwl_prefix.sql b/maintenance/archives/patch-rename-iwl_prefix.sql new file mode 100644 index 00000000..4b11b36b --- /dev/null +++ b/maintenance/archives/patch-rename-iwl_prefix.sql @@ -0,0 +1,4 @@ +-- +-- Recreates the iwl_prefix index for the iwlinks table +-- +CREATE UNIQUE INDEX /*i*/iwl_prefix_title_from ON /*_*/iwlinks (iwl_prefix, iwl_title, iwl_from); diff --git a/maintenance/archives/patch-tc-timestamp.sql b/maintenance/archives/patch-tc-timestamp.sql index 4d90cf34..3f7dde41 100644 --- a/maintenance/archives/patch-tc-timestamp.sql +++ b/maintenance/archives/patch-tc-timestamp.sql @@ -1,4 +1,4 @@ ALTER TABLE /*_*/transcache MODIFY tc_time binary(14); UPDATE /*_*/transcache SET tc_time = DATE_FORMAT(FROM_UNIXTIME(tc_time), "%Y%c%d%H%i%s"); -INSERT INTO /*_*/updatelog VALUES ('convert transcache field'); +INSERT INTO /*_*/updatelog(ul_key) VALUES ('convert transcache field'); diff --git a/maintenance/archives/patch-testrun.sql b/maintenance/archives/patch-testrun.sql new file mode 100644 index 00000000..8591d81d --- /dev/null +++ b/maintenance/archives/patch-testrun.sql @@ -0,0 +1,35 @@ +-- +-- Optional tables for parserTests recording mode +-- With --record option, success data will be saved to these tables, +-- and comparisons of what's changed from the previous run will be +-- displayed at the end of each run. +-- +-- These tables currently require MySQL 5 (or maybe 4.1?) for subselects. +-- + +drop table if exists /*$wgDBprefix*/testitem; +drop table if exists /*$wgDBprefix*/testrun; + +create table /*$wgDBprefix*/testrun ( + tr_id int not null auto_increment, + + tr_date char(14) binary, + tr_mw_version blob, + tr_php_version blob, + tr_db_version blob, + tr_uname blob, + + primary key (tr_id) +) engine=InnoDB; + +create table /*$wgDBprefix*/testitem ( + ti_run int not null, + ti_name varchar(255), + ti_success bool, + + unique key (ti_run, ti_name), + key (ti_run, ti_success), + + foreign key (ti_run) references /*$wgDBprefix*/testrun(tr_id) + on delete cascade +) engine=InnoDB; diff --git a/maintenance/archives/patch-ul_value.sql b/maintenance/archives/patch-ul_value.sql new file mode 100644 index 00000000..50f4e9a8 --- /dev/null +++ b/maintenance/archives/patch-ul_value.sql @@ -0,0 +1,4 @@ +-- Add the ul_value column to updatelog + +ALTER TABLE /*_*/updatelog + add ul_value blob; diff --git a/maintenance/archives/upgradeLogging.php b/maintenance/archives/upgradeLogging.php index f79bbabc..54a82c09 100644 --- a/maintenance/archives/upgradeLogging.php +++ b/maintenance/archives/upgradeLogging.php @@ -6,7 +6,7 @@ * @ingroup MaintenanceArchive */ -require( dirname(__FILE__).'/../commandLine.inc' ); +require( dirname( __FILE__ ) . '/../commandLine.inc' ); class UpdateLogging { var $dbw; @@ -130,7 +130,7 @@ EOT; } else { $conds = array( 'log_timestamp > ' . $this->dbw->addQuotes( $copyPos ) ); } - $srcRes = $this->dbw->select( $srcTable, '*', $conds, __METHOD__, + $srcRes = $this->dbw->select( $srcTable, '*', $conds, __METHOD__, array( 'LIMIT' => $batchSize, 'ORDER BY' => 'log_timestamp' ) ); if ( ! $srcRes->numRows() ) { |