Page MenuHomePhabricator

E:UserMerge throws a database error for a duplicate entry for wl_user when trying to merge and delete a user
Closed, ResolvedPublic

Description

Generally, the extension:UserMerge works fine, but while trying to merge and delete one specific user, the operation fails.

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

(SQL query hidden)

from within function "DatabaseBase::update". Database returned error "1062: Duplicate entry '1-0-VIAF' for key 'wl_user' (localhost)".


Version: master
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=49518

Details

Reference
bz49517

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:45 AM
bzimport set Reference to bz49517.

The problem is already mentioned here https://www.mediawiki.org/wiki/Extension_talk:UserMerge#Workaround and happens, when the old user ("merge from old user") and the new user ("merge to new user") have same active watch list entries.

The error message is then this one

Cannot set wl_user = '1234' WHERE wl_user = '10'. MySQL error 1062: - Duplicate entry '1234-0-Main Page' for key 1"

One suggested solution is:

to delete *one* of those both watchlist entries which old and new user have in common, and then to merge.

patch in gerrit https://gerrit.wikimedia.org/r/#/c/69017/

see requirements (requires MediaWiki after 2013-06-25)