r77638 writes to stdout instead of using specified sink, breaking xml dumps
Closed, ResolvedPublic


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).

Version: 1.17.x
Severity: blocker

bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz27016.
ArielGlenn created this task.Via LegacyJan 28 2011, 6:57 PM
Reedy added a comment.Via ConduitJan 29 2011, 7:34 AM

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

IAlex added a comment.Via ConduitJan 29 2011, 9:01 AM

Fixed in r81186.

demon added a comment.Via ConduitJul 20 2011, 11:08 PM

Needs re-fixing, since the XMLReader/Writer-related changes were backed out in r92707.

ArielGlenn added a comment.Via ConduitSep 18 2011, 7:30 AM

Are we talking trunk or 1.17 here? Trunk runs fine; I've been testing against it for some time.

ArielGlenn added a comment.Via ConduitNov 2 2011, 3:27 PM

hearing no response (and having had runs fine against 117wmf4, 118wmf1 and trunk), I'm calling this done.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.