Last modified: 2006-11-01 21:03:30 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 T9780, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 7780 - Can't delete category from redirect
Can't delete category from redirect
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Redirects (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Rotem Liss
: patch, patch-need-review
Depends on:
Blocks:
  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: ---


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

Description Kusma 2006-11-01 16:13:13 UTC
If I remove the category from the redirect at
http://en.wikipedia.org/wiki/User:Kusma/Test
I get the MySQL error "1062: Duplicate entry '7726156' for key 1 (10.0.0.235)"
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]
Patch

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

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.


Navigation
Links