Last modified: 2013-06-18 11:12:16 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 T47194, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45194 - Duplicate entry 'updatelist' for key 'PRIMARY'
Duplicate entry 'updatelist' for key 'PRIMARY'
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Unit tests (Other open bugs)
1.22.0
PC Linux
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-20 11:48 UTC by physikerwelt
Modified: 2013-06-18 11:12 UTC (History)
7 users (show)

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


Attachments

Description physikerwelt 2013-02-20 11:48:24 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.
Comment 1 physikerwelt 2013-02-20 12:58:53 UTC
see
https://gerrit.wikimedia.org/r/#/c/49488/7/tests/DatabaseTest.php
for the concrete problem
Comment 2 physikerwelt 2013-06-07 15:26:59 UTC
Locally the fix works, but a 'real' build with jenkins fails:
https://integration.wikimedia.org/ci/job/mwext-Math-testextensions-master/149/console
Comment 3 Matthew Flaschen 2013-06-07 23:24:07 UTC
It's probably another case of SQLite behaving differently.  See bug 35912.
Comment 4 physikerwelt 2013-06-18 10:59:04 UTC
With the latest core version the bug is gone for me.
Comment 5 physikerwelt 2013-06-18 10:59:56 UTC
maybe I should set it to fixed
Comment 6 Gerrit Notification Bot 2013-06-18 11:11:18 UTC
Related URL: https://gerrit.wikimedia.org/r/69302 (Gerrit Change Ibb288aba0fd68f25ef012f82489d6f87d9bac072)
Comment 7 Gerrit Notification Bot 2013-06-18 11:11:20 UTC
Related URL: https://gerrit.wikimedia.org/r/69302 (Gerrit Change Ibb288aba0fd68f25ef012f82489d6f87d9bac072)
Comment 8 Gerrit Notification Bot 2013-06-18 11:12:16 UTC
https://gerrit.wikimedia.org/r/69302 (Gerrit Change Ibb288aba0fd68f25ef012f82489d6f87d9bac072) | change APPROVED and MERGED [by Physikerwelt]

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


Navigation
Links