-
Notifications
You must be signed in to change notification settings - Fork 264
mariadb_reconnect
Georg Richter edited this page Jul 3, 2022
·
5 revisions
mariadb_reconnect - reconnects to a server
#include <mysql.h>
my_bool mariadb_reconnect(MYSQL * mysql)
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, a non zero value on error
Note:
The function will return an error, if the option MYSQL_OPT_RECONNECT
wasn't set before.
mariadb_reconnect()
was added in MariaDB Connector/C 3.0
MariaDB Connector/C Reference