Daniel Kinzler has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402573 )
Change subject: Fix dropping of temp tables on SQLite and PG. ...................................................................... Fix dropping of temp tables on SQLite and PG. Also addresses other compatibility issues with PG mentioned in comments on I7a4071072. Bug: T184333 Change-Id: I478aa1aee15fdef99630c65a37b1af5f3f8cce14 --- M tests/phpunit/MediaWikiTestCase.php M tests/phpunit/tests/MediaWikiTestCaseSchemaTest.sql 2 files changed, 4 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/73/402573/1 diff --git a/tests/phpunit/MediaWikiTestCase.php b/tests/phpunit/MediaWikiTestCase.php index 10f5d41..08e4562 100644 --- a/tests/phpunit/MediaWikiTestCase.php +++ b/tests/phpunit/MediaWikiTestCase.php @@ -1393,9 +1393,8 @@ $this->ensureMockDatabaseConnection( $db ); foreach ( $tables as $tbl ) { - $tmp = self::$useTemporaryTables ? ' TEMPORARY ' : ''; $tbl = $db->tableName( $tbl ); - $db->query( "DROP $tmp TABLE IF EXISTS $tbl", __METHOD__ ); + $db->query( "DROP TABLE IF EXISTS $tbl", __METHOD__ ); if ( $tbl === 'page' ) { // Forget about the pages since they don't diff --git a/tests/phpunit/tests/MediaWikiTestCaseSchemaTest.sql b/tests/phpunit/tests/MediaWikiTestCaseSchemaTest.sql index e5ef5c6..43e8e9b 100644 --- a/tests/phpunit/tests/MediaWikiTestCaseSchemaTest.sql +++ b/tests/phpunit/tests/MediaWikiTestCaseSchemaTest.sql @@ -5,9 +5,9 @@ ) /*$wgDBTableOptions*/; CREATE TABLE /*_*/imagelinks ( - il_from int(10) unsigned NOT NULL DEFAULT 0, - il_from_namespace int(11) NOT NULL DEFAULT 0, - il_to varbinary(255) NOT NULL DEFAULT '', + il_from int NOT NULL DEFAULT 0, + il_from_namespace int NOT NULL DEFAULT 0, + il_to varchar(255) NOT NULL DEFAULT '', il_frobniz varchar(255) NOT NULL DEFAULT 'FROB', PRIMARY KEY (il_from,il_to) ) /*$wgDBTableOptions*/; -- To view, visit https://gerrit.wikimedia.org/r/402573 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I478aa1aee15fdef99630c65a37b1af5f3f8cce14 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler <daniel.kinz...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits