Fixed bug in ma_loghandler.cc that could cause an assert
The assert happens in 10.6 with the following command: ./mtr --no-reorder --verbose-restart main.update_ignore_216 main.upgrade_MDEV-19650 main.upgrade_MDEV-23102-1 main.upgrade_MDEV-23102-2 main.upgrade_geometrycolumn_procedure_definer main.upgrade_mdev_24363 main.varbinary sys_vars.aria_log_file_size_basic Reviewer: Oleksandr Byelkin <sanja@mariadb.com>
This commit is contained in:
parent
131c318b16
commit
9d10b7107c
@ -7993,22 +7993,14 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
|
|||||||
}
|
}
|
||||||
else
|
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"));
|
DBUG_PRINT("info", ("There is no LSNs yet generated => do nothing"));
|
||||||
translog_unlock();
|
translog_unlock();
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBUG_ASSERT(log_descriptor.bc.buffer->prev_last_lsn != LSN_IMPOSSIBLE);
|
|
||||||
/* fix lsn if it was horizon */
|
/* fix lsn if it was horizon */
|
||||||
*lsn= log_descriptor.bc.buffer->prev_last_lsn;
|
*lsn= log_descriptor.bc.buffer->prev_last_lsn;
|
||||||
DBUG_PRINT("info", ("LSN to flush fixed to prev last lsn: " LSN_FMT,
|
DBUG_PRINT("info", ("LSN to flush fixed to prev last lsn: " LSN_FMT,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user