[Commits] 6a6b253: MDEV-10041: Server crashes sporadically during bootstrap while running wsrep tests

Nirbhay Choubey nirbhay at mariadb.com
Sat Sep 24 06:55:53 EEST 2016


revision-id: 6a6b253a6ecbd4d3dd254044d12ec64475453275 (mariadb-10.1.17-21-g6a6b253)
parent(s): fa3fcdbd5f3733da5529477829eac1b3b00d395f
author: Nirbhay Choubey
committer: Nirbhay Choubey
timestamp: 2016-09-23 23:55:50 -0400
message:

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.

---
 storage/maria/ha_maria.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index 5fdd2a9..c6d457e 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))


More information about the commits mailing list