mysql_thread_init(3)

mysql_thread_init3

Name

mysql_thread_init - initialize thread

Synopsis

#include <mysql.h>
my_bool mysql_thread_init(void );

Description

Thread initialization for multi threaded clients. Multi threaded clients should call mysql_thread_init() at the beginning of the thread initialization to initialize thread specific client library variables. If mysql_thread_init() was not called explicitly, it will be called automatically by mysql_init(3) or mysql_real_connect(3).

Notes

Before a client thread ends the mysql_thread_end(3) function must be called to release memory - otherwise the client library will report an error.

Return value

Returns zero if successful or 1 if an error occurred.

See also

•

mysql_thread_end(3)

•

mysql_thread_safe(3)

Releases

3 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13–Arch

History

This function is deprecated since MariaDB Connector/C 3.0.0.

From mariadb 13.0.2-2 in Arch Linux 2026-11-01. Also shipped by mariadb-lts. Parsed by carta from the page's man source.