summaryrefslogtreecommitdiff
path: root/storage/maria
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-05-20 02:07:21 +0200
committerSergei Golubchik <serg@mariadb.org>2018-05-20 20:25:35 +0200
commitff1d10ef9c8595136cc7687aa59e638cf31db332 (patch)
tree1aeb1d16ce75cb40a56d34789f0b2c083e4aa8f6 /storage/maria
parent6f530c63cd90a86e3acb5e5e6bf81c6d666025eb (diff)
parent91dfb6141f45aed5cf3fe585d8c5db86f9ddbfe9 (diff)
downloadmariadb-git-ff1d10ef9c8595136cc7687aa59e638cf31db332.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'storage/maria')
-rw-r--r--storage/maria/ha_maria.cc2
-rw-r--r--storage/maria/ma_recovery.c11
2 files changed, 13 insertions, 0 deletions
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index 16260dcf33a..b4ae46683e4 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -1334,6 +1334,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)
@@ -2236,6 +2237,7 @@ end:
_ma_reenable_logging_for_table(file,
bulk_insert_single_undo ==
BULK_INSERT_SINGLE_UNDO_AND_NO_REPAIR);
+ bulk_insert_single_undo= BULK_INSERT_NONE; // Safety
}
DBUG_RETURN(err);
}
diff --git a/storage/maria/ma_recovery.c b/storage/maria/ma_recovery.c
index ad1df75f19e..d9f2f6e77d2 100644
--- a/storage/maria/ma_recovery.c
+++ b/storage/maria/ma_recovery.c
@@ -3520,6 +3520,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];
@@ -3583,7 +3591,10 @@ my_bool _ma_reenable_logging_for_table(MARIA_HA *info, my_bool flush_pages)
if (share->now_transactional == share->base.born_transactional ||
!info->switched_transactional)
+ {
+ info->switched_transactional= FALSE;
DBUG_RETURN(0);
+ }
info->switched_transactional= FALSE;
if ((share->now_transactional= share->base.born_transactional))