Commit 3f9c4a91 authored by guilhem@mysql.com's avatar guilhem@mysql.com

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.
parent 44c2dcff
...@@ -334,6 +334,17 @@ typedef struct st_mysql_parameters ...@@ -334,6 +334,17 @@ typedef struct st_mysql_parameters
*/ */
int STDCALL mysql_server_init(int argc, char **argv, char **groups); int STDCALL mysql_server_init(int argc, char **argv, char **groups);
void STDCALL mysql_server_end(void); 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); MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment