From e29144b4b5bedd1239c0045f73316a42eda1521d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 22 Mar 2006 09:55:26 +0100 Subject: Define USE_TLS when compiling libmysql.dll, to avoid crashing when loaded at runtime. extra/comp_err.c: Don't use DBUG after my_end, crashes on Windows with USE_TLS. include/my_dbug.h: Add missing DBUG_LEAVE in non-debug builds. include/my_pthread.h: Add comment explaining USE_TLS. libmysql/cmakelists.txt: Add USE_TLS to avoid crashing when loading libmysql.dll at runtime. mysys/cmakelists.txt: Add USE_TLS to avoid crashing when loading libmysql.dll at runtime. mysys/my_init.c: Don't use DBUG after my_thread_end(), as it crashes on Windows TLS. --- mysys/my_init.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mysys/my_init.c') diff --git a/mysys/my_init.c b/mysys/my_init.c index efeee0fbc76..31757cd5df0 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -134,7 +134,10 @@ void my_end(int infoflag) */ FILE *info_file= DBUG_FILE; my_bool print_info= (info_file != stderr); - DBUG_ENTER("my_end"); + /* We do not use DBUG_ENTER here, as after cleanup DBUG is no longer + operational, so we cannot use DBUG_RETURN. + */ + DBUG_PRINT("info",("Shutting down")); if (!info_file) { info_file= stderr; @@ -214,7 +217,6 @@ Voluntary context switches %ld, Involuntary context switches %ld\n", WSACleanup(); #endif /* __WIN__ */ my_init_done=0; - DBUG_VOID_RETURN; } /* my_end */ -- cgit v1.2.1