Last modified: 2014-10-27 17:17:46 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 T41470, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39470 - Can't merge blocked users: Duplicate entry for key 'ipb_address'
Can't merge blocked users: Duplicate entry for key 'ipb_address'
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UserMerge (Other open bugs)
master
All All
: High normal with 1 vote (vote)
: ---
Assigned To: Kunal Mehta (Legoktm)
:
: 43114 65205 (view as bug list)
Depends on:
Blocks: global-user-merge
  Show dependency treegraph
 
Reported: 2012-08-18 15:43 UTC by steevithak
Modified: 2014-10-27 17:17 UTC (History)
6 users (show)

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


Attachments

Description steevithak 2012-08-18 15:43:19 UTC
Versions:
MediaWiki: 1.18.3
PHP: 5.2.17
MySQL: 5.1.39
User Merge and Delete: 1.6.31

When attempting to merge/delete a users who was blocked for spamming, I got the following error:

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 'Spammer-2-0-0' for key 'ipb_address' (db.camera-wiki.org)". 

Work-around: unblocking the user prior to using merge/delete solves the problem until the bug can be fixed.

Additional info: Our wiki has an account called "Spammer" into which we merge/delete all spammers. This process worked great up until MediaWiki 1.18 at which point we started getting numerous SQL errors during the process. We have already applied the ipb_id to ipb_user change to fix a previous SQL bug.
Comment 1 Dereckson 2012-12-14 09:00:53 UTC
*** Bug 43114 has been marked as a duplicate of this bug. ***
Comment 2 MZMcBride 2013-05-03 04:43:18 UTC
It seems like ipb_address should be a unique field.
Comment 4 T. Gries 2014-03-16 06:56:56 UTC
see also https://www.mediawiki.org/w/index.php?title=Extension_talk:UserMerge&dir=prev&offset=20140124142442&limit=20&lqt_mustshow=40885#x.5BWORKAROUND.5D_Duplicate_entry_40885


We are having a pretty big issue as this extension stopped working. We are currently getting an error "1062: Duplicate entry" when trying to merge *anything* (at least that's what it looks like).

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

        UPDATE `ipblocks` SET ipb_user = '43742',ipb_address = 'XXXXXXXXXX' WHERE ipb_user = '43743'

    from within function "UserMerge::mergeUser". Database returned error "1062: Duplicate entry 'XXXXXXXXXX-43742-0-0' for key 'ipb_address' (localhost)".


So it's trying to set an ID that's already in-use. Manually inspecting the database shows that indeed both IDs are still in-use. Any clue on why the previous row was not deleted (I am assuming that's what should have been done)? More importantly, why did it not error out when the deletion fail?

Box:

MediaWiki              1.21.3
PHP                    5.4.17 (apache2handler)
MySQL                  5.5.32
User Merge and Delete  1.8.1 (4fd1c08)

Any suggestions?

    Reply
    More

CyberXRef☎‎ 01:36, 16 March 2014
Comment 6 Kunal Mehta (Legoktm) 2014-09-16 21:38:05 UTC
*** Bug 65205 has been marked as a duplicate of this bug. ***
Comment 7 Gerrit Notification Bot 2014-09-16 23:30:04 UTC
Change 160872 had a related patch set uploaded by Legoktm:
Handle merging blocks a bit better

https://gerrit.wikimedia.org/r/160872
Comment 8 cmjohannes 2014-09-18 17:17:02 UTC
MediaWiki version: 1.23.3</br>
MySQL version: 5.1.73-log</br>
Operating system: Linux/Apache </br>
UserMerge version with bug version [https://gerrit.wikimedia.org/r/#/c/160872/ 160872] code changes.

I also had previously used the ipbwiki wiki extension. I am having problems merging, then deleting a blocked user. Here are my errors:
<pre>
Database error
A database query error has occurred. This may indicate a bug in the software.
Query:
SELECT Array FROM `ipblocks` WHERE ((ipb_user = '63598') OR (ipb_user = '66705'))
Function: DatabaseBase::select
Error: 1054 Unknown column 'Array' in 'field list' (localhost)
Backtrace:
#0 /var/www/web3/web.old/includes/db/Database.php(1123): DatabaseBase->reportQueryError('Unknown column ...', 1054, 'SELECT  Array  ...', 'DatabaseBase::s...', false)
#1 /var/www/web3/web.old/includes/db/Database.php(1590): DatabaseBase->query('SELECT  Array  ...', 'DatabaseBase::s...')
#2 /var/www/web3/web.old/extensions/UserMerge/MergeUser.php(93): DatabaseBase->select('ipblocks', Array, Array)
#3 /var/www/web3/web.old/extensions/UserMerge/MergeUser.php(165): MergeUser->mergeBlocks(Object(DatabaseMysqli))
#4 /var/www/web3/web.old/extensions/UserMerge/MergeUser.php(31): MergeUser->mergeDatabaseTables()
#5 /var/www/web3/web.old/extensions/UserMerge/SpecialUserMerge.php(126): MergeUser->merge(Object(User))
#6 [internal function]: SpecialUserMerge->onSubmit(Array, Object(HTMLForm))
#7 /var/www/web3/web.old/includes/htmlform/HTMLForm.php(470): call_user_func(Array, Array, Object(HTMLForm))
#8 /var/www/web3/web.old/includes/htmlform/HTMLForm.php(412): HTMLForm->trySubmit()
#9 /var/www/web3/web.old/includes/htmlform/HTMLForm.php(427): HTMLForm->tryAuthorizedSubmit()
#10 /var/www/web3/web.old/includes/specialpage/FormSpecialPage.php(142): HTMLForm->show()
#11 /var/www/web3/web.old/includes/specialpage/SpecialPage.php(379): FormSpecialPage->execute(NULL)
#12 /var/www/web3/web.old/includes/specialpage/SpecialPageFactory.php(503): SpecialPage->run(NULL)
#13 /var/www/web3/web.old/includes/Wiki.php(285): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#14 /var/www/web3/web.old/includes/Wiki.php(588): MediaWiki->performRequest()
#15 /var/www/web3/web.old/includes/Wiki.php(447): MediaWiki->main()
#16 /var/www/web3/web.old/index.php(46): MediaWiki->run()
#17 {main}
</pre>
Comment 9 cmjohannes 2014-09-26 03:25:36 UTC
I am not familiar with how long bugs like this take to get resolved. Is there an ETA or a guess at when this will be resolved? Thanks to all of you who work on stuff like this!
Comment 10 Andre Klapper 2014-09-26 10:02:26 UTC
Basically until somebody has reviewed and merged https://gerrit.wikimedia.org/r/#/c/160872/ and there is no review so far... This pretty much depends on individuals and when they find time to do so.
Comment 11 Gerrit Notification Bot 2014-10-27 17:17:13 UTC
Change 160872 merged by jenkins-bot:
Handle merging blocks a bit better

https://gerrit.wikimedia.org/r/160872

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


Navigation
Links