You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
If COM_PING failed, check if reconnect option was set before calling
mysql_ping again.
This commit is contained in:
@@ -2539,7 +2539,7 @@ mysql_ping(MYSQL *mysql)
|
||||
{
|
||||
int rc;
|
||||
rc= ma_simple_command(mysql, COM_PING, 0, 0, 0, 0);
|
||||
if (rc && mysql_errno(mysql) == CR_SERVER_LOST)
|
||||
if (rc && mysql->options.reconnect)
|
||||
rc= ma_simple_command(mysql, COM_PING, 0, 0, 0, 0);
|
||||
return rc;
|
||||
}
|
||||
|
Reference in New Issue
Block a user