From ca32f08966f1b51fcb19460f0996bb0c4048e6fe Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 3 Dec 2011 13:29:22 +0100 Subject: Update to MediaWiki 1.18.0 * also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing --- maintenance/archives/patch-archive_ar_revid.sql | 3 +- maintenance/archives/patch-image_reditects.sql | 0 maintenance/archives/patch-math.sql | 28 ------------- .../archives/patch-page_no_title_convert.sql | 0 maintenance/archives/patch-profiling.sql | 2 +- maintenance/archives/patch-up_property.sql | 4 ++ maintenance/archives/patch-uploadstash.sql | 49 ++++++++++++++++++++++ .../archives/patch-user-newtalk-timestamp-null.sql | 1 + maintenance/archives/patch-user_email_index.sql | 1 + maintenance/archives/patch-user_former_groups.sql | 9 ++++ maintenance/archives/patch-user_last_timestamp.sql | 2 +- maintenance/archives/upgradeLogging.php | 21 +++++++++- 12 files changed, 87 insertions(+), 33 deletions(-) delete mode 100644 maintenance/archives/patch-image_reditects.sql delete mode 100644 maintenance/archives/patch-math.sql delete mode 100644 maintenance/archives/patch-page_no_title_convert.sql create mode 100644 maintenance/archives/patch-up_property.sql create mode 100644 maintenance/archives/patch-uploadstash.sql create mode 100644 maintenance/archives/patch-user-newtalk-timestamp-null.sql create mode 100644 maintenance/archives/patch-user_email_index.sql create mode 100644 maintenance/archives/patch-user_former_groups.sql (limited to 'maintenance/archives') diff --git a/maintenance/archives/patch-archive_ar_revid.sql b/maintenance/archives/patch-archive_ar_revid.sql index 67ee97b1..3b3fdee6 100644 --- a/maintenance/archives/patch-archive_ar_revid.sql +++ b/maintenance/archives/patch-archive_ar_revid.sql @@ -1,4 +1,3 @@ -- 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 +CREATE INDEX /*i*/ar_revid ON /*$wgDBprefix*/archive ( ar_rev_id ); \ No newline at end of file diff --git a/maintenance/archives/patch-image_reditects.sql b/maintenance/archives/patch-image_reditects.sql deleted file mode 100644 index e69de29b..00000000 diff --git a/maintenance/archives/patch-math.sql b/maintenance/archives/patch-math.sql deleted file mode 100644 index 1d4b90e1..00000000 --- a/maintenance/archives/patch-math.sql +++ /dev/null @@ -1,28 +0,0 @@ --- Creates table math used for caching TeX blocks. Needs to be run --- on old installations when adding TeX support (2002-12-26) --- Or, TeX can be disabled via $wgUseTeX=false in LocalSettings.php - --- Note: math table has changed, and this script needs to be run again --- to create it. (2003-02-02) - -DROP TABLE IF EXISTS /*$wgDBprefix*/math; -CREATE TABLE /*$wgDBprefix*/math ( - -- Binary MD5 hash of the latex fragment, used as an identifier key. - math_inputhash varbinary(16) NOT NULL, - - -- Not sure what this is, exactly... - math_outputhash varbinary(16) NOT NULL, - - -- texvc reports how well it thinks the HTML conversion worked; - -- if it's a low level the PNG rendering may be preferred. - math_html_conservativeness tinyint NOT NULL, - - -- HTML output from texvc, if any - math_html text, - - -- MathML output from texvc, if any - math_mathml text, - - UNIQUE KEY math_inputhash (math_inputhash) - -) /*$wgDBTableOptions*/; diff --git a/maintenance/archives/patch-page_no_title_convert.sql b/maintenance/archives/patch-page_no_title_convert.sql deleted file mode 100644 index e69de29b..00000000 diff --git a/maintenance/archives/patch-profiling.sql b/maintenance/archives/patch-profiling.sql index 29663341..0a0e4e1a 100644 --- a/maintenance/archives/patch-profiling.sql +++ b/maintenance/archives/patch-profiling.sql @@ -9,4 +9,4 @@ CREATE TABLE /*_*/profiling ( 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 +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-up_property.sql b/maintenance/archives/patch-up_property.sql new file mode 100644 index 00000000..742841e4 --- /dev/null +++ b/maintenance/archives/patch-up_property.sql @@ -0,0 +1,4 @@ +-- Increase the length of up_property from 32 -> 255 bytes. Bug 19408 + +ALTER TABLE /*_*/user_properties + MODIFY up_property varbinary(255); diff --git a/maintenance/archives/patch-uploadstash.sql b/maintenance/archives/patch-uploadstash.sql new file mode 100644 index 00000000..2512076f --- /dev/null +++ b/maintenance/archives/patch-uploadstash.sql @@ -0,0 +1,49 @@ +-- +-- Store information about newly uploaded files before they're +-- moved into the actual filestore +-- +CREATE TABLE /*_*/uploadstash ( + us_id int unsigned NOT NULL PRIMARY KEY auto_increment, + + -- the user who uploaded the file. + us_user int unsigned NOT NULL, + + -- file key. this is how applications actually search for the file. + -- this might go away, or become the primary key. + us_key varchar(255) NOT NULL, + + -- the original path + us_orig_path varchar(255) NOT NULL, + + -- the temporary path at which the file is actually stored + us_path varchar(255) NOT NULL, + + -- which type of upload the file came from (sometimes) + us_source_type varchar(50), + + -- the date/time on which the file was added + us_timestamp varbinary(14) not null, + + us_status varchar(50) not null, + + -- file properties from File::getPropsFromPath. these may prove unnecessary. + -- + us_size int unsigned NOT NULL, + -- this hash comes from File::sha1Base36(), and is 31 characters + us_sha1 varchar(31) NOT NULL, + us_mime varchar(255), + -- Media type as defined by the MEDIATYPE_xxx constants, should duplicate definition in the image table + us_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, + -- image-specific properties + us_image_width int unsigned, + us_image_height int unsigned, + us_image_bits smallint unsigned + +) /*$wgDBTableOptions*/; + +-- sometimes there's a delete for all of a user's stuff. +CREATE INDEX /*i*/us_user ON /*_*/uploadstash (us_user); +-- pick out files by key, enforce key uniqueness +CREATE UNIQUE INDEX /*i*/us_key ON /*_*/uploadstash (us_key); +-- the abandoned upload cleanup script needs this +CREATE INDEX /*i*/us_timestamp ON /*_*/uploadstash (us_timestamp); diff --git a/maintenance/archives/patch-user-newtalk-timestamp-null.sql b/maintenance/archives/patch-user-newtalk-timestamp-null.sql new file mode 100644 index 00000000..7234362d --- /dev/null +++ b/maintenance/archives/patch-user-newtalk-timestamp-null.sql @@ -0,0 +1 @@ +ALTER TABLE /*_*/user_newtalk MODIFY user_last_timestamp varbinary(14) NULL default NULL; diff --git a/maintenance/archives/patch-user_email_index.sql b/maintenance/archives/patch-user_email_index.sql new file mode 100644 index 00000000..6a3d6208 --- /dev/null +++ b/maintenance/archives/patch-user_email_index.sql @@ -0,0 +1 @@ +CREATE INDEX /*i*/user_email ON /*_*/user (user_email(50)); diff --git a/maintenance/archives/patch-user_former_groups.sql b/maintenance/archives/patch-user_former_groups.sql new file mode 100644 index 00000000..ed18b2b6 --- /dev/null +++ b/maintenance/archives/patch-user_former_groups.sql @@ -0,0 +1,9 @@ +-- Stores the groups the user has once belonged to. +-- The user may still belong these groups. Check user_groups. +CREATE TABLE /*_*/user_former_groups ( + -- Key to user_id + ufg_user int unsigned NOT NULL default 0, + ufg_group varbinary(16) NOT NULL default '' +) /*$wgDBTableOptions*/; + +CREATE UNIQUE INDEX /*i*/ufg_user_group ON /*_*/user_former_groups (ufg_user,ufg_group); diff --git a/maintenance/archives/patch-user_last_timestamp.sql b/maintenance/archives/patch-user_last_timestamp.sql index b6d5f0f3..e5f85bf1 100644 --- a/maintenance/archives/patch-user_last_timestamp.sql +++ b/maintenance/archives/patch-user_last_timestamp.sql @@ -1,3 +1,3 @@ -- For getting diff since last view ALTER TABLE /*$wgDBprefix*/user_newtalk - ADD user_last_timestamp binary(14) NOT NULL default ''; + ADD user_last_timestamp varbinary(14) NULL default NULL; diff --git a/maintenance/archives/upgradeLogging.php b/maintenance/archives/upgradeLogging.php index 54a82c09..1765bd9f 100644 --- a/maintenance/archives/upgradeLogging.php +++ b/maintenance/archives/upgradeLogging.php @@ -2,6 +2,21 @@ /** * Replication-safe online upgrade script for log_id/log_deleted * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * * @file * @ingroup MaintenanceArchive */ @@ -9,6 +24,10 @@ require( dirname( __FILE__ ) . '/../commandLine.inc' ); class UpdateLogging { + + /** + * @var DatabaseBase + */ var $dbw; var $batchSize = 1000; var $minTs = false; @@ -145,7 +164,7 @@ EOT; $this->dbw->insert( $dstTable, $batch, __METHOD__ ); $numRowsCopied += count( $batch ); - wfWaitForSlaves( 5 ); + wfWaitForSlaves(); } echo "Copied $numRowsCopied rows\n"; } -- cgit v1.2.3-54-g00ecf