summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authormsvensson@neptunus.(none) <>2006-12-04 15:48:34 +0100
committermsvensson@neptunus.(none) <>2006-12-04 15:48:34 +0100
commitc2488ba10f8ec2b4c2dcd880e688f4864dadd467 (patch)
tree1de4cdfb3de563de7be75d6aebd9554a38cb55ba /client
parentfb2ffbf203404399dae1900c7f19ce2c5f3969a0 (diff)
downloadmariadb-git-c2488ba10f8ec2b4c2dcd880e688f4864dadd467.tar.gz
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
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 372e62cbdcc..2dcf718918e 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -2959,10 +2959,12 @@ void safe_connect(MYSQL* mysql, const char *name, const char *host,
Connect failed
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)
my_sleep(connection_retry_sleep);
else