diff options
author | Rich Prohaska <prohaska@tokutek.com> | 2015-01-19 09:45:41 -0500 |
---|---|---|
committer | Rich Prohaska <prohaska@tokutek.com> | 2015-01-19 09:45:41 -0500 |
commit | e7f48475d9d6bfa5b410107066582954ad7d2add (patch) | |
tree | 14bdabe8a5f9516f65dc3c3d8d7ff664a3099da8 /storage/tokudb/ha_tokudb.cc | |
parent | 25c152b0055c4a6d0105eac917fba0df8cab0c68 (diff) | |
download | mariadb-git-e7f48475d9d6bfa5b410107066582954ad7d2add.tar.gz |
DB-798 add the tokudb_rpl_check_readonly variable for RFR
Diffstat (limited to 'storage/tokudb/ha_tokudb.cc')
-rw-r--r-- | storage/tokudb/ha_tokudb.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc index 0514909c4be..7c9d295ba59 100644 --- a/storage/tokudb/ha_tokudb.cc +++ b/storage/tokudb/ha_tokudb.cc @@ -3545,8 +3545,12 @@ static void maybe_do_unique_checks_delay(THD *thd) { } } +static bool need_read_only(THD *thd) { + return opt_readonly || !THDVAR(thd, rpl_check_readonly); +} + static bool do_unique_checks(THD *thd, bool do_rpl_event) { - if (do_rpl_event && thd->slave_thread && opt_readonly && !THDVAR(thd, rpl_unique_checks)) + if (do_rpl_event && thd->slave_thread && need_read_only(thd) && !THDVAR(thd, rpl_unique_checks)) return false; else return !thd_test_options(thd, OPTION_RELAXED_UNIQUE_CHECKS); |