summaryrefslogtreecommitdiff
path: root/storage/maria/ma_loghandler.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/maria/ma_loghandler.c')
-rw-r--r--storage/maria/ma_loghandler.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c
index 0e0c327e918..e168fe5c8cb 100644
--- a/storage/maria/ma_loghandler.c
+++ b/storage/maria/ma_loghandler.c
@@ -7995,22 +7995,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,