@@ -42379,6 +42382,9 @@ included the thread libraries on the link/compile line.
@menu
* libmysqld overview:: Overview of the Embedded MySQL Server Library
* libmysqld compiling:: Compiling Programs with @code{libmysqld}
* libmysqld restrictions::
* libmysqld options::
* libmysqld TODO::
* libmysqld example:: A Simple Embedded Server Example
* libmysqld licensing:: Licensing the Embedded Server
@end menu
@@ -42391,21 +42397,100 @@ full-featured MySQL server inside the client application. The
main benefits are increased speed and more simple management for
embedded applications.
@node libmysqld compiling, libmysqld example, libmysqld overview, libmysqld
The API is identical for the embedded MySQL version and MySQL
client/server version. To change an old threaded application to use the
embedded library, on normall only have to add calls to the following
functions:
@multitable @columnfractions .25 .7
@item @code{mysql_server_init()} @tab Should be called before any other other MySQL function is called, preferably early in the @code{main()} function.
@item @code{mysql_server_end()} @tab Should be called before doing an exit of your program.
@item @code{mysql_thread_init()} @tab Should be called in all threads you are created that will access MySQL.
@item @code{mysql_thread_end()} @tab Should be called before calling @code{pthread_exit()}
@end multitable
and link your code with @code{libmysqld.a} instead of @code{libmysqlclient.a}.
The above @code{mysql_server_xxx} functions are also included in
@code{libmysqld.a} to allow you to change between the embedded and the
client/server version by just linking your application with the right