summaryrefslogtreecommitdiff
path: root/mysys/my_thr_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/my_thr_init.c')
-rw-r--r--mysys/my_thr_init.c2
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);
}