Last modified: 2006-11-01 21:03:30 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 7780 - Can't delete category from redirect
Can't delete category from redirect
Product: MediaWiki
Classification: Unclassified
Redirects (Other open bugs)
All All
: Normal major (vote)
: ---
Assigned To: Rotem Liss
: patch, patch-need-review
Depends on:
  Show dependency treegraph
Reported: 2006-11-01 16:13 UTC by Kusma
Modified: 2006-11-01 21:03 UTC (History)
1 user (show)

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

Patch (1.54 KB, patch)
2006-11-01 17:12 UTC, Rotem Liss
Patch (1.44 KB, patch)
2006-11-01 17:13 UTC, Rotem Liss

Description Kusma 2006-11-01 16:13:13 UTC
If I remove the category from the redirect at
I get the MySQL error "1062: Duplicate entry '7726156' for key 1 ("
from within function "Article::updateRedirectOn" when I try to save. Apparently
some edits to redirects are rejected.
Comment 1 Rotem Liss 2006-11-01 16:19:38 UTC
Quick workaround: change the redirect target and remove the category, then
change it back to the original target. Checking the problem.
Comment 2 Rotem Liss 2006-11-01 17:12:14 UTC
Created attachment 2615 [details]

Here is a patch for that. I tested it, but not enough. I would test it more
later, if someone else doesn't test and commit it.
Comment 3 Rotem Liss 2006-11-01 17:13:45 UTC
Created attachment 2616 [details]

Removing some test code.
Comment 4 Brion Vibber 2006-11-01 21:03:30 UTC
Fixed in r17354; simply using REPLACE instead of trying to UPDATE or INSERT.

The previous code failed because the modified row count from UPDATE is 0
if no rows are *changed* -- so it would come back with its own value.
Putting IGNORE on the INSERT would have also worked, but the extra code
path is just silly; prune it out!

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