From: David Mudrák Date: Mon, 29 Jul 2013 13:09:25 +0000 (+0200) Subject: updater: Move rev_sha1 addition before convertUserOptions X-Git-Tag: 1.31.0-rc.0~19090^2 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=070b8b40fb9cc2b4912f9c1b06d93712c0b2ddf3;p=lhc%2Fweb%2Fwiklou.git updater: Move rev_sha1 addition before convertUserOptions Execution of the script and addition of rev_sha1 are both 1.19 activities, but for some reason the issue has only shown up in 1.21. * MysqlUpdater::getCoreUpdateList() declares that 'doMigrateUserOptions' should be executed before adding the field rev_sha1 into the revision table * ConvertUserOptions::execute() calls User::saveSettings() * User::saveSettings() at its very end calls $this->getUserPage()->invalidateCache() and that is where the revision query is joining the party. Bug: 48820 Change-Id: Id0a6efc33a8c46fdc3e9c294aa2d005d46c7dda0 --- diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index 1c22afb343..02faf7c4bb 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -195,9 +195,9 @@ class MysqlUpdater extends DatabaseUpdater { // 1.19 array( 'addIndex', 'logging', 'type_action', 'patch-logging-type-action-index.sql'), + array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1.sql' ), array( 'doMigrateUserOptions' ), array( 'dropField', 'user', 'user_options', 'patch-drop-user_options.sql' ), - array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1.sql' ), array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1.sql' ), array( 'addIndex', 'page', 'page_redirect_namespace_len', 'patch-page_redirect_namespace_len.sql' ), array( 'addField', 'uploadstash', 'us_chunk_inx', 'patch-uploadstash_chunk.sql' ),