Commit 12b01d74 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-34707: BUF_GET_RECOVER assertion failure on upgrade

buf_page_get_gen(): Relax the assertion once more.
The LSN may grow by invoking ibuf_upgrade(), that is,
when upgrading files where innodb_change_buffering!=none was used.
The LSN may also have been recovered from a log that needs
to be upgraded to the current format.
parent a8517608
......@@ -2606,8 +2606,11 @@ buf_page_get_gen(
would typically be around 60000 with the default
innodb_undo_tablespaces=3, and less than 110000 with the maximum
innodb_undo_tablespaces=127. */
ut_d(extern bool ibuf_upgrade_was_needed;)
ut_ad(mode == BUF_GET_RECOVER
? recv_recovery_is_on() || log_sys.get_lsn() < 120000
|| log_sys.get_lsn() == recv_sys.lsn + SIZE_OF_FILE_CHECKPOINT
|| ibuf_upgrade_was_needed
: !recv_recovery_is_on() || recv_sys.after_apply);
ut_ad(!mtr || mtr->is_active());
ut_ad(mtr || mode == BUF_PEEK_IF_IN_POOL);
......
......@@ -1163,8 +1163,11 @@ static dberr_t srv_log_rebuild_if_needed()
return srv_log_rebuild();
}
ut_d(bool ibuf_upgrade_was_needed;)
ATTRIBUTE_COLD static dberr_t ibuf_log_rebuild_if_needed()
{
ut_d(ibuf_upgrade_was_needed= true;)
mysql_mutex_lock(&recv_sys.mutex);
recv_sys.apply(true);
mysql_mutex_unlock(&recv_sys.mutex);
......
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