Author: physik
Description:
While trying to test the creation and deletion of the database updates of the math extension, I get the following error:
- 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.
Version: 1.22.0
Severity: minor
OS: Linux
Platform: PC
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=35912