Last modified: 2011-11-02 15:27:15 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 27016 - r77638 writes to stdout instead of using specified sink, breaking xml dumps
r77638 writes to stdout instead of using specified sink, breaking xml dumps
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
All All
: Normal blocker with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: 26611
  Show dependency treegraph
Reported: 2011-01-28 18:57 UTC by Ariel T. Glenn
Modified: 2011-11-02 15:27 UTC (History)
2 users (show)

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


Description Ariel T. Glenn 2011-01-28 18:57:44 UTC
new code is:

$writer = new XMLWriter();
$writer->openURI( 'php://stdout' );

in dumpTextPass.php

This bypasses the write functions for the user-specified sink which for example would write several compressed streams at once to different files.

This will break XML dumps. 

Tested from the command line against trunk using the command

/usr/bin/php -q /home/ariel/src/mediawiki/testing/phase3/maintenance/dumpTextPass.php --wiki=elwikidb --stub=gzip:/home/ariel/src/mediawiki/testing/dumps/public/elwikidb/20110127/elwikidb-20110127-stub-meta-current1.xml.gz --prefetch=bzip2:/home/ariel/src/mediawiki/testing/dumps/public/elwikidb/20110125/elwikidb-20110125-pages-meta-current1.xml.bz2 --force-normal --report=1000 --server=localhost --spawn=/usr/bin/php --output=bzip2:/home/ariel/src/mediawiki/testing/dumps/public/elwikidb/20110127/elwikidb-20110127-pages-meta-current1.xml.bz2

and it wrote to stdout (it opened the specified output file which then had length 14 bytes = empty file).

(replace with files of your choice on a local install).
Comment 1 Sam Reed (reedy) 2011-01-29 07:34:23 UTC
I'm thinking you mean r77638

157	ialex	77638	                $reader = new XMLReader();
158	 	 	                $reader->open( $this->input );
159	 	 	                $writer = new XMLWriter();
160	 	 	                $writer->openURI( 'php://stdout' );

CC'ing IAlex
Comment 2 Alexandre Emsenhuber [IAlex] 2011-01-29 09:01:01 UTC
Fixed in r81186.
Comment 3 Chad H. 2011-07-20 23:08:44 UTC
Needs re-fixing, since the XMLReader/Writer-related changes were backed out in r92707.
Comment 4 Ariel T. Glenn 2011-09-18 07:30:01 UTC
Are we talking trunk or 1.17 here? Trunk runs fine; I've been testing against it for some time.
Comment 5 Ariel T. Glenn 2011-11-02 15:27:15 UTC
hearing no response (and having had runs fine against 117wmf4, 118wmf1 and trunk), I'm calling this done.

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