Remove Revision::getRevisionText and gated pre-MCR schema access
authorPetr Pchelko <ppchelko@wikimedia.org>
Fri, 20 Sep 2019 18:11:35 +0000 (11:11 -0700)
committerPetr Pchelko <ppchelko@wikimedia.org>
Fri, 27 Sep 2019 16:40:02 +0000 (09:40 -0700)
commit854b044ab70904ee55543fc7f66c6de4730e6c85
treebd5ffc962f0bb5cefa645b7fd254b038375c8807
parent9adf80d25343b7377fa41fe13cecfdddace91e31
Remove Revision::getRevisionText and gated pre-MCR schema access

- fixT22757.php appears to have been written for T22757 which has been
resolved, I assume it can be removed.

- compressOld.php - rev_text_id access is gated on MCRSchemaMigrationStage
READ_OLD. IT's safe to use the old_text and old_flags directly as we
select for them. Also the query ensures external blobs are not selected,
so we can use decompressData instead of Revision::getRevisionText.
Tested locally.

- recompressTracked.php uses a temporary table for tracking the blobs.
Table is populated by trackBlobs which explicitly queries for old_id,
so using it directly in recompressTracked is ok.
Tested locally.

- checkStorage.php the affected code attempts to fix broken revisions
from a dump, however, it looks like it doesn't work - the code expects
revision IDs as input, however it receives an array of text table old_id
values. Untested.

Bug: T198343
Change-Id: I753019565c15d270c831c995c07c7f1aad887cb6
autoload.php
maintenance/storage/checkStorage.php
maintenance/storage/compressOld.php
maintenance/storage/fixT22757.php [deleted file]
maintenance/storage/recompressTracked.php