diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-04-11 10:18:04 -0400 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-04-11 10:18:04 -0400 |
commit | 663068c6eea736a38eff9ac183326d6c7e4e239b (patch) | |
tree | 54927ab8209a73403320aac67b6172508caed7d6 /storage | |
parent | 5c579482eb2dd33c7fea80ea1ab412977606458a (diff) | |
parent | 6fa5e0814662d691be1a29bf88332348ec7c50c9 (diff) | |
download | mariadb-git-663068c6eea736a38eff9ac183326d6c7e4e239b.tar.gz |
Merge remote-tracking branch 'mysql/5.5' into 5.5mariadb-5.5.55
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/srv/srv0srv.c | 7 | ||||
-rw-r--r-- | storage/innobase/trx/trx0roll.c | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c index 1cd21ac5a19..d5b0208382f 100644 --- a/storage/innobase/srv/srv0srv.c +++ b/storage/innobase/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. @@ -2787,6 +2787,7 @@ srv_master_thread( ulint i; 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())); @@ -3242,6 +3243,7 @@ suspend_thread: os_event_wait(slot->event); if (srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS) { + my_thread_end(); os_thread_exit(NULL); } @@ -3265,6 +3267,7 @@ srv_purge_thread( ulint retries = 0; ulint n_total_purged = ULINT_UNDEFINED; + my_thread_init(); ut_a(srv_n_purge_threads == 1); #ifdef UNIV_PFS_THREAD @@ -3349,6 +3352,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); diff --git a/storage/innobase/trx/trx0roll.c b/storage/innobase/trx/trx0roll.c index 877a478e50a..638e06191bc 100644 --- a/storage/innobase/trx/trx0roll.c +++ b/storage/innobase/trx/trx0roll.c @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved. +Copyright (c) 2017, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -610,12 +611,15 @@ trx_rollback_or_clean_all_recovered( /*!< in: a dummy parameter required by os_thread_create */ { + my_thread_init(); + #ifdef UNIV_PFS_THREAD pfs_register_thread(trx_rollback_clean_thread_key); #endif /* UNIV_PFS_THREAD */ trx_rollback_or_clean_recovered(TRUE); + 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. */ |