Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 35.4Mb
PDF (A4) - 35.5Mb
PDF (RPM) - 34.6Mb
EPUB - 8.7Mb
HTML Download (TGZ) - 8.5Mb
HTML Download (Zip) - 8.5Mb
HTML Download (RPM) - 7.3Mb
Eclipse Doc Plugin (TGZ) - 9.3Mb
Eclipse Doc Plugin (Zip) - 11.5Mb
Man Pages (TGZ) - 201.5Kb
Man Pages (Zip) - 306.8Kb
Info (Gzip) - 3.3Mb
Info (Zip) - 3.3Mb
Excerpts from this Manual

25.8.12.2 mysql_thread_end()

void mysql_thread_end(void)

Description

Call this function before calling pthread_exit() to free memory allocated by mysql_thread_init().

mysql_thread_end() is not invoked automatically by the client library. Before MySQL 5.7.9, it must be called for each mysql_thread_init() call to avoid a memory leak. As of MySQL 5.7.9, C API internals were reimplemented to reduce the amount of information allocated by mysql_thread_init() that must be freed by mysql_thread_end():

Return Values

None.


User Comments
  Posted by Armin Schöffmann on March 6, 2005
According to dll.c:
Within win32, LibMain calls mysql_thread_init() and mysql_thread_end() automatically for each newly created thread after the lib has been loaded.
Therefor it shouldn't be necessary to call these functions again. As I said, only for win32 and only if we use the dynamic library.
Sign Up Login You must be logged in to post a comment.