Skip to content

Commit 1e35957

Browse files
committed
Fixed not to set CR_MALFORMED_PACKET to error if CR_SERVER_GONE_ERROR is already set
1 parent 452e008 commit 1e35957

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
@@ -2488,8 +2488,10 @@ MYSQLND_METHOD(mysqlnd_protocol, send_command_handle_OK)(
24882488
payload_decoder_factory->m.init_ok_packet(&ok_response);
24892489
DBG_ENTER("mysqlnd_protocol::send_command_handle_OK");
24902490
if (FAIL == (ret = PACKET_READ(payload_decoder_factory->conn, &ok_response))) {
2491-
DBG_INF("Error while reading OK packet");
2492-
SET_CLIENT_ERROR(error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "Malformed packet");
2491+
if (error_info->error_no != CR_SERVER_GONE_ERROR) {
2492+
DBG_INF("Error while reading OK packet");
2493+
SET_CLIENT_ERROR(error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "Malformed packet");
2494+
}
24932495
goto end;
24942496
}
24952497
DBG_INF_FMT("OK from server");

0 commit comments

Comments
 (0)