Last modified: 2012-05-30 17:12:56 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 4220 - Unique identity constraints for XML dump format schema
Unique identity constraints for XML dump format schema
Product: MediaWiki
Classification: Unclassified
Export/Import (Other open bugs)
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on: 37111
  Show dependency treegraph
Reported: 2005-12-08 11:59 UTC by Elvis Stansvik
Modified: 2012-05-30 17:12 UTC (History)
5 users (show)

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

Adds unique identity constraints for page/id and page/revision/id (661 bytes, patch)
2005-12-08 12:01 UTC, Elvis Stansvik

Description Elvis Stansvik 2005-12-08 11:59:58 UTC
The XML Schema for the XML dump format used by MediaWiki has no constraints for
the page and revision identifiers. This can be easally fixed with the attached
patch. Having it enforced in the XSD makes sense, since I think that some
parsers capable of Schema validation can work more efficiently if they're there.
Another reason is that (however unlikely) some other software might output files
in this format are not obliged to keep the IDs unique, according the the XSD in
its current form.
Comment 1 Elvis Stansvik 2005-12-08 12:01:26 UTC
Created attachment 1154 [details]
Adds unique identity constraints for page/id and page/revision/id
Comment 2 Elvis Stansvik 2009-08-04 15:58:13 UTC
Wow, activity on my over 3.5 year old bug. I even changed my real name in the meantime ;) Is the bug still applicable?
Comment 3 Elvis Stansvik 2009-08-04 16:02:13 UTC
Heh. I just checked. Yes patch still applies. Not that I care too much about this bug anymore, but could someone apply it?
Comment 4 Sumana Harihareswara 2011-11-12 23:04:13 UTC
Elvis, I'm sorry for the very, very late response.  I'm asking developers to look at your patch soon.
Comment 5 Diederik van Liere 2011-11-13 00:38:21 UTC
I've looked at it and it looks good to me. Should this apply to only version 0.6 of the XSD or should it apply to all versions of XSD?
Comment 6 Elvis Stansvik 2011-11-14 06:38:08 UTC
Heh better late then never.

Diederik: I'm not sure and I'm on the train atm, but I guess it would make sense to enforce it in all versions. But 5 years is a long time, can't remember which version I made the patch against. Will check when I get home.

Comment 7 Ariel T. Glenn 2011-11-14 14:13:03 UTC
This patch looks good to me also.  Might as well apply it as far back as we can; if someone is producing old schema dumps that violate these constraints they have bigger problems on their hands than this enforcement change.

Hmm with one exception I guess, if someone produces XML files with multiple entries for a given pageid (but each entry contains different revision ids), that could be a problem.
Comment 8 Sumana Harihareswara 2012-01-11 21:51:46 UTC
Elvis, can you respond to Ariel's suggestion?  And did you have a chance to check what version(s) it should apply to?
Comment 9 Sumana Harihareswara 2012-05-25 02:25:00 UTC
Elvis: Thanks again for the patch.  Are you interested in using developer access to directly suggest it into our Git source control system?
Comment 10 Antoine "hashar" Musso (WMF) 2012-05-25 07:54:06 UTC
I have submitted the change in Gerrit for review, see

Patch credited to Elvis Stansvik.

Once reviewed and merged in master, we will have to update the publicly facing URL at . This is covered by bug 37111.
Comment 11 Antoine "hashar" Musso (WMF) 2012-05-30 05:57:59 UTC
Change merged. Will deploy export file.
Comment 12 Elvis Stansvik 2012-05-30 17:12:56 UTC
Thanks! If I need a change in MW by Christmas 2018 I'll let you know. (Just kidding!) :)

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