mariadb/storage
Marko Mäkelä 4179f93d28 MDEV-18976 Implement OPT_PAGE_CHECKSUM log record for improved validation
We will introduce an optional log record OPT_PAGE_CHECKSUM for recording
page checksums, so that more inconsistencies on crash recovery may be
caught.

mtr_t::page_checksum(const buf_page_t&): Write OPT_PAGE_CHECKSUM
(currently not for ROW_FORMAT=COMPRESSED pages).

mtr_t::do_write(): Write OPT_PAGE_CHECKSUM records for all pages
(currently, in debug builds only).

mtr_t::is_logged(): Return whether log should be written.

mtr_t::set_log_mode_sub(const mtr_t&): Set the logging mode of
a sub-minitransaction when another mini-transaction is holding
latches on some modified pages. When creating or freeing BLOB pages,
we may only write OPT_PAGE_CHECKSUM records in the main mini-transaction,
after all changes have been written to the log.

MTR_LOG_SUB: Log mode for a sub-mini-transaction.

mtr_t::free(): Define non-inline, and invoke MarkFreed.

MarkFreed: For any matching page in the mini-transaction log,
change the first entry to say MTR_MEMO_PAGE_X_MODIFY and any subsequent
entries to MTR_MEMO_PAGE_X_FIX.

FindModified: Simplify a condition. MTR_MEMO_MODIFY can only be set
if MTR_MEMO_PAGE_X_FIX or MTR_MEMO_PAGE_SX_FIX are set.

FindBlockX: Consider also MTR_MEMO_PAGE_X_MODIFY.

recv_sys_t::parse(): Store OPT_PAGE_CHECKSUM records.

log_phys_t::apply(): Validate OPT_PAGE_CHECKSUM records.

log_phys_t::page_checksum(): Validate an OPT_PAGE_CHECKSUM record.

Tested by: Matthias Leich
2022-06-06 14:05:01 +03:00
..
archive Cleanup: Remove IF_VALGRIND 2022-04-25 09:40:40 +03:00
blackhole
columnstore columnstore-6.3.1-1 2022-04-30 15:21:59 +02:00
connect Merge 10.5 into 10.6 2022-06-02 17:39:13 +03:00
csv
example Merge 10.4 into 10.5 2022-02-22 10:35:16 +03:00
federated Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
federatedx Merge 10.5 into 10.6 2022-04-06 12:08:30 +03:00
heap
innobase MDEV-18976 Implement OPT_PAGE_CHECKSUM log record for improved validation 2022-06-06 14:05:01 +03:00
maria Merge 10.5 into 10.6 2022-06-02 17:39:13 +03:00
mroonga Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
myisam Merge 10.5 into 10.6 2022-03-14 10:59:46 +02:00
myisammrg
oqgraph Merge 10.5 into 10.6 2022-01-18 12:59:50 +02:00
perfschema Merge branch '10.5' into 10.6 2022-05-10 14:01:23 +02:00
rocksdb Merge branch '10.5' into 10.6 2022-05-18 10:30:47 +02:00
sequence
sphinx
spider Merge 10.5 into 10.6 2022-05-25 14:39:42 +03:00
test_sql_discovery