diff options
Diffstat (limited to 'storage/xtradb/srv/srv0srv.c')
-rw-r--r-- | storage/xtradb/srv/srv0srv.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/storage/xtradb/srv/srv0srv.c b/storage/xtradb/srv/srv0srv.c index 65bea0d0a6e..9e863765dc0 100644 --- a/storage/xtradb/srv/srv0srv.c +++ b/storage/xtradb/srv/srv0srv.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, 2009 Google Inc. Copyright (c) 2009, Percona Inc. Copyright (c) 2013, 2014, SkySQL Ab. All Rights Reserved. @@ -3373,10 +3373,8 @@ srv_redo_log_follow_thread( } while (srv_shutdown_state < SRV_SHUTDOWN_LAST_PHASE); - srv_track_changed_pages = FALSE; log_online_read_shutdown(); os_event_set(srv_redo_log_thread_finished_event); - srv_redo_log_thread_started = FALSE; /* Defensive, not required */ my_thread_end(); os_thread_exit(NULL); @@ -3555,6 +3553,7 @@ srv_master_thread( ib_uint64_t oldest_lsn; ib_time_t last_print_time; + my_thread_init(); #ifdef UNIV_DEBUG_THREAD_CREATION fprintf(stderr, "Master thread starts, id %lu\n", os_thread_pf(os_thread_get_curr_id())); @@ -4263,6 +4262,7 @@ suspend_thread: os_event_wait(slot->event); if (srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS) { + my_thread_end(); os_thread_exit(NULL); } @@ -4288,6 +4288,7 @@ srv_purge_thread( ulint next_itr_time; ib_int64_t sig_count; + my_thread_init(); ut_a(srv_n_purge_threads == 1); #ifdef UNIV_PFS_THREAD @@ -4396,6 +4397,8 @@ srv_purge_thread( os_thread_pf(os_thread_get_curr_id())); #endif /* UNIV_DEBUG_THREAD_CREATION */ + my_thread_end(); + /* We count the number of threads in os_thread_exit(). A created thread should always use that to exit and not use return() to exit. */ os_thread_exit(NULL); |