Skip to content

Commit c9abe2c

Browse files
committed
Fixed not to set CR_MALFORMED_PACKET to error if CR_SERVER_GONE_ERROR is already set
1 parent 269a9e1 commit c9abe2c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ext/mysqlnd/mysqlnd_wireprotocol.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2592,8 +2592,10 @@ MYSQLND_METHOD(mysqlnd_protocol, send_command_handle_OK)(
25922592
payload_decoder_factory->m.init_ok_packet(&ok_response);
25932593
DBG_ENTER("mysqlnd_protocol::send_command_handle_OK");
25942594
if (FAIL == (ret = PACKET_READ(payload_decoder_factory->conn, &ok_response))) {
2595-
DBG_INF("Error while reading OK packet");
2596-
SET_CLIENT_ERROR(error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "Malformed packet");
2595+
if (error_info->error_no != CR_SERVER_GONE_ERROR) {
2596+
DBG_INF("Error while reading OK packet");
2597+
SET_CLIENT_ERROR(error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "Malformed packet");
2598+
}
25972599
goto end;
25982600
}
25992601
DBG_INF_FMT("OK from server");

0 commit comments

Comments
 (0)