Hey,
I got a unit test (added here: https://gerrit.wikimedia.org/r/#/c/14870/) causing some error which I can't figure out the cause of.
The error is "Error: 1137 Can't reopen table: 'unittest_smw_ids'", full message here: http://dpaste.org/B2npZ/
Anyone an idea what might be going on?
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
Le 10/07/12 21:44, Jeroen De Dauw a écrit :
Hey,
I got a unit test (added here: https://gerrit.wikimedia.org/r/#/c/14870/) causing some error which I can't figure out the cause of.
The error is "Error: 1137 Can't reopen table: 'unittest_smw_ids'", full message here: http://dpaste.org/B2npZ/
Anyone an idea what might be going on?
That is a MySQL bug submitted in May 2005: http://bugs.mysql.com/bug.php?id=10327
Test: create temporary table tt (x int); select * from tt as t1, tt as t2;
Trigger the 1137 error. Basically you cant reference the same temporary table more than once in the same query :/ Platonides had the issue with r102411:
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/102411#c29123
The workaround was to skip the query: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/109024
:(
Hey,
I just ran into this issue again by doing a self join somewhere. In the meanwhile some people pointed out that this 1137 error is caused by MySQL not supporting more then one reference to a temporary table in a single query. And we're using temporary tables for running our PHPUnit tests. Is it possible to change our test stuff to use non-temporary tables?
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
Hi Jeroen,
On Fri, Aug 24, 2012 at 06:39:55PM +0200, Jeroen De Dauw wrote:
Is it possible to change our test stuff to use non-temporary tables?
IIRC, you can use the "--use-normal-tables" option when running the phpunit tests to avoid using temporary tables.
But of course, this only works locally. You'll have to skip that test for Jenkins etc. :-(
All the best, Christian
Hey,
IIRC, you can use the "--use-normal-tables" option when running the
phpunit tests to avoid using temporary tables.
Awesome, that will work for me :)
But of course, this only works locally. You'll have to skip that test for
Jenkins etc. :-(
Jenkins is running the tests using SQLite, so the problem does not occur there.
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
wikitech-l@lists.wikimedia.org