Commit dcdc1c6d authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-13452 Assertion `!recv_no_log_write' failed in log_reserve_and_open()

The debug flag recv_no_log_write prohibits writes of redo log records for
modifying page data. The debug assertion was failing when fil_names_clear()
was writing the informative MLOG_FILE_NAME and MLOG_CHECKPOINT records
which do not modify any data.

log_reserve_and_open(), log_write_low(): Remove the debug assertion.

log_pad_current_log_block(), mtr_write_log(),
mtr_t::Command::prepare_write(): Add the debug assertion.
parent a33220fb
...@@ -359,7 +359,6 @@ log_reserve_and_open( ...@@ -359,7 +359,6 @@ log_reserve_and_open(
loop: loop:
ut_ad(log_mutex_own()); ut_ad(log_mutex_own());
ut_ad(!recv_no_log_write);
if (log_sys->is_extending) { if (log_sys->is_extending) {
log_mutex_exit(); log_mutex_exit();
...@@ -416,7 +415,6 @@ log_write_low( ...@@ -416,7 +415,6 @@ log_write_low(
ut_ad(log_mutex_own()); ut_ad(log_mutex_own());
part_loop: part_loop:
ut_ad(!recv_no_log_write);
/* Calculate a part length */ /* Calculate a part length */
data_len = (log->buf_free % OS_FILE_LOG_BLOCK_SIZE) + str_len; data_len = (log->buf_free % OS_FILE_LOG_BLOCK_SIZE) + str_len;
...@@ -2291,6 +2289,7 @@ log_pad_current_log_block(void) ...@@ -2291,6 +2289,7 @@ log_pad_current_log_block(void)
ulint i; ulint i;
lsn_t lsn; lsn_t lsn;
ut_ad(!recv_no_log_write);
/* We retrieve lsn only because otherwise gcc crashed on HP-UX */ /* We retrieve lsn only because otherwise gcc crashed on HP-UX */
lsn = log_reserve_and_open(OS_FILE_LOG_BLOCK_SIZE); lsn = log_reserve_and_open(OS_FILE_LOG_BLOCK_SIZE);
......
...@@ -478,6 +478,7 @@ mtr_write_log( ...@@ -478,6 +478,7 @@ mtr_write_log(
const ulint len = log->size(); const ulint len = log->size();
mtr_write_log_t write_log; mtr_write_log_t write_log;
ut_ad(!recv_no_log_write);
DBUG_PRINT("ib_log", DBUG_PRINT("ib_log",
(ULINTPF " extra bytes written at " LSN_PF, (ULINTPF " extra bytes written at " LSN_PF,
len, log_sys->lsn)); len, log_sys->lsn));
...@@ -799,6 +800,8 @@ mtr_t::release_page(const void* ptr, mtr_memo_type_t type) ...@@ -799,6 +800,8 @@ mtr_t::release_page(const void* ptr, mtr_memo_type_t type)
ulint ulint
mtr_t::Command::prepare_write() mtr_t::Command::prepare_write()
{ {
ut_ad(!recv_no_log_write);
switch (m_impl->m_log_mode) { switch (m_impl->m_log_mode) {
case MTR_LOG_SHORT_INSERTS: case MTR_LOG_SHORT_INSERTS:
ut_ad(0); ut_ad(0);
......
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