Commit e7fc8cd6 authored by Monty's avatar Monty

MDEV-654 Assertion `share->now_transactional' failed in flush_log_for_bitmap...

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

I was able to repeat the problem with old version of randgen

Reason for crash:

- It's not safe to change share->now_transactional if there are changed
bitmaps in the pagecache as flushing these can cause redo-entries and
the bitmap flush code checks that share->now_transactional is set.

Fixed by flushing bitmaps in _ma_tmp_disable_logging_for_table() before
we set share->now_transactional to 0
parent e06c0298
...@@ -1335,6 +1335,7 @@ int ha_maria::check(THD * thd, HA_CHECK_OPT * check_opt) ...@@ -1335,6 +1335,7 @@ int ha_maria::check(THD * thd, HA_CHECK_OPT * check_opt)
old_proc_info= thd_proc_info(thd, "Checking status"); old_proc_info= thd_proc_info(thd, "Checking status");
thd_progress_init(thd, 3); thd_progress_init(thd, 3);
error= maria_chk_status(param, file); // Not fatal 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)) if (maria_chk_size(param, file))
error= 1; error= 1;
if (!error) if (!error)
......
...@@ -3520,6 +3520,14 @@ void _ma_tmp_disable_logging_for_table(MARIA_HA *info, ...@@ -3520,6 +3520,14 @@ void _ma_tmp_disable_logging_for_table(MARIA_HA *info,
{ {
MARIA_SHARE *share= info->s; MARIA_SHARE *share= info->s;
DBUG_ENTER("_ma_tmp_disable_logging_for_table"); 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) if (log_incomplete)
{ {
uchar log_data[FILEID_STORE_SIZE]; uchar log_data[FILEID_STORE_SIZE];
......
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