Last modified: 2012-05-30 17:12:56 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 T6220, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 4220 - Unique identity constraints for XML dump format schema
Unique identity constraints for XML dump format schema
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Export/Import (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on: 37111
Blocks:
  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: ---


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

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.

Cheers.
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?

https://www.mediawiki.org/wiki/Developer_access
Comment 10 Antoine "hashar" Musso (WMF) 2012-05-25 07:54:06 UTC
I have submitted the change in Gerrit for review, see https://gerrit.wikimedia.org/r/8889

Patch credited to Elvis Stansvik.


Once reviewed and merged in master, we will have to update the publicly facing URL at  http://www.mediawiki.org/xml/export-0.7/ . 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.


Navigation
Links