Oracle 5.0 Reference Manual page 2242

Table of Contents

Advertisement

Description
my_init()
library, it also calls
It is necessary for
use of the MySQL library. However,
mysql_library_init(), mysql_server_init(), and mysql_connect(). If you ensure that
your program invokes one of those functions before any other MySQL calls, there is no need to invoke
my_init()
To access the prototype for my_init(), your program should include these header files:
#include <my_global.h>
#include <my_sys.h>
Return Values
None.
20.6.11.2.
mysql_thread_end()
void mysql_thread_end(void)
Description
This function needs to be called before calling
mysql_thread_init().
mysql_thread_end()
avoid a memory leak.
Return Values
None.
20.6.11.3.
mysql_thread_init()
my_bool mysql_thread_init(void)
Description
This function must be called early within each created thread to initialize thread-specific variables.
However, you may not necessarily need to invoke it explicitly:
automatically called by my_init(), which itself is automatically called by mysql_init(),
mysql_library_init(), mysql_server_init(), and mysql_connect(). If you invoke any of
those functions,
Return Values
Zero if successful. Nonzero if an error occurred.
20.6.11.4.
mysql_thread_safe()
unsigned int mysql_thread_safe(void)
Description
This function indicates whether the client library is compiled as thread-safe.
Return Values
1 if the client library is thread-safe, 0 otherwise.
C API Threaded Function Descriptions
initializes some global variables that MySQL needs. If you are using a thread-safe client
mysql_thread_init()
to be called early in the initialization phase of a program's
my_init()
explicitly.
is not invoked automatically by the client library. It must be called explicitly to
mysql_thread_init()
for this thread.
is automatically called by mysql_init(),
my_init()
pthread_exit()
will be called for you.
2222
to free memory allocated by
mysql_thread_init()
is

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents