summaryrefslogtreecommitdiff
path: root/storage/innobase/dict
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-04-29 15:40:51 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-04-29 15:40:51 +0300
commit496d0372ef2ff2a570c20923af4df32a03781acd (patch)
treec15d45eeff0fbbfe6112816a72e10352551269ee /storage/innobase/dict
parentd4da131cff004e4157b755e417c49daef45ca80e (diff)
parent5ba2aa1ddc074dc89db7f265ddb61ce96f714fc8 (diff)
downloadmariadb-git-496d0372ef2ff2a570c20923af4df32a03781acd.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'storage/innobase/dict')
-rw-r--r--storage/innobase/dict/dict0stats_bg.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/storage/innobase/dict/dict0stats_bg.cc b/storage/innobase/dict/dict0stats_bg.cc
index f1b3dbaff0b..0b2e28b6476 100644
--- a/storage/innobase/dict/dict0stats_bg.cc
+++ b/storage/innobase/dict/dict0stats_bg.cc
@@ -32,6 +32,7 @@ Created Apr 25, 2012 Vasil Dimov
#include "srv0start.h"
#include "fil0fil.h"
#ifdef WITH_WSREP
+# include "trx0trx.h"
# include "mysql/service_wsrep.h"
# include "wsrep.h"
# include "log.h"
@@ -137,12 +138,12 @@ dict_stats_recalc_pool_add(
schedule new estimates for table and index statistics to be calculated.
@param[in,out] table persistent or temporary table
@param[in] thd current session */
-void dict_stats_update_if_needed(dict_table_t* table, THD* thd)
+void dict_stats_update_if_needed(dict_table_t *table, const trx_t &trx)
#else
/** Update the table modification counter and if necessary,
schedule new estimates for table and index statistics to be calculated.
@param[in,out] table persistent or temporary table */
-void dict_stats_update_if_needed_func(dict_table_t* table)
+void dict_stats_update_if_needed_func(dict_table_t *table)
#endif
{
ut_ad(table->stat_initialized);
@@ -169,9 +170,9 @@ void dict_stats_update_if_needed_func(dict_table_t* table)
generated row locks and allow BF thread
lock waits to be enqueued at head of waiting
queue. */
- if (wsrep_on(thd)
- && !wsrep_thd_is_applying(thd)
- && wsrep_thd_is_BF(thd, 0)) {
+ if (trx.is_wsrep()
+ && !wsrep_thd_is_applying(trx.mysql_thd)
+ && wsrep_thd_is_BF(trx.mysql_thd, 0)) {
WSREP_DEBUG("Avoiding background statistics"
" calculation for table %s.",
table->name.m_name);