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
  • Loading branch information
SakiTakamachi committed Aug 12, 2023
1 parent 0d922aa commit a4b83c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ext/mysqlnd/mysqlnd_wireprotocol.c
Original file line number Diff line number Diff line change
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 a4b83c4

Please sign in to comment.