mysql_init
mysql_init allocates and initializes a MYSQL structure for use with mysql_real_connect, and also initializes the thread subsystem if not already done.
Last updated
Was this helpful?
mysql_init allocates and initializes a MYSQL structure for use with mysql_real_connect, and also initializes the thread subsystem if not already done.
MYSQL * mysql_init(MYSQL * mysql);mysql - a pointer to MYSQL or NULL. In case of passing a NULL pointer mysql_init() will allocate memory and return a pointer to a MYSQL structure.
Prepares and initializes a MYSQL structure to be used with mysql_real_connect().
mysql_init() also ensures the client library is initialized, via a one-time internal initialization; it does not depend on mysql_thread_init(), which is a no-op retained for compatibility.
The mysql_init() function returns an address of a MYSQL structure, or NULL in case of memory allocation error.
Members of the MYSQL structure are not intended for application use.
Any subsequent calls to any mysql function (except mysql_options()) will fail until mysql_real_connect() was called.
Memory allocated by mysql_init() must be freed with mysql_close().
Last updated
Was this helpful?
Was this helpful?

