You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-07 02:42:49 +03:00
Fix for MDEV-10361: Don't try to reconnect twice: if mysql->options.reconnect is set,
ma_simple_command already tries to reconnect, so there is no need to reconnect in mysql_ping again
This commit is contained in:
@@ -2539,13 +2539,7 @@ mysql_stat(MYSQL *mysql)
|
||||
int STDCALL
|
||||
mysql_ping(MYSQL *mysql)
|
||||
{
|
||||
int rc;
|
||||
rc= ma_simple_command(mysql, COM_PING,0,0,0,0);
|
||||
|
||||
/* if connection was terminated and reconnect is true, try again */
|
||||
if (rc!=0 && mysql->options.reconnect)
|
||||
rc= ma_simple_command(mysql, COM_PING,0,0,0,0);
|
||||
return rc;
|
||||
return ma_simple_command(mysql, COM_PING,0,0,0,0);
|
||||
}
|
||||
|
||||
char * STDCALL
|
||||
|
Reference in New Issue
Block a user