Make sure we don't try to use a deleted rev ID.
authorBrad Jorsch <bjorsch@wikimedia.org>
Wed, 22 Aug 2018 15:59:56 +0000 (11:59 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Wed, 22 Aug 2018 19:32:16 +0000 (15:32 -0400)
commit5799b2f00129d5bd8f0f54c20e3a2aca593dfbbd
tree7f6640a5f82412f95d72929a73f252d8c69f9eac
parent69c5bf15090003e097140b1cdb0d8a2fac7d3b73
Make sure we don't try to use a deleted rev ID.

MySQL until 8.0 and MariaDB until some version after 10.1.34 don't save
the auto-increment value to disk, so on server restart it might reuse
IDs from deleted revisions. We can fix that with an insert with an
explicit rev_id value, if necessary.

Bug: T202032
Change-Id: I14e5b6c8ec8b5f1aeb2305fae4b103665f8f6686
includes/Storage/RevisionStore.php
maintenance/deduplicateArchiveRevId.php
maintenance/populateArchiveRevId.php
tests/phpunit/includes/Storage/McrRevisionStoreDbTest.php
tests/phpunit/includes/Storage/RevisionStoreDbTestBase.php