@@ -66,7 +66,7 @@ connection default;
66
66
# When the connection is closed in this way, the error code should
67
67
# be consistent see Bug#2845 for an explanation
68
68
# depending on platform/client, either errno 2006 or 2013 can occur below
69
- --error 2006,2013
69
+ --error ER_CLIENT_INTERACTION_TIMEOUT,CR_SERVER_LOST
70
70
SELECT 2;
71
71
--echo --enable_reconnect;
72
72
--enable_reconnect
@@ -123,7 +123,7 @@ connection con1;
123
123
# When the connection is closed in this way, the error code should
124
124
# be consistent see Bug#2845 for an explanation
125
125
# depending on platform/client, either errno 2006 or 2013 can occur below
126
- --error 2006,2013
126
+ --error ER_CLIENT_INTERACTION_TIMEOUT,CR_SERVER_LOST
127
127
SELECT 2;
128
128
--echo --enable_reconnect;
129
129
--enable_reconnect
@@ -148,6 +148,7 @@ connect (default,localhost,root,,test,,);
148
148
--echo # Open con1 and set a timeout.
149
149
connect(con1,localhost,root,,);
150
150
151
+ --disable_reconnect
151
152
LET $ID= `SELECT connection_id()`;
152
153
SET @@SESSION.wait_timeout = 2;
153
154
@@ -160,8 +161,7 @@ let $wait_condition=
160
161
161
162
--echo # Check that con1 has been disconnected.
162
163
connection con1;
163
- --echo # CR_SERVER_LOST, CR_SERVER_GONE_ERROR
164
- --error 2006,2013
164
+ --error ER_CLIENT_INTERACTION_TIMEOUT,CR_SERVER_LOST
165
165
SELECT 1;
166
166
167
167
disconnect con1;
@@ -172,7 +172,7 @@ connection default;
172
172
--echo #
173
173
174
174
--echo # Open con1 and set a timeout.
175
- connect(con1,127.0.0.1,root,,);
175
+ connect(con1,127.0.0.1,root,,,,,TCP,, );
176
176
177
177
LET $ID= `SELECT connection_id()`;
178
178
SET @@SESSION.wait_timeout = 2;
@@ -186,16 +186,47 @@ let $wait_condition=
186
186
187
187
--echo # Check that con1 has been disconnected.
188
188
connection con1;
189
- --echo # CR_SERVER_LOST, CR_SERVER_GONE_ERROR
190
- --error 2006,2013
189
+ --disable_reconnect
190
+ --echo # Client interaction timeout
191
+ --error ER_CLIENT_INTERACTION_TIMEOUT,CR_SERVER_LOST
191
192
SELECT 1;
192
193
193
- disconnect con1;
194
+ --error ER_CLIENT_INTERACTION_TIMEOUT,CR_SERVER_LOST
195
+ SELECT "Check that we don't reconnect with reconnection disabled.";
196
+
197
+ --echo #
198
+ --echo # Test UNIX domain sockets timeout with reconnect.
199
+ --echo #
200
+
201
+ --echo # Open con2 and set a timeout.
202
+ connect(con2,localhost,root,,);
203
+
204
+ --echo --enable_reconnect;
205
+ --enable_reconnect
206
+ SET @is_old_connection = 1;
207
+ SELECT @is_old_connection;
208
+
209
+ LET $ID= `SELECT connection_id()`;
210
+ SET @@SESSION.wait_timeout = 2;
211
+
212
+ --echo # Wait for con2 to be disconnected.
194
213
connection default;
214
+ let $wait_condition=
215
+ SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST
216
+ WHERE ID = $ID;
217
+ --source include/wait_condition.inc
195
218
219
+ --echo # Check that con2 has been reconnected.
220
+ connection con2;
221
+ --error ER_CLIENT_INTERACTION_TIMEOUT,CR_SERVER_LOST
222
+ SELECT "Unix domain socket will hit wait_timeout with reconnect";
223
+ SELECT @is_old_connection;
224
+ connection default;
225
+ --disable_reconnect
226
+ disconnect con2;
227
+ disconnect con1;
196
228
# Wait till all disconnects are completed
197
229
--source include/wait_until_count_sessions.inc
198
-
199
230
#
200
231
# Bug #28940167 WAIT_TIMEOUT ERROR NOT CLEAR AND NOT SENT TO CLIENT BEFORE CLOSING CONNECTION
201
232
#
0 commit comments