r98355 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98354‎ | r98355 | r98356 >
Date:19:28, 28 September 2011
Author:reedy
Status:reverted
Tags:
Comment:
Followup r98339

Don't try and remove the user_options column in SQLite

Added 'user.user_options' to ignores
Modified paths:
  • /trunk/phase3/includes/installer/SqliteUpdater.php (modified) (history)
  • /trunk/phase3/maintenance/sqlite/archives/initial-indexes.sql (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/db/DatabaseSqliteTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/sqlite/archives/initial-indexes.sql
@@ -3,7 +3,7 @@
44 -- Unique indexes need to be handled with INSERT SELECT since just running
55 -- the CREATE INDEX statement will fail if there are duplicate values.
66 --
 7+-- Ignore duplicates, several tables will have them (e.g. bug 16966) but in
78 -- most cases it's harmless to discard them.
89
910 --------------------------------------------------------------------------------
@@ -41,7 +41,6 @@
4242 user_newpassword tinyblob NOT NULL,
4343 user_newpass_time binary(14),
4444 user_email tinytext NOT NULL,
45 - user_options blob NOT NULL,
4645 user_touched binary(14) NOT NULL default '',
4746 user_token binary(32) NOT NULL default '',
4847 user_email_authenticated binary(14),
@@ -218,7 +217,7 @@
219218 math_outputhash varbinary(16) NOT NULL,
220219 math_html_conservativeness tinyint NOT NULL,
221220 math_html text,
222 - math_mathml text
 221+ math_mathml text
223222 );
224223
225224 CREATE UNIQUE INDEX /*i*/math_inputhash ON /*_*/math_tmp (math_inputhash);
Index: trunk/phase3/tests/phpunit/includes/db/DatabaseSqliteTest.php
@@ -98,7 +98,7 @@
9999 $this->assertEquals( 'sqlite_master', $db->tableName( 'sqlite_master' ) );
100100 $this->assertEquals( 'foobar', $db->tableName( 'bar' ) );
101101 }
102 -
 102+
103103 public function testDuplicateTableStructure() {
104104 $db = new DatabaseSqliteStandalone( ':memory:' );
105105 $db->query( 'CREATE TABLE foo(foo, barfoo)' );
@@ -119,7 +119,7 @@
120120 'Create a temporary duplicate only'
121121 );
122122 }
123 -
 123+
124124 public function testDuplicateTableStructureVirtual() {
125125 $db = new DatabaseSqliteStandalone( ':memory:' );
126126 if ( $db->getFulltextSearchModule() != 'FTS3' ) {
@@ -196,8 +196,9 @@
197197 // Mismatches for these columns we can safely ignore
198198 $ignoredColumns = array(
199199 'user_newtalk.user_last_timestamp', // r84185
 200+ 'user.user_options',
200201 );
201 -
 202+
202203 $currentDB = new DatabaseSqliteStandalone( ':memory:' );
203204 $currentDB->sourceFile( "$IP/maintenance/tables.sql" );
204205 $currentTables = $this->getTables( $currentDB );
@@ -254,7 +255,7 @@
255256 $maint = new FakeMaintenance();
256257 $maint->loadParamsAndArgs( null, array( 'quiet' => 1 ) );
257258 }
258 -
 259+
259260 $db = new DatabaseSqliteStandalone( ':memory:' );
260261 $db->sourceFile( dirname( __FILE__ ) . "/sqlite/tables-$version.sql" );
261262 $updater = DatabaseUpdater::newForDB( $db, false, $maint );
Index: trunk/phase3/includes/installer/SqliteUpdater.php
@@ -67,7 +67,6 @@
6868 array( 'addTable', 'globalnamespaces', 'patch-globalnamespaces.sql' ),
6969 array( 'addTable', 'globalinterwiki', 'patch-globalinterwiki.sql' ),
7070 array( 'doMigrateUserOptions' ),
71 - array( 'dropField', 'user', 'user_options', 'patch-drop-user_options.sql' ),
7271 );
7372 }
7473

Follow-up revisions

RevisionCommit summaryAuthorDate
r98357Followup r98339, r98355...reedy19:38, 28 September 2011
r98657Revert r98355 and r98357; drop the field instead.maxsem06:10, 2 October 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98339* (bug 31204) Remove old user.user_options...reedy18:08, 28 September 2011

Status & tagging log