2729 Vladislav Vaintroub 2008-09-01
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
There are some problems using DllMain hook functions on Windows that
automatically do global and per-thread initialization for libmysqld.dll
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.
my_init() calls WSAStartup that itself loads DLLs and can lead to a deadlock in
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
2728 Vladislav Vaintroub 2008-09-01 [merge]
Diff too large for email (2416488 lines, the limit is 1000000).
|• bzr push into mysql-5.1 branch (vvaintroub:2728 to 2729) Bug#33031 Bug#37226||Vladislav Vaintroub||1 Sep|