diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 2ad5064b540..81e3b83af05 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -2447,10 +2447,6 @@ DECLARE_THREAD(srv_master_thread)( ut_a(slot == srv_sys.sys_threads); loop: - if (srv_force_recovery >= SRV_FORCE_NO_BACKGROUND) { - goto suspend_thread; - } - while (srv_shutdown_state == SRV_SHUTDOWN_NONE) { srv_master_sleep(); @@ -2465,7 +2461,6 @@ loop: } } -suspend_thread: switch (srv_shutdown_state) { case SRV_SHUTDOWN_NONE: break; diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index 4c043695f1c..98dca77c61d 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -2642,7 +2642,8 @@ files_checked: /* Create the master thread which does purge and other utility operations */ - if (!srv_read_only_mode) { + if (!srv_read_only_mode + && srv_force_recovery < SRV_FORCE_NO_BACKGROUND) { thread_handles[1 + SRV_MAX_N_IO_THREADS] = os_thread_create( srv_master_thread, NULL, thread_ids + (1 + SRV_MAX_N_IO_THREADS));