Skip to content

Commit 7117e4c

Browse files
waltmandveeden
authored andcommitted
accept 4031 as a valid return code when connection closed
As of 8.0.24 MySQL writes the reason the connection was closed before closing it, so 4031 (ER_CLIENT_INTERACTION_TIMEOUT) is now an valid return code. See https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-24.html#mysqld-8-0-24-connection-management for more information. This addresses the issue reported in #329
1 parent b36b122 commit 7117e4c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/rt85919-fetch-lost-connection.t

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,16 @@ if (not $ok) {
3939
# if we're connected via a local socket we receive error 2006
4040
# (CR_SERVER_GONE_ERROR) but if we're connected using TCP/IP we get
4141
# 2013 (CR_SERVER_LOST)
42+
#
43+
# as of 8.0.24 MySQL writes the reason the connection was closed
44+
# before closing it, so 4031 (ER_CLIENT_INTERACTION_TIMEOUT) is
45+
# now an valid return code
4246
if ($DBI::err == 2006) {
4347
pass("received error 2006 (CR_SERVER_GONE_ERROR)");
4448
} elsif ($DBI::err == 2013) {
4549
pass("received error 2013 (CR_SERVER_LOST)");
50+
} elsif ($DBI::err == 4031) {
51+
pass("received error 4031 (ER_CLIENT_INTERACTION_TIMEOUT)");
4652
} else {
4753
fail('Should return error 2006 or 2013');
4854
}

0 commit comments

Comments
 (0)