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


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:



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 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

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