C API Function Descriptions
2163
This function is deprecated. It is preferable to use
mysql_query()
to issue an SQL
KILL
statement
instead.
Return Values
Zero for success. Nonzero if an error occurred.
Errors
•
CR_COMMANDS_OUT_OF_SYNC
[2942]
Commands were executed in an improper order.
•
CR_SERVER_GONE_ERROR
[2942]
The MySQL server has gone away.
•
CR_SERVER_LOST
[2942]
The connection to the server was lost during the query.
•
CR_UNKNOWN_ERROR
[2941]
An unknown error occurred.
20.6.6.39.
mysql_library_end()
void mysql_library_end(void)
Description
This function finalizes the MySQL library. Call it when you are done using the library (for example, after
disconnecting from the server). The action taken by the call depends on whether your application is
linked to the MySQL client library or the MySQL embedded server library. For a client program linked
against the
libmysqlclient
library by using the
-lmysqlclient
flag,
mysql_library_end()
performs some memory management to clean up. For an embedded server application linked against
the
libmysqld
library by using the
-lmysqld
flag,
mysql_library_end()
shuts down the
embedded server and then cleans up.
For usage information, see
Section 20.6.5, “C API Function Overview”
, and
Section 20.6.6.40,
“
mysql_library_init()
”
.
mysql_library_end()
was added in MySQL 5.0.3. For older versions of MySQL, call
mysql_server_end()
instead.
20.6.6.40.
mysql_library_init()
int mysql_library_init(int argc, char **argv, char **groups)
Description
Call this function to initialize the MySQL library before you call any other MySQL function, whether
your application is a regular client program or uses the embedded server. If the application uses the
embedded server, this call starts the server and initializes any subsystems (
mysys
,
InnoDB
, and so
forth) that the server uses.
After your application is done using the MySQL library, call
mysql_library_end()
to clean up. See
Section 20.6.6.39, “
mysql_library_end()
”
.
The choice of whether the application operates as a regular client or uses the embedded server
depends on whether you use the
libmysqlclient
or
libmysqld
library at link time to produce the
final executable. For additional information, see
Section 20.6.5, “C API Function Overview”
.
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...