Last modified: 2014-02-12 23:39:56 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 T48047, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 46047 - Database error on es.wikipedia.org in function "Revision::insertOn": "Duplicate entry for key 'PRIMARY'"
Database error on es.wikipedia.org in function "Revision::insertOn": "Duplica...
Status: NEW
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
wmf-deployment
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-12 22:02 UTC by Quentinv57
Modified: 2014-02-12 23:39 UTC (History)
1 user (show)

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


Attachments

Description Quentinv57 2013-03-12 22:02:17 UTC
Hi.

Just wanted to put a note that I had a database error while trying to restore an article.

Here is the message I get :
> from within function "Revision::insertOn". Database returned error "1062: Duplicate entry '107364-20165' for key 'PRIMARY' (10.64.16.30)".

The page I tried to restore was https://es.wikipedia.org/w/index.php?title=Red_de_computadoras&action=history and the restore process seems to have worked fine, except I've got the error I'm reporting.

Regards,

Quentin
Comment 1 Platonides 2013-03-12 22:14:18 UTC
107364 is the page_id of [[Red_de_computadoras]]

20165 is the first revision (20030725151910) of that page:
https://es.wikipedia.org/w/index.php?title=Red_de_computadoras&oldid=20165

The duplicate page_id must have been: rev_page_id (rev_page, rev_id), and thus the $dbw->insert( 'revision', $row, __METHOD__ ); of line 1347.

Sidenote:
https://meta.wikimedia.org/w/index.php?diff=5317080&oldid=5310095 states that the page had more than 5000 revisions, but only 3774 were restored (there are in total 3808 revisions now)

However, I don't see revisions left:
mysql> select count(*) from archive where ar_namespace = 0 and ar_title = 'Red_de_computadoras';
+----------+
| count(*) |
+----------+
|        0 |
+----------+

It may have been an estimation error by mysql EXPLAIN. It also happened in Jan 2012 when deleted by Vituzzu, but there were just 3560 revisions.

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


Navigation
Links