Commit graph

12 commits

Author SHA1 Message Date
Vladislav Vaintroub
6445c2deae 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 20:04:17 +02:00
guilhem@gbichot4.local
3fe6684c48 fixes for build failures due to my yesterday's changeset forbidding
bool in C.
2008-02-19 18:45:11 +01:00
brian@zim.(none)
5d1d27c016 Final patch to remove the last of the OS2 support. 2006-04-15 18:17:32 -07:00
serg@serg.mylan
e1237cbc53 manually merged 2004-08-18 19:57:55 +02:00
lenz@mysql.com
1097805cf2 - rename: EXCEPTIONS->EXCEPTIONS-CLIENT 2004-08-05 17:05:11 +02:00
lenz@mysql.com
b6c0b67cf6 - Fixed libmysql license texts: added reference to the FLOSS
EXCEPTIONS file and amended the GPL text as requested by Zak
2004-08-05 11:59:17 +02:00
lenz@kallisto.local
5ce5a68b4e - Code cleanup: replaced C++-style comments with the proper syntax for
.c files (the IBM Visual Age C compiler aborts with a syntax error
   on these)
2003-09-24 08:35:02 +02:00
monty@narttu.mysql.fi
8a77f97079 Add detection of in_addr_t
Add pack_bits to pack_reclength for dynamic rows.  This solves buffer a possible buffer overflow on update.
(This will probably solve bug #563)
Fix test for available file descriptors in mysqltest
Fixed core dump bug in replication tests when running without transactional table support
2003-08-28 06:08:17 +03:00
monty@hundin.mysql.fi
b658662ae4 Update copyright
Fixed memory leak on shutdown (Affects the embedded version & MyODBC)
2001-12-06 14:10:51 +02:00
monty@hundin.mysql.fi
7cadc6e711 Changed to use my_global.h
Fixed problem with LIKE with latin1_de
Added parsing support of UNSIGNED LONG LONG
2001-09-14 02:54:33 +03:00
monty@hundin.mysql.fi
7a19987805 OS2 patch 2001-09-12 23:53:31 +03:00
bk@work.mysql.com
f4c589ff6c Import changeset 2000-07-31 21:29:14 +02:00