summaryrefslogtreecommitdiff
path: root/storage/maria
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2016-09-28 13:23:31 -0400
committerNirbhay Choubey <nirbhay@mariadb.com>2016-11-07 11:53:56 -0500
commit7c38a94435976e9f311e9b84953ffbb3a9139807 (patch)
tree260bbda06ce8ff334662ecae18898047d217aa2a /storage/maria
parent458648e5daf736efea8d5228cfff555f30f0e793 (diff)
downloadmariadb-git-7c38a94435976e9f311e9b84953ffbb3a9139807.tar.gz
MDEV-10041: Server crashes sporadically during bootstrap while running wsrep tests
The crash is caused due to a race condition where wsrep startup threads invoke ha_maria::implicit_commit() method while maria_hton is partially initialized. The fix is to skip this method if plugins are uninitialized.
Diffstat (limited to 'storage/maria')
-rw-r--r--storage/maria/ha_maria.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index 844e8627939..fc8a39119e3 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -2839,9 +2839,10 @@ int ha_maria::implicit_commit(THD *thd, bool new_trn)
int error;
uint locked_tables;
DYNAMIC_ARRAY used_tables;
+ extern my_bool plugins_are_initialized;
DBUG_ENTER("ha_maria::implicit_commit");
- if (!maria_hton || !(trn= THD_TRN))
+ if (!maria_hton || !plugins_are_initialized || !(trn= THD_TRN))
DBUG_RETURN(0);
if (!new_trn && (thd->locked_tables_mode == LTM_LOCK_TABLES ||
thd->locked_tables_mode == LTM_PRELOCKED_UNDER_LOCK_TABLES))