procedure mysql_server_end;
{ "Jeremiah Gowdy" <jgowdycox.net> wrote on 10/11/2005 03:08:40 AM:
The Windows
DLL is thread safe. You do not have to call my_init()
and my_thread_init() because Windows DLLs receive events when they
are attached to a new process and when they are attached to a new
thread in a process. This is one of the nicer features of Windows
shared libraries. Other than that, you don't have to do anything
special. I am a heavy user of libmysql under
Win32. You simply
mysql_init() your
MYSQL struct, and then mysql_real_connect() and
you're ready to mysql_query().
New on February 17, 2009 02:27AM: This is true until 5.0.77 -
since this version this nice feature ist removed from
dll.c.
To obtain the previous behavior (
DLL initialization code will be
called), set the LIBMYSQL_DLLINIT environment variable to
any value.
http://forums.mysql.com/read.php?3,248207,248207 }
function mysql_thread_init: my_bool; //called internal by mysql_init or mysql_server_init
{ New on February 17, 2009 02:27AM: Since 5.0.77 mysql_thread_end
is not called during DllMain() if the LIBMYSQL_DLLINIT environment variable is
not set. So it is necessary to call mysql_thread_end to avoid memory leaks. }
procedure mysql_thread_end;