summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/narttu.mysql.fi>2007-06-20 19:22:27 +0300
committerunknown <monty@mysql.com/narttu.mysql.fi>2007-06-20 19:22:27 +0300
commit9b8b0000cea134136d5a097629a792da593e35e0 (patch)
treed39033b4d7c982ed0f9793c4c42491e929ba19bd /libmysql
parentf5bc5381ae6142c4de27b282fb9cd63130b174f6 (diff)
downloadmariadb-git-9b8b0000cea134136d5a097629a792da593e35e0.tar.gz
Allow multiple calls to mysql_server_end()
(Part of fix for Bug#25621 Error in my_thread_global_end(): 1 threads didn't exit) Give correct error message if InnoDB table is not found (This allows us to drop a an innodb table that is not in the InnoDB registery) BitKeeper/etc/ignore: added include/abi_check libmysql/libmysql.c: Allow multiple calls to mysql_server_end() (Part of fix for Bug#25621 Error in my_thread_global_end(): 1 threads didn't exit) mysql-test/r/innodb_mysql.result: Test case for drop of table that only has a .frm file mysql-test/t/innodb_mysql.test: Test case for drop of table that only has a .frm file sql/ha_innodb.cc: Give correct error message if InnoDB table is not found. (This allows us to drop a an innodb table that is not in the InnoDB registery)
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