-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix bug #80837 #6755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug #80837 #6755
Conversation
4951305
to
e168109
Compare
Unless the bugfix would break reasonably written code or is considered somewhat unsafe/experimental, the fix should target PHP-7.4 or maybe 8.0. |
e168109
to
086f16b
Compare
@cmb69 I did |
@@ -92,7 +92,7 @@ MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const s) | |||
|
|||
/* Nothing to store for UPSERT/LOAD DATA*/ | |||
if (!mysqlnd_stmt_check_state(stmt)) { | |||
SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync); | |||
SET_CLIENT_ERROR(stmt->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something that's not really clear to me is when we should be setting the error on the stmt only, and when we should be setting it on stmt and conn both. It seems like in this code we often set both, but it's not really consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These errors are an absolute mess. It should be that when a function starts with mysql_stmt_
we set stmt->error_info
only. For everything else we set conn->error_info
. There is a problem with out of memory errors. There are also some exceptions to this rule e.g. prepare
method which needs to set both errors as it can be called in both ways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that makes sense.
@kamil-tekiela, yes, that is basically what I meant. But for some reason AppVeyor did still pick the master dependencies. I'm not quite sure regarding the rebase command; is "master" the remote? |
Merged as c93b461. |
Fixes https://bugs.php.net/bug.php?id=80837