MDEV-654 Assertion `share->now_transactional' failed in flush_log_for_bitmap on concurrent workload with Aria tables

Problem was that we the bitmap needs to be flushed before disabling
logging of redo entires, as writing the bitmap to disk by
background checkpoint may cause redo entries.
This commit is contained in:
Monty 2018-05-15 11:46:55 +03:00
parent 318097bb8f
commit 2b749a7bf4
2 changed files with 9 additions and 0 deletions

View File

@ -1312,6 +1312,7 @@ int ha_maria::check(THD * thd, HA_CHECK_OPT * check_opt)
old_proc_info= thd_proc_info(thd, "Checking status");
thd_progress_init(thd, 3);
error= maria_chk_status(param, file); // Not fatal
/* maria_chk_size() will flush the page cache for this file */
if (maria_chk_size(param, file))
error= 1;
if (!error)

View File

@ -3521,6 +3521,14 @@ void _ma_tmp_disable_logging_for_table(MARIA_HA *info,
{
MARIA_SHARE *share= info->s;
DBUG_ENTER("_ma_tmp_disable_logging_for_table");
/*
We have to ensure that bitmap is flushed, as it's checking
that share->now_transactional is set
*/
if (share->now_transactional && share->data_file_type == BLOCK_RECORD)
_ma_bitmap_flush_all(share);
if (log_incomplete)
{
uchar log_data[FILEID_STORE_SIZE];