diff options
-rw-r--r-- | storage/innobase/log/log0recv.cc | 11 | ||||
-rw-r--r-- | storage/innobase/page/page0cur.cc | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index d9761fe9d85..f789e061d9b 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -187,7 +187,9 @@ public: /** The page was modified, affecting the encryption parameters */ APPLIED_TO_ENCRYPTION, /** The page was modified, affecting the tablespace header */ - APPLIED_TO_FSP_HEADER + APPLIED_TO_FSP_HEADER, + /** The page was found to be corrupted */ + APPLIED_CORRUPTED, }; /** Apply log to a page frame. @@ -308,8 +310,7 @@ public: { page_corrupted: ib::error() << "Set innodb_force_recovery=1 to ignore corruption."; - recv_sys.found_corrupt_log= true; - return applied; + return APPLIED_CORRUPTED; } break; case INSERT_HEAP_REDUNDANT: @@ -2338,6 +2339,7 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr, start_lsn = 0; continue; case log_phys_t::APPLIED_YES: + case log_phys_t::APPLIED_CORRUPTED: goto set_start_lsn; case log_phys_t::APPLIED_TO_FSP_HEADER: case log_phys_t::APPLIED_TO_ENCRYPTION: @@ -2391,7 +2393,8 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr, } set_start_lsn: - if (recv_sys.found_corrupt_log && !srv_force_recovery) { + if ((a == log_phys_t::APPLIED_CORRUPTED + || recv_sys.found_corrupt_log) && !srv_force_recovery) { break; } diff --git a/storage/innobase/page/page0cur.cc b/storage/innobase/page/page0cur.cc index 31a780d8644..a1856586a10 100644 --- a/storage/innobase/page/page0cur.cc +++ b/storage/innobase/page/page0cur.cc @@ -1573,7 +1573,7 @@ inc_dir: { const byte *r= rec; const byte *c= cur->rec; - const byte *c_end= cur->rec + data_size; + const byte *c_end= c + (page_rec_is_infimum(c) ? 8 : data_size); static_assert(REC_N_OLD_EXTRA_BYTES == REC_N_NEW_EXTRA_BYTES + 1, ""); if (c <= insert_buf && c_end > insert_buf) c_end= insert_buf; |