Last modified: 2013-06-18 11:12:16 UTC
While trying to test the creation and deletion of the database updates of the math extension, I get the following error: 1) DatabaseTest::testDebugCreateTable DBQueryError: 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: INSERT INTO `unittest_updatelog` (ul_key,ul_value) VALUES ('updatelist-1.21wmf9-1361359986','a:2:{i:0;a:4:{i:0;s:8:\"addTable\";i:1;s:4:\"math\";i:2;s:54:\"/PATHTOWIKI/extensions/Math/db/math.sql\";i:3;b:1;}i:1;a:4:{i:0;s:8:\"addTable\";i:1;s:9:\"mathindex\";i:2;s:66:\"/PATHTOWIKI/extensions/MathSearch/db/mathsearch.sql\";i:3;b:1;}}') Function: DatabaseUpdater::setAppliedUpdates Error: 1062 Duplicate entry 'updatelist-1.21wmf9-1361359986' for key 'PRIMARY' (localhost) The error occurs while trying to execute the following code a second time $this->db->dropTable("math",__METHOD__); $dbu=DatabaseUpdater::newForDB($this->db); $dbu->doUpdates(array("extensions")); If I add a sleep(1); command prior to the second execution the error message vanishes.
see https://gerrit.wikimedia.org/r/#/c/49488/7/tests/DatabaseTest.php for the concrete problem
Locally the fix works, but a 'real' build with jenkins fails: https://integration.wikimedia.org/ci/job/mwext-Math-testextensions-master/149/console
It's probably another case of SQLite behaving differently. See bug 35912.
With the latest core version the bug is gone for me.
maybe I should set it to fixed
Related URL: https://gerrit.wikimedia.org/r/69302 (Gerrit Change Ibb288aba0fd68f25ef012f82489d6f87d9bac072)
https://gerrit.wikimedia.org/r/69302 (Gerrit Change Ibb288aba0fd68f25ef012f82489d6f87d9bac072) | change APPROVED and MERGED [by Physikerwelt]