25.2.12. C API Embedded Server Function Descriptions
If you want to allow your application to be linked against the
embedded MySQL server library, you must use the
mysql_server_init()
and
mysql_server_end()
functions. See
Section 25.1, “libmysqld, the Embedded MySQL Server Library”.
However, to provide improved memory management, even programs
that are linked with -lmysqlclient
rather than
-lmysqld
should include calls to begin and end
use of the library. The mysql_library_init()
and mysql_library_end()
functions can be used
to do this. These actually are #define
symbols that make them equivalent to
mysql_server_init()
and
mysql_server_end()
, but the names more
clearly indicate that they should be called when beginning and
ending use of a MySQL C API library no matter whether the
application uses libmysqlclient
or
libmysqld
. For more information, see
Section 25.2.2, “C API Function Overview”.