Last modified: 2012-07-20 21:59:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T17892, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15892 - Use of temporary tables in parser tests broken by r40209
Use of temporary tables in parser tests broken by r40209
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.14.x
PC Linux
: Normal minor (vote)
: ---
Assigned To: Tim Starling
:
: 16374 (view as bug list)
Depends on:
Blocks: 20343
  Show dependency treegraph
 
Reported: 2008-10-08 14:42 UTC by Aryeh Gregor (not reading bugmail, please e-mail directly)
Modified: 2012-07-20 21:59 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-10-08 14:42:34 UTC
Since r40209, I get this when running parserTests:

$ php maintenance/parserTests.php 
This is MediaWiki version 1.14alpha.

Reading tests from "maintenance/parserTests.txt"...
A database query syntax error has occurred.
The last attempted database query was:
"SELECT value,exptime FROM `parsertest_objectcache` WHERE keyname='wikidb-parsertest_:messages:en'"
from within function "MediaWikiBagOStuff::_doquery".
MySQL returned error "1146: Table 'wikidb.parsertest_objectcache' doesn't exist (localhost)"


Needless to say, I've run update.php.  Backing out the commit causes it to work fine.
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-10-27 23:38:04 UTC
Still broken.
Comment 2 Ilmari Karonen 2008-11-27 21:25:44 UTC
The problem is that r40209 doesn't play nicely with the use of temporary tables in parserTests.inc.  Disabled the latter in r44003 as a temporary workaround, so that us poor folks with only one database can run parser tests again.  Should be fixed properly, though.
Comment 3 Ilmari Karonen 2008-12-02 18:22:00 UTC
*** Bug 16374 has been marked as a duplicate of this bug. ***
Comment 4 Ilmari Karonen 2008-12-30 15:20:28 UTC
Prepending "Use of temporary tables in" to bug summary to reflect current status.
Comment 5 Platonides 2010-05-30 20:13:36 UTC
Seems to have been fixed in the meantime. Reenabled in r67113.
Comment 6 Niklas Laxström 2010-08-21 07:53:36 UTC
Not fixed properly. Anything that triggers CACHE_DB explicitly fails.
Comment 7 Platonides 2010-08-21 20:49:39 UTC
Can you provide an example ?
Comment 8 Brion Vibber 2011-04-06 21:42:25 UTC
This still happens intermittently for me, though I'm uncertain the immediate cause.
Comment 9 Platonides 2011-04-06 22:43:14 UTC
r82582 and the MediaWikiTestCase.php change of r82867 (updated by r83418) should have fixed it.
Did they reappear only recently? Maybe some of the recent initialization changes broke them again.
Comment 10 Brion Vibber 2011-04-08 21:10:28 UTC
Still fails on trunk as of r85689...

Platonides, are there now two different ways of running the parser tests? It kinda looks like some of the MediaWikiTestCase and NewParserTest.php stuff duplicates code in parserTest.inc, and I've got a sneaking suspicion that this is in the middle of a transition or something.


ParserTest::setupDatabase() in parserTest.inc has this comment:

  # SqlBagOStuff broke when using temporary tables on r40209 (bug 15892).
  # It seems to have been fixed since (r55079?).
  # If it fails, $wgCaches[CACHE_DB] = new HashBagOStuff(); should work around it.

If I copy in this (newer) line from MediaWikiTestCase in that position:

  ObjectCache::$instances[CACHE_DB] = new HashBagOStuff;

it seems to help.
Comment 11 Platonides 2011-04-08 22:58:56 UTC
Yes, you can run the parser tests in two ways:
 * The good old parserTests.php
 * As part of phpunit tests. (make parser to run just parser tests in phpunit). This way each test is run isolated from the other, but is also much slower.

And yes, the phpunit code was initially "forked" from parserTest.inc (but don't think parserTest.inc hasn't also evolved).

I'm not aware of a current migrating effort.

You should commit it. r82867/r83418 only affects NewParserTest since it's the one extending MediaWikiTestCase (we would benefit here from a multibple heritance if php allowed that).

The $wgCache issue was a bit complicated, it's probably the same issue. I don't know if a EmptyBagOStuff should be preferable to a HashBagOStuff.
Comment 12 Brion Vibber 2011-04-08 23:07:44 UTC
Spiff... committing the HashBagOStuff for now (empty probably fine too) as r85702.

We'll have to go through and re-merge the two alternate trigger methods at some point probably. Whee! :D

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links