Skip to content

Commit

Permalink
Fixed not to set CR_MALFORMED_PACKET to error if CR_SERVER_GONE_ERROR…
Browse files Browse the repository at this point in the history
… is already set

Closes GH-11951.
  • Loading branch information
SakiTakamachi authored and nielsdos committed Feb 10, 2024
1 parent 452e008 commit 199e48b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions NEWS
Expand Up @@ -9,6 +9,10 @@ PHP NEWS
. Fixed bug #75712 (getenv in php-fpm should not read $_ENV, $_SERVER).
(Jakub Zelenka)

- MySQLnd:
. Fixed bug GH-11950 ([mysqlnd] Fixed not to set CR_MALFORMED_PACKET to error
if CR_SERVER_GONE_ERROR is already set). (Saki Takamachi)

- PGSQL:
. Fixed bug GH-13354 (pg_execute/pg_send_query_params/pg_send_execute
with null value passed by reference). (George Barbarosie)
Expand Down
6 changes: 4 additions & 2 deletions ext/mysqlnd/mysqlnd_wireprotocol.c
Expand Up @@ -2488,8 +2488,10 @@ MYSQLND_METHOD(mysqlnd_protocol, send_command_handle_OK)(
payload_decoder_factory->m.init_ok_packet(&ok_response);
DBG_ENTER("mysqlnd_protocol::send_command_handle_OK");
if (FAIL == (ret = PACKET_READ(payload_decoder_factory->conn, &ok_response))) {
DBG_INF("Error while reading OK packet");
SET_CLIENT_ERROR(error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "Malformed packet");
if (error_info->error_no != CR_SERVER_GONE_ERROR) {
DBG_INF("Error while reading OK packet");
SET_CLIENT_ERROR(error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "Malformed packet");
}
goto end;
}
DBG_INF_FMT("OK from server");
Expand Down

0 comments on commit 199e48b

Please sign in to comment.