Commit d2f1fd79 authored by unknown's avatar unknown

Bug#24389 mysqltest: Could not open connection 'default': 2013 Lost connection to MySQL

 - Add CR_CONN_HOST_ERROR to list of errorcode that trigger another connection
   attempt in mysqltest


client/mysqltest.c:
  Add CR_CONN_HOST_ERROR to errorcodes that trigger a reconnect
parent d2429209
...@@ -2959,10 +2959,12 @@ void safe_connect(MYSQL* mysql, const char *name, const char *host, ...@@ -2959,10 +2959,12 @@ void safe_connect(MYSQL* mysql, const char *name, const char *host,
Connect failed Connect failed
Only allow retry if this was an error indicating the server Only allow retry if this was an error indicating the server
could not be contacted could not be contacted. Error code differs depending
on protocol/connection type
*/ */
if (mysql_errno(mysql) == CR_CONNECTION_ERROR && if ((mysql_errno(mysql) == CR_CONN_HOST_ERROR ||
mysql_errno(mysql) == CR_CONNECTION_ERROR) &&
failed_attempts < opt_max_connect_retries) failed_attempts < opt_max_connect_retries)
my_sleep(connection_retry_sleep); my_sleep(connection_retry_sleep);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment