summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <jani@labbari.dsl.inet.fi>2007-07-06 13:49:15 +0300
committerunknown <jani@labbari.dsl.inet.fi>2007-07-06 13:49:15 +0300
commitd4e6d4b2c1fba6d198c1f02967dd1b038a092068 (patch)
tree9de604cc4c8279aefe5b1ea4f873aef6f2ca9cbe /libmysql
parent48782e344c4410ad05ac0a2244aff7c943aa3c39 (diff)
parent0b24005753b8ddc05827aa29744f75a8538bfeba (diff)
downloadmariadb-git-d4e6d4b2c1fba6d198c1f02967dd1b038a092068.tar.gz
Merge labbari.dsl.inet.fi:/home/my/bk/mysql-5.0-marvel
into labbari.dsl.inet.fi:/home/my/bk/mysql-5.1-marvel BitKeeper/etc/ignore: auto-union libmysql/libmysql.c: Auto merged mysql-test/r/innodb_mysql.result: Auto merged mysql-test/include/mix1.inc: Manual merge from 5.0 storage/innobase/handler/ha_innodb.cc: Manual merge from 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 f994397b8fd..a05d061204b 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