Skip to content

Commit 88f2ec6

Browse files
author
Nirbhay Choubey
committed
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.
1 parent e1c6f28 commit 88f2ec6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

storage/maria/ha_maria.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2839,9 +2839,10 @@ int ha_maria::implicit_commit(THD *thd, bool new_trn)
28392839
int error;
28402840
uint locked_tables;
28412841
DYNAMIC_ARRAY used_tables;
2842+
extern my_bool plugins_are_initialized;
28422843

28432844
DBUG_ENTER("ha_maria::implicit_commit");
2844-
if (!maria_hton || !(trn= THD_TRN))
2845+
if (!maria_hton || !plugins_are_initialized || !(trn= THD_TRN))
28452846
DBUG_RETURN(0);
28462847
if (!new_trn && (thd->locked_tables_mode == LTM_LOCK_TABLES ||
28472848
thd->locked_tables_mode == LTM_PRELOCKED_UNDER_LOCK_TABLES))

0 commit comments

Comments
 (0)