mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
MDEV-37183 Scrubbing empty record breaks recovery
page_delete_rec_list_end(): Do not attempt to scrub the data of
an empty record.
The test case would reproduce a debug assertion failure in branches
where commit 358921ce32 (MDEV-26938)
is present. MariaDB Server 10.6 only supports ascending indexes,
and in those, the empty string would always be sorted first, never
last in a page.
Nevertheless, we fix the bug also in 10.6, in case it would be
reproducible in a slightly different scenario.
Reviewed by: Thirunarayanan Balathandayuthapani
This commit is contained in:
parent
3b140fed0d
commit
f73ffd1150
3 changed files with 34 additions and 2 deletions
|
|
@ -977,8 +977,9 @@ page_delete_rec_list_end(
|
|||
size+= s;
|
||||
n_recs++;
|
||||
|
||||
if (scrub)
|
||||
mtr->memset(block, rec2 - page, rec_offs_data_size(offsets), 0);
|
||||
if (UNIV_LIKELY(!scrub));
|
||||
else if (size_t size= rec_offs_data_size(offsets))
|
||||
mtr->memset(block, rec2 - page, size, 0);
|
||||
|
||||
rec2= page_rec_get_next(rec2);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue