From 2a4881800c6fa78a810d29ff2048956175fd0f6f Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 30 Jan 2017 01:15:30 +0100 Subject: InnoDB: don't pthread_join() a thread that wasn't created this fixes the crash in innodb.101_compatibility test --- storage/innobase/handler/ha_innodb.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 9707e24390d..fd9702c727e 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -4607,7 +4607,9 @@ innobase_end( } innobase_space_shutdown(); - pthread_join(thd_destructor_thread, NULL); + if (!srv_read_only_mode) { + pthread_join(thd_destructor_thread, NULL); + } mysql_mutex_destroy(&innobase_share_mutex); mysql_mutex_destroy(&commit_cond_m); -- cgit v1.2.1