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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c
index d213b67377b..5d1376ea3ce 100644
--- a/mysys/my_thr_init.c
+++ b/mysys/my_thr_init.c
@@ -313,6 +313,9 @@ my_bool my_thread_init(void)
struct st_my_thread_var *tmp;
my_bool error=0;
+ if (!my_thread_global_init_done)
+ return 1; /* cannot proceed with unintialized library */
+
#ifdef EXTRA_DEBUG_THREADS
fprintf(stderr,"my_thread_init(): thread_id: 0x%lx\n",
(ulong) pthread_self());