1
0
mirror of https://github.com/MariaDB/server.git synced 2025-06-13 13:01:51 +03:00

Bug#14057 mysql_ping() handles TCP and UNIX socket connections in different ways

- Retry the ping if reconnect is turned on and the error was CR_SERVER_LOST
This commit is contained in:
msvensson@neptunus.(none)
2006-02-16 13:44:56 +01:00
parent 01ddf96930
commit 56acf0a0c2

View File

@ -1370,8 +1370,12 @@ mysql_stat(MYSQL *mysql)
int STDCALL
mysql_ping(MYSQL *mysql)
{
int res;
DBUG_ENTER("mysql_ping");
DBUG_RETURN(simple_command(mysql,COM_PING,0,0,0));
res= simple_command(mysql,COM_PING,0,0,0);
if (res == CR_SERVER_LOST && mysql->reconnect)
res= simple_command(mysql,COM_PING,0,0,0);
DBUG_RETURN(res);
}