Skip to content

Commit

Permalink
Fix for MDEV-10361: Don't try to reconnect twice: if mysql->options.r…
Browse files Browse the repository at this point in the history
…econnect is set,

ma_simple_command already tries to reconnect, so there is no need to reconnect in mysql_ping
again
  • Loading branch information
9EOR9 committed Jan 16, 2018
1 parent 6ad7e50 commit 1512448
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions libmariadb/libmariadb.c
Expand Up @@ -2897,10 +2897,7 @@ mysql_ping(MYSQL *mysql)
DBUG_ENTER("mysql_ping");
rc= simple_command(mysql,MYSQL_COM_PING,0,0,0,0);

/* if connection was terminated and reconnect is true, try again */
if (rc!=0 && mysql->reconnect)
rc= simple_command(mysql,MYSQL_COM_PING,0,0,0,0);
return rc;
DBUG_RETURN(rc);
}


Expand Down

0 comments on commit 1512448

Please sign in to comment.