Skip to content

Commit ca60912

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fixed not to set CR_MALFORMED_PACKET to error if CR_SERVER_GONE_ERROR is already set
2 parents a9c01b9 + 199e48b commit ca60912

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ PHP NEWS
1313
. Fixed bug #75712 (getenv in php-fpm should not read $_ENV, $_SERVER).
1414
(Jakub Zelenka)
1515

16+
- MySQLnd:
17+
. Fixed bug GH-11950 ([mysqlnd] Fixed not to set CR_MALFORMED_PACKET to error
18+
if CR_SERVER_GONE_ERROR is already set). (Saki Takamachi)
19+
1620
- PGSQL:
1721
. Fixed bug GH-13354 (pg_execute/pg_send_query_params/pg_send_execute
1822
with null value passed by reference). (George Barbarosie)

ext/mysqlnd/mysqlnd_wireprotocol.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2467,8 +2467,10 @@ MYSQLND_METHOD(mysqlnd_protocol, send_command_handle_OK)(
24672467
payload_decoder_factory->m.init_ok_packet(&ok_response);
24682468
DBG_ENTER("mysqlnd_protocol::send_command_handle_OK");
24692469
if (FAIL == (ret = PACKET_READ(payload_decoder_factory->conn, &ok_response))) {
2470-
DBG_INF("Error while reading OK packet");
2471-
SET_CLIENT_ERROR(error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "Malformed packet");
2470+
if (error_info->error_no != CR_SERVER_GONE_ERROR) {
2471+
DBG_INF("Error while reading OK packet");
2472+
SET_CLIENT_ERROR(error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "Malformed packet");
2473+
}
24722474
goto end;
24732475
}
24742476
DBG_INF_FMT("OK from server");

0 commit comments

Comments
 (0)