Skip to content

Commit 3b93f13

Browse files
committed
Revert "ext/mysqlnd: support ER_CLIENT_INTERACTION_TIMEOUT"
This reverts commit 5035b85. This broke Doctrine DBAL tests - more discussion in GH-13618.
1 parent ed84bcd commit 3b93f13

File tree

5 files changed

+2
-54
lines changed

5 files changed

+2
-54
lines changed

NEWS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ PHP NEWS
1616

1717
- MySQLnd:
1818
. Fix shift out of bounds on 32-bit non-fast-path platforms. (nielsdos)
19-
. Fixed bug #81335 (PHP Warning, Packets out of order after connection
20-
timeout). (Appla)
2119

2220
- OpenSSL:
2321
. Fixed bug GH-10495 (feof on OpenSSL stream hangs indefinitely).

ext/mysqli/tests/bug81335.phpt

Lines changed: 0 additions & 34 deletions
This file was deleted.

ext/mysqlnd/mysqlnd_enum_n_def.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@
130130
#define CR_INVALID_PARAMETER_NO 2034
131131
#define CR_INVALID_BUFFER_USE 2035
132132
#define CR_LOAD_DATA_LOCAL_INFILE_REJECTED 2068
133-
#define CR_CLIENT_INTERACTION_TIMEOUT 4031
134133

135134
#define MYSQLND_EE_FILENOTFOUND 7890
136135

ext/mysqlnd/mysqlnd_result.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s)
185185
UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status);
186186

187187
if (FAIL == (ret = PACKET_READ(conn, &rset_header))) {
188-
if (conn->error_info->error_no != CR_SERVER_GONE_ERROR && conn->error_info->error_no != CR_CLIENT_INTERACTION_TIMEOUT) {
188+
if (conn->error_info->error_no != CR_SERVER_GONE_ERROR) {
189189
php_error_docref(NULL, E_WARNING, "Error reading result set's header");
190190
}
191191
break;

ext/mysqlnd/mysqlnd_wireprotocol.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -267,19 +267,6 @@ mysqlnd_read_header(MYSQLND_PFC * pfc, MYSQLND_VIO * vio, MYSQLND_PACKET_HEADER
267267
pfc->data->packet_no++;
268268
DBG_RETURN(PASS);
269269
}
270-
// @see https://dev.mysql.com/worklog/task/?id=12999
271-
if (header->size > 0) {
272-
zend_uchar *buf = mnd_emalloc(header->size);
273-
if ((PASS == pfc->data->m.receive(pfc, vio, buf, header->size, conn_stats, error_info)) && buf[0] == ERROR_MARKER) {
274-
php_mysqlnd_read_error_from_line(buf + 1, header->size - 1,
275-
error_info->error, sizeof(error_info->error),
276-
&error_info->error_no, error_info->sqlstate
277-
);
278-
mnd_efree(buf);
279-
DBG_RETURN(FAIL);
280-
}
281-
mnd_efree(buf);
282-
}
283270

284271
DBG_ERR_FMT("Logical link: packets out of order. Expected %u received %u. Packet size=%zu",
285272
pfc->data->packet_no, header->packet_no, header->size);
@@ -307,9 +294,7 @@ mysqlnd_read_packet_header_and_body(MYSQLND_PACKET_HEADER * packet_header,
307294
DBG_INF_FMT("buf=%p size=%zu", buf, buf_size);
308295
if (FAIL == mysqlnd_read_header(pfc, vio, packet_header, stats, error_info)) {
309296
SET_CONNECTION_STATE(connection_state, CONN_QUIT_SENT);
310-
if (error_info->error_no == 0) {
311-
SET_CLIENT_ERROR(error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
312-
}
297+
SET_CLIENT_ERROR(error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
313298
DBG_ERR_FMT("Can't read %s's header", packet_type_as_text);
314299
DBG_RETURN(FAIL);
315300
}

0 commit comments

Comments
 (0)