diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c index b601a25966a..7e4fb5a8263 100644 --- a/storage/maria/ma_loghandler.c +++ b/storage/maria/ma_loghandler.c @@ -7993,22 +7993,14 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn, } else { - if (log_descriptor.bc.buffer->last_lsn == LSN_IMPOSSIBLE) + if (log_descriptor.bc.buffer->last_lsn == LSN_IMPOSSIBLE && + log_descriptor.bc.buffer->prev_last_lsn == LSN_IMPOSSIBLE) { - /* - In this case both last_lsn & prev_last_lsn are LSN_IMPOSSIBLE - otherwise it will go in the first IF because LSN_IMPOSSIBLE less - then any real LSN and cmp_translog_addr(*lsn, - log_descriptor.bc.buffer->prev_last_lsn) will be TRUE - */ - DBUG_ASSERT(log_descriptor.bc.buffer->prev_last_lsn == - LSN_IMPOSSIBLE); DBUG_PRINT("info", ("There is no LSNs yet generated => do nothing")); translog_unlock(); DBUG_VOID_RETURN; } - DBUG_ASSERT(log_descriptor.bc.buffer->prev_last_lsn != LSN_IMPOSSIBLE); /* fix lsn if it was horizon */ *lsn= log_descriptor.bc.buffer->prev_last_lsn; DBUG_PRINT("info", ("LSN to flush fixed to prev last lsn: " LSN_FMT,