diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-06-06 14:56:20 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-06-06 14:56:20 +0300 |
commit | 7e39470e337aeeab4ee3e73336c2fff88609529f (patch) | |
tree | a2bb0598aeb3e78efcc0cfc2509a22f951ee5447 /sql/log.cc | |
parent | 477776bfed892f3f7cadcef16e860a1232f59952 (diff) | |
parent | 4179f93d28035ea2798cb1c16feeaaef87ab4775 (diff) | |
download | mariadb-git-7e39470e337aeeab4ee3e73336c2fff88609529f.tar.gz |
Merge 10.6 into 10.7
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/log.cc b/sql/log.cc index 3d92fde335e..468f171ae2c 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2139,7 +2139,13 @@ int binlog_commit(THD *thd, bool all, bool ro_1pc) thd->backup_stage(&org_stage); THD_STAGE_INFO(thd, stage_binlog_write); +#ifdef WITH_WSREP + // DON'T clear stmt cache in case we are in transaction + if (!cache_mngr->stmt_cache.empty() && + (!wsrep_on(thd) || ending_trans(thd, all))) +#else if (!cache_mngr->stmt_cache.empty()) +#endif { error= binlog_commit_flush_stmt_cache(thd, all, cache_mngr); } @@ -11757,13 +11763,13 @@ maria_declare_plugin_end; #ifdef WITH_WSREP #include "wsrep_mysqld.h" -IO_CACHE *wsrep_get_trans_cache(THD * thd) +IO_CACHE *wsrep_get_cache(THD * thd, bool is_transactional) { DBUG_ASSERT(binlog_hton->slot != HA_SLOT_UNDEF); binlog_cache_mngr *cache_mngr = (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); if (cache_mngr) - return cache_mngr->get_binlog_cache_log(true); + return cache_mngr->get_binlog_cache_log(is_transactional); WSREP_DEBUG("binlog cache not initialized, conn: %llu", thd->thread_id); |