Thread:Extension talk:User Merge and Delete/Merge/delete triggers mistaken attempt to merge two ipblocks by block id instead of user

When I try to merge/delete a user, say a user whose ID is 23 to Anonymous, I sometimes get a message like this: A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: UPDATE `mw_ipblocks` SET ipb_id = '0' WHERE ipb_id = '23' from within function "DatabaseBase::update". Database returned error "1062: Duplicate entry '0' for key 'PRIMARY' (localhost)". Notice that that there is an attempt to change a row in ipblocks by changing the ipb_id from the old user id to the new user id, but ipb_id is not a user id, it is an auto-increment value to identify rows in this table. UserMerge is therefore wreaking havoc on my ipblocks table unintentionally and indirectly.

While UserMerge_body.php does update the table ipblocks, there is nothing in its program that explicitly does anything with ipb_id, so it must trigger Block.php, which does. But I can't figure out how/where.


 * I am using:
 * MediaWiki 	1.18.1
 * PHP 	5.3.10 (cgi-fcgi)
 * MySQL 	5.5.20-55
 * User Merge and Delete (Version 1.6.31)