Skip to content

Commit

Permalink
Fix error checking in mysqlnd
Browse files Browse the repository at this point in the history
Closes GH-11925
  • Loading branch information
kamil-tekiela committed Aug 10, 2023
1 parent 248e6b0 commit 0d922aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ PHP NEWS
. Fixed bug GH-11550 (MySQL Statement has a empty query result when
the response field has changed, also Segmentation fault).
(Yurunsoft)
. Fixed invalid error message "Malformed packet" when connection is dropped.
(Kamil Tekiela)

- Opcache:
. Fixed bug GH-11715 (opcache.interned_strings_buffer either has no effect or
Expand Down
1 change: 1 addition & 0 deletions ext/mysqlnd/mysqlnd_protocol_frame_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ MYSQLND_METHOD(mysqlnd_pfc, send)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const v
if (bytes_sent <= 0) {
DBG_ERR_FMT("Can't %zu send bytes", count);
SET_CLIENT_ERROR(error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
bytes_sent = 0; // the return type is unsigned and 0 represents an error condition
}
DBG_RETURN(bytes_sent);
}
Expand Down

0 comments on commit 0d922aa

Please sign in to comment.