Oracle 5.0 Reference Manual page 2183

Table of Contents

Advertisement

This function is deprecated. It is preferable to use
instead.
Return Values
Zero for success. Nonzero if an error occurred.
Errors
CR_COMMANDS_OUT_OF_SYNC
Commands were executed in an improper order.
CR_SERVER_GONE_ERROR
The MySQL server has gone away.
CR_SERVER_LOST
The connection to the server was lost during the query.
CR_UNKNOWN_ERROR
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
performs some memory management to clean up. For an embedded server application linked against
the
libmysqld
embedded server and then cleans up.
For usage information, see
"mysql_library_init()".
mysql_library_end()
mysql_server_end()
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
Section 20.6.6.39,
The choice of whether the application operates as a regular client or uses the embedded server
depends on whether you use the
final executable. For additional information, see
C API Function Descriptions
[2942]
[2942]
[2941]
library by using the
libmysqlclient
library by using the
Section 20.6.5, "C API Function
was added in MySQL 5.0.3. For older versions of MySQL, call
instead.
"mysql_library_end()".
libmysqlclient
mysql_query()
[2942]
-lmysqlclient
flag,
-lmysqld
mysql_library_end()
or
libmysqld
Section 20.6.5, "C API Function
2163
to issue an SQL
flag,
mysql_library_end()
shuts down the
Overview", and
Section 20.6.6.40,
mysql_library_end()
library at link time to produce the
Overview".
statement
KILL
to clean up. See

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents