mariadb/libmysql
Vladislav Vaintroub ff8840491c Bug#37226 Explicit call of my_thread_init() on Windows for every new thread.
Bug#33031 app linked to libmysql.lib crash if run as service in vista under 
localsystem
  

There are some problems using DllMain hook functions on Windows that 
automatically do global and per-thread initialization for libmysqld.dll

1)per-thread initialization(DLL_THREAD_ATTACH)
MySQL internally counts number of active threads that and causes a delay in in 
my_end() if not all threads are exited. But,there are threads that can be 
started either by Windows internally (often in TCP/IP scenarios) or by user 
himself - those threads are not necessarily using libmysql.dll functionality, 
but nonetheless the contribute to the count of open threads.

2)process-initialization (DLL_PROCESS_ATTACH)
my_init() calls WSAStartup that itself loads DLLs and can lead to a deadlock in 
Windows loader.

Fix is to remove dll initialization code from libmysql.dll in general case. I
still leave an environment variable LIBMYSQL_DLLINIT, which if set to any value 
will cause the old behavior (DLL init hooks will be called). This env.variable 
exists only to prevent breakage of existing Windows-only applications that 
don't do mysql_thread_init() and work ok today. Use of LIBMYSQL_DLLINIT is 
discouraged and it will be removed in 6.0
2008-09-01 17:46:37 -04:00
..
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
acinclude.m4 Import changeset 2000-07-31 21:29:14 +02:00
client_settings.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
CMakeLists.txt Merge mysql.com:/home/gluh/MySQL/Merge/5.0 2007-12-13 14:52:49 +04:00
conf_to_src.c manually merged 2004-08-18 19:57:55 +02:00
dll.c Bug#37226 Explicit call of my_thread_init() on Windows for every new thread. 2008-09-01 17:46:37 -04:00
errmsg.c Added some missing DBUG_RETURN 2006-11-23 16:41:21 +02:00
get_password.c - rename: EXCEPTIONS->EXCEPTIONS-CLIENT 2004-08-05 17:05:11 +02:00
libmysql.c fixed warnings and compile errors from the fix for bug 26243 2008-03-29 09:52:16 +02:00
libmysql.def Bug#29592 SQL Injection issue 2007-11-26 14:09:37 -02:00
libmysql.ver.in BUG#3074: Unversioned symbols in shared library 2006-01-17 18:51:08 +04:00
Makefile.am Fix for bug #32221: bug25714, mytest, mysql_client_test complaints and 2007-11-19 18:59:25 +03:00
Makefile.shared Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0 2007-12-04 20:58:21 -07:00
manager.c A fix (bug #6057: Data Type Problem in manager.c). 2004-10-18 12:43:52 +05:00