Commit 5876de19 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-12353: Remove bogus conditions

page_update_max_trx_id(), page_delete_rec_list_end(): Remove conditions
on recv_recovery_is_on(). These conditions should have been removed in
or before commit f8a9f906
(removing the support for crash-upgrade).

The physical redo log based recovery will not call such high-level code.
parent 3887daf8
...@@ -47,13 +47,7 @@ page_update_max_trx_id( ...@@ -47,13 +47,7 @@ page_update_max_trx_id(
{ {
ut_ad(block); ut_ad(block);
ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
/* During crash recovery, this function may be called on ut_ad(trx_id);
something else than a leaf page of a secondary index or the
insert buffer index tree (dict_index_is_sec_or_ibuf() returns
TRUE for the dummy indexes constructed during redo log
application). In that case, PAGE_MAX_TRX_ID is unused,
and trx_id is usually zero. */
ut_ad(trx_id || recv_recovery_is_on());
ut_ad(page_is_leaf(buf_block_get_frame(block))); ut_ad(page_is_leaf(buf_block_get_frame(block)));
if (page_get_max_trx_id(buf_block_get_frame(block)) < trx_id) { if (page_get_max_trx_id(buf_block_get_frame(block)) < trx_id) {
......
...@@ -867,15 +867,8 @@ page_delete_rec_list_end( ...@@ -867,15 +867,8 @@ page_delete_rec_list_end(
return; return;
} }
if (recv_recovery_is_on()) { if (page_rec_is_infimum(rec)
/* If we are replaying a redo log record, we must || n_recs == page_get_n_recs(block->frame)) {
replay it exactly. Since MySQL 5.6.11, we should be
generating a redo log record for page creation if
the page would become empty. Thus, this branch should
only be executed when applying redo log that was
generated by an older version of MySQL. */
} else if (page_rec_is_infimum(rec)
|| n_recs == page_get_n_recs(block->frame)) {
delete_all: delete_all:
/* We are deleting all records. */ /* We are deleting all records. */
page_create_empty(block, index, mtr); page_create_empty(block, index, mtr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment