summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authormonty@narttu.mysql.fi <>2007-06-20 19:25:44 +0300
committermonty@narttu.mysql.fi <>2007-06-20 19:25:44 +0300
commite5d06603fd540cfe8b0ec59309b2ed3dd25e91aa (patch)
tree5e91a7cececd430129b2b492e116135685288a85 /libmysql
parent325b8835c7384b1471f92c953d50666124845bc4 (diff)
parent9a5908316367080a3c41043f2657a056fb5ad165 (diff)
downloadmariadb-git-e5d06603fd540cfe8b0ec59309b2ed3dd25e91aa.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index e426d2c549e..121167763ed 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -168,8 +168,23 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
}
+/*
+ Free all memory and resources used by the client library
+
+ NOTES
+ When calling this there should not be any other threads using
+ the library.
+
+ To make things simpler when used with windows dll's (which calls this
+ function automaticly), it's safe to call this function multiple times.
+*/
+
+
void STDCALL mysql_server_end()
{
+ if (!mysql_client_init)
+ return;
+
#ifdef EMBEDDED_LIBRARY
end_embedded_server();
#endif