diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-09-05 09:54:47 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-09-05 09:54:47 +0300 |
commit | 244fdc435da364aea3b6e55835115cc04fe3297f (patch) | |
tree | bb8e6f1b1855d47f4f14d82ae3a606fbb3b22345 /sql/log.h | |
parent | 5cbc5dbbbe6c82ec6a4704073514ae274cdf40c1 (diff) | |
download | mariadb-git-244fdc435da364aea3b6e55835115cc04fe3297f.tar.gz |
MDEV-29438 Recovery or backup of instant ALTER TABLE is incorrect
This bug was found in MariaDB Server 10.6 thanks to the
OPT_PAGE_CHECKSUM record that was implemented
in commit 4179f93d28035ea2798cb1c16feeaaef87ab4775 for catching
this type of recovery failures.
page_cur_insert_rec_low(): If the previous record is the page infimum,
correctly limit the end of the record. We do not want to copy data from
the header of the page supremum. This omission caused the incorrect
recovery of DB_TRX_ID in an instant ALTER TABLE metadata record, because
part of the DB_TRX_ID was incorrectly copied from the n_owned of the
page supremum, which in recovery would be updated after the copying,
but in normal operation would already have been updated at the time the
common prefix was being determined.
log_phys_t::apply(): If a data page is found to be corrupted, do not
flag the log corrupted but instead return a new status APPLIED_CORRUPTED
so that the caller may discard all log for this page. We do not want
the recovery of unrelated pages to fail in recv_recover_page().
No test case is included, because the known test case would only work
in 10.6, and even after this fix, it would trigger another bug in
instant ALTER TABLE crash recovery.
Diffstat (limited to 'sql/log.h')
0 files changed, 0 insertions, 0 deletions