mariadb_reconnect
mariadb_reconnect attempts to re-establish a dropped MariaDB Connector/C connection using the original credentials, and requires the MYSQL_OPT_RECONNECT option to be set.
Last updated
Was this helpful?
mariadb_reconnect attempts to re-establish a dropped MariaDB Connector/C connection using the original credentials, and requires the MYSQL_OPT_RECONNECT option to be set.
my_bool mariadb_reconnect(MYSQL * mysql)mysql - a mysql handle, which was previously allocated by mysql_init() or mysql_real_connect().
mariadb_reconnect() tries to reconnect to a server in case the connection died due to timeout or other errors. It uses the same credentials which were specified in mysql_real_connect().
The function will return 0 on success. The function will return an error, if the option MYSQL_OPT_RECONNECT wasn't specified before.
This function was added in Connector/C 3.0.
Last updated
Was this helpful?
Was this helpful?

