diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-06-07 09:20:07 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-06-07 09:20:07 +0300 |
commit | 5a33a376825556a5187df10f09e709f18eaa7b32 (patch) | |
tree | 6bb213d68066670d7f30fa5d3ac588aae67cb04c /sql/log.cc | |
parent | cd1de25912c0d004311cb6d947860e8242cc1499 (diff) | |
parent | 31fc2eb4bccee8ac3cc2fa26f73a491041e5efd4 (diff) | |
download | mariadb-git-5a33a376825556a5187df10f09e709f18eaa7b32.tar.gz |
Merge 10.8 into 10.9
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 b6fde40abeb..619d5ffaccd 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2265,7 +2265,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); } @@ -11928,13 +11934,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); |