Merge 10.5 into 10.6

This commit is contained in:
Marko Mäkelä 2020-09-24 16:36:23 +03:00
commit 3b72b35a77
3 changed files with 18 additions and 3 deletions

View file

@ -3860,7 +3860,7 @@ loop:
if (block->page.io_fix() != BUF_IO_NONE)
{
hash_lock->write_unlock();
buf_LRU_block_free_non_file_page(block);
buf_LRU_block_free_non_file_page(free_block);
mutex_exit(&buf_pool.mutex);
goto loop;
}

View file

@ -2040,6 +2040,21 @@ trx_undo_report_row_operation(
err = DB_UNDO_RECORD_TOO_BIG;
goto err_exit;
} else {
/* Write log for clearing the unused
tail of the undo page. It might
contain some garbage from a previously
written record, and mtr_t::write()
will optimize away writes of unchanged
bytes. Failure to write this caused a
recovery failure when we avoided
reading the undo log page from the
data file and initialized it based on
redo log records (which included the
write of the previous garbage). */
mtr.memset(*undo_block, first_free,
srv_page_size - first_free
- FIL_PAGE_DATA_END, 0);
}
mtr_commit(&mtr);

View file

@ -60,8 +60,8 @@ int main(int argc __attribute__((unused)),char *argv[])
DO_TEST_CRC32C(1,"", 1);
DO_TEST_CRC32C(0, "12345", 416359221);
DO_TEST_CRC32C(1, "12345", 549473433);
DO_TEST_CRC32C(0, "1234567890123456789", 2366987449);
DO_TEST_CRC32C(0, LONG_STR, 3009234172);
DO_TEST_CRC32C(0, "1234567890123456789", 2366987449U);
DO_TEST_CRC32C(0, LONG_STR, 3009234172U);
ok(0 == my_crc32c(0, NULL, 0), "crc32c data = NULL, length = 0");
my_end(0);