summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2005-02-04 23:07:10 +0100
committerunknown <guilhem@mysql.com>2005-02-04 23:07:10 +0100
commit987e620d6376ae3b9047d1185dca7141585173ac (patch)
treeeb8bafc4c6c13f7dcf72116daeb6dbbede0d38c6 /include
parentededf83143df115f5feaabbbcfeea2494d7d65d5 (diff)
downloadmariadb-git-987e620d6376ae3b9047d1185dca7141585173ac.tar.gz
Backport of ChangeSet 1.1845 05/02/04 13:53:16 guilhem@mysql.com +1 -0 from 5.0.
Proposal to fix this problem: when using libmysqlclient, you must call mysql_server_end() to nicely free memory at the end of your program; it however sounds weird to call a function named *SERVER_end* when you're the CLIENT (you're not ending the server, you're ending your ability to talk to servers). So here I add two defines which should be more generic names. Our manual mentions these functions only for libmysqld API so needs some fixing, and then we can close BUG#8099 and BUG#6149. include/mysql.h: Creating synonyms (defines): mysql_library_init for mysql_server_init, mysql_library_end for mysql_server_end; these new names are more generic, so suitable when using libmysqlclient as well as libmysqld.
Diffstat (limited to 'include')
-rw-r--r--include/mysql.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/mysql.h b/include/mysql.h
index 2c0197e2300..d8a56126756 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -334,6 +334,17 @@ typedef struct st_mysql_parameters
*/
int STDCALL mysql_server_init(int argc, char **argv, char **groups);
void STDCALL mysql_server_end(void);
+/*
+ mysql_server_init/end need to be called when using libmysqld or
+ libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
+ you don't need to call it explicitely; but you need to call
+ mysql_server_end() to free memory). The names are a bit misleading
+ (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general
+ names which suit well whether you're using libmysqld or libmysqlclient. We
+ intend to promote these aliases over the mysql_server* ones.
+*/
+#define mysql_library_init mysql_server_init
+#define mysql_library_end mysql_server_end
MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void);