From d0ebb155fe68924848b92cbc0e6f5e9958acdab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Tue, 12 Mar 2019 15:44:10 +0200 Subject: MDEV-18577: Indexes problem on import dump SQL Problem was that we skipped background persistent statistics calculation on applier nodes if thread is marked as high priority (a.k.a BF). However, on applier nodes all DDL which is replicate will be executed as high priority i.e BF. Fixed by allowing background persistent statistics calculation on applier nodes even when thread is marked as BF. This could lead BF lock waits but for queries on that node needs that statistics. --- sql/wsrep_thd.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sql/wsrep_thd.cc') diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc index a3d1961ade2..dab9f91b381 100644 --- a/sql/wsrep_thd.cc +++ b/sql/wsrep_thd.cc @@ -698,3 +698,13 @@ void wsrep_thd_auto_increment_variables(THD* thd, *increment= thd->variables.auto_increment_increment; } } + +my_bool wsrep_thd_is_applier(MYSQL_THD thd) +{ + my_bool is_applier= false; + + if (thd && thd->wsrep_applier) + is_applier= true; + + return (is_applier); +} -- cgit v1.2.1