Make BackupDumper MCR compatible (main slot only)
authordaniel <daniel.kinzler@wikimedia.de>
Tue, 3 Jul 2018 12:39:22 +0000 (14:39 +0200)
committerDaniel Kinzler <dkinzler@wikimedia.org>
Thu, 14 Mar 2019 13:19:51 +0000 (13:19 +0000)
commit5988e355054dd73d64acfaef710edd15f9519a60
treeefb2243d60ceeed10b23d32bcc038b2f0cadede1
parent9225d40c0b7147cd6e166b998eecebbc07022d6a
Make BackupDumper MCR compatible (main slot only)

This makes BackupDumper compatible with the new mechanism for accessing
revision content.

This requires some changes to the way database connections are re-used,
since RevisionStore/SqlBlobStore needs to be able to run queries against
the database while the overall result set is being streamed.

This change does not yet add handing for extra slots to BackupDumper.
That first needs a spec for how extra slots will be represented in the
XML schma (T174031).

NOTE: this changes the output of fetchText from using integer text_id
values to using content_address values (e.g. "tt:4567" for text row
with old_id 4567). It also changes fetchText to accept such addresses
as input, for forward-compatibility. XML stub dumps still use the
numeric format in the id attribute, pending T199121.

Bug: T198706
Change-Id: If4c31b7975b4d901afa8c194c10446c99e27eadf
includes/Storage/SqlBlobStore.php
includes/export/WikiExporter.php
includes/export/XmlDumpWriter.php
maintenance/dumpTextPass.php
maintenance/fetchText.php
tests/phpunit/maintenance/backup_PageTest.php
tests/phpunit/maintenance/fetchTextTest.php