parser tests drops anything in $wgSharedTables
Closed, ResolvedPublic

Description

Running parser tests:

bawolff@Bawolff-L:/var/www/w/git/tests$ php parserTests.php --regex ifexist
This is MediaWiki version 1.24alpha (81be7ed).

A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: CREATE TEMPORARY TABLE wikidb.user (LIKE wikidb.user)
Function: DatabaseMysqlBase::duplicateTableStructure
Error: 1066 Not unique table/alias: 'wikidb.user' (localhost)

After which I noticed that I no longer had a User table, since the unit tests thought it was the thing it was duplicating to, and dropped the original.

Note: I had my local wiki set up to use LBFactoryMulti. I don't know if that's related.


Version: 1.24rc
Severity: normal

Details

Reference
bz65654
bzimport raised the priority of this task from to High.
bzimport set Reference to bz65654.
Bawolff created this task.May 22 2014, 8:34 PM

Change 134930 had a related patch set uploaded by Brian Wolff:
Double check its safe before dropping new table during db cloning

https://gerrit.wikimedia.org/r/134930

Turns out it was because I had $wgSharedTables = array( 'user', 'ipblocks' ); from a previous bug I was testing.

Change 134947 had a related patch set uploaded by Brian Wolff:
Make CloneDatabase error out on shared tables.

https://gerrit.wikimedia.org/r/134947

Change 134947 merged by jenkins-bot:
Make CloneDatabase error out on shared tables.

https://gerrit.wikimedia.org/r/134947

Might be worth back porting the patch to REL1_23

Change 134930 merged by jenkins-bot:
Double check its safe before dropping new table during db cloning

https://gerrit.wikimedia.org/r/134930

Change 142018 had a related patch set uploaded by MarkAHershberger:
Double check its safe before dropping new table during db cloning

https://gerrit.wikimedia.org/r/142018

Not sure if this is needed in REL1_23 since tarballs ship without tests, but we can include it if needed.

Merged in core master and cherry-picked to REL1_23, so marking as RESOLVED FIXED.

Leaving Brian as assignee so he can take the glory.

Change 142018 abandoned by Legoktm:
Double check its safe before dropping new table during db cloning

Reason:
Apparently not.

https://gerrit.wikimedia.org/r/142018