maria:bb-10.6-MDEV-18976

Last commit made on 2022-05-31
Get this branch:
git clone -b bb-10.6-MDEV-18976 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.6-MDEV-18976
Repository:
lp:maria

Recent commits

79a055a... by Marko Mäkelä

Merge 10.5 into 10.6

424ad32... by Marko Mäkelä

squash! 444a56458f3fb393368e87d31133a31b1a27f9e1 Cover ROW_FORMAT=COMPRESSED

buf_block_t::page_checksum(): Remove.

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

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.

FIXME: Occasionally, the test innodb_zip.wl5522_debug_zip would fail
the check on an undo log page, with OPT_PAGE_CHECKSUM written
immediately after FREE_PAGE. This is not reliably reproducible.

d037c10... by Marko Mäkelä

Merge 10.5 into 10.6

444a564... by Marko Mäkelä

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.

buf_block_t::page_checksum(): Calculate a checksum for OPT_PAGE_CHECKSUM,
skipping page checksums and the LSN.

mtr_t::page_checksum(const buf_block_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).

log_phys_t::apply(): Validate OPT_PAGE_CHECKSUM records.

recv_sys_t::parse(): Store OPT_PAGE_CHECKSUM records.

41bae61... by Marko Mäkelä

Clean up mtr_t

mtr_t::is_empty(): Replaces mtr_t::get_log() and mtr_t::get_memo().

mtr_t::get_log_size(): Replaces mtr_t::get_log().

mtr_t::print(): Remove, unused function.

ReleaseBlocks::ReleaseBlocks(): Remove an unused parameter.

05d049b... by Marko Mäkelä

Merge 10.5 into 10.6

ea40c75... by Marko Mäkelä

Merge 10.4 into 10.5

99c8aed... by Marko Mäkelä

MDEV-28601 InnoDB history list length was reverted to 32 bits

srv_do_purge(): In commit edde1f6e0d5f5a0115a5253c9b8d428af132f2d1
when the de-facto 32-bit trx_sys_t::history_size() was replaced with
32-bit trx_sys.rseg_history_len, some more variables were changed
from ulint (size_t) to uint32_t.

The history list length is the number of committed transactions whose
undo logs are waiting to be purged. Each TRX_RSEG_HISTORY list is
storing the number of entries in a 32-bit field and each transaction
will occupy at least one undo log page. It is thinkable that the
length of each TRX_RSEG_HISTORY list may approach the maximum
representable number. The number cannot be exceeded, because the
rollback segment header is allocated from the same tablespace as
the undo log header pages it is pointing to, and because the page
numbers of a tablespace are stored in 32 bits. In any case, it is
possible that the total number of unpurged committed transactions
cannot be represented in 32 but 39 bits (corresponding to
128 rollback segments and undo tablespaces).

db0fde3... by Marko Mäkelä

MDEV-28665 aio_uring::thread_routine terminates prematurely, causing hang

aio_uring::thread_routine(): Handle -EINTR from io_uring_wait_cqe()
in the same way as aio_linux::getevent_thread_routine() does it:
simply ignore it and invoke the system call again.

Reviewed by: Vladislav Vaintroub

a0e4853... by Marko Mäkelä

MDEV-28668 Recovery or backup of INSERT may be incorrect

page_cur_insert_rec_low(): When checking for common bytes with
the preceding record, exclude the header bytes of next_rec
that could have been updated by this function.

The scenario where this caused corruption was an insert of
a node pointer record. The child page number was written as
0x203 but recovered as 0x103 because the n_owned field of next_rec
was changed from 1 to 2 before the comparison was invoked.