From c4b53b218c71aff3410ec4358dfec2b9d0e1e1b4 Mon Sep 17 00:00:00 2001 From: "df@pippilotta.erinye.com" <> Date: Thu, 21 Jun 2007 08:58:39 +0200 Subject: [PATCH] Steal part of fix for bug#25621 from monty for 5.0.44. --- libmysql/libmysql.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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