diff options
author | Monty <monty@mariadb.org> | 2015-07-26 14:31:22 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2015-07-26 14:32:45 +0300 |
commit | 517ef2bd39a0d89fc4a99201d5f97ceea1766397 (patch) | |
tree | 4b2cc8e5a95dd01a3cd02d265e30b2c496493c30 /mysys/my_thr_init.c | |
parent | f3e578ab30809dc2b92b4586ee5b0af4470a055e (diff) | |
download | mariadb-git-517ef2bd39a0d89fc4a99201d5f97ceea1766397.tar.gz |
Added easy way to assert if another thread has died.
Added some extra safety asserts in MyISAM key cache.
my_thread_var->init is now:
0 at startup
1 at init
2 when thread dies
Diffstat (limited to 'mysys/my_thr_init.c')
-rw-r--r-- | mysys/my_thr_init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c index d9dbacc8524..1e4b85583b1 100644 --- a/mysys/my_thr_init.c +++ b/mysys/my_thr_init.c @@ -372,6 +372,8 @@ void my_thread_end(void) mysql_cond_signal(&THR_COND_threads); mysql_mutex_unlock(&THR_LOCK_threads); + /* Trash variable so that we can detect false accesses to my_thread_var */ + tmp->init= 2; TRASH(tmp, sizeof(*tmp)); free(tmp); } |