diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-09-24 16:36:23 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-09-24 16:36:23 +0300 |
commit | 3b72b35a776b473c15df5afa5846b859797d9473 (patch) | |
tree | 077ef6123bac49120c6867ad57946975b04e6ffb | |
parent | 6ce0a6f9ad77e7934e27db1b73d6d98064352928 (diff) | |
parent | 1adb5378060fe3b00070c537c042acef641d4f6f (diff) | |
download | mariadb-git-3b72b35a776b473c15df5afa5846b859797d9473.tar.gz |
Merge 10.5 into 10.6
-rw-r--r-- | storage/innobase/buf/buf0buf.cc | 2 | ||||
-rw-r--r-- | storage/innobase/trx/trx0rec.cc | 15 | ||||
-rw-r--r-- | unittest/mysys/crc32-t.c | 4 |
3 files changed, 18 insertions, 3 deletions
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 85e21371e37..ec4b7395ca5 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -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; } diff --git a/storage/innobase/trx/trx0rec.cc b/storage/innobase/trx/trx0rec.cc index e4dd666a1f2..ba006f37bb5 100644 --- a/storage/innobase/trx/trx0rec.cc +++ b/storage/innobase/trx/trx0rec.cc @@ -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); diff --git a/unittest/mysys/crc32-t.c b/unittest/mysys/crc32-t.c index c43be2cd586..9834d21769b 100644 --- a/unittest/mysys/crc32-t.c +++ b/unittest/mysys/crc32-t.c @@ -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); |