From a617347fb6b0623844cc2456d4c98e10282043ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 20 Jan 2021 10:13:20 +0200 Subject: [PATCH] Fix open_close_connections The assumption that errno would be the same for the duration of the whole call chain is wrong as it's possible that other calls that modify it are made. Using the actual error string itself is much more reliable. --- system-test/open_close_connections.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-test/open_close_connections.cpp b/system-test/open_close_connections.cpp index 676cf88ac..b6f55e2a8 100644 --- a/system-test/open_close_connections.cpp +++ b/system-test/open_close_connections.cpp @@ -21,7 +21,7 @@ void query_thread(TestConnections& test, int thread_id) mariadb_get_infov(conn, MARIADB_CONNECTION_PORT, &port); mariadb_get_infov(conn, MARIADB_CONNECTION_HOST, &host); - test.expect(mysql_errno(conn) == 0 || errno == EADDRNOTAVAIL, + test.expect(mysql_errno(conn) == 0 || strstr(mysql_error(conn), "system error: 110") "Error opening conn to %s:%u, thread num is %d, iteration %ld, error is: %s\n", host, port, thread_id, i, mysql_error(conn));