Repository navigation
Conversation
A CALL of a stored procedure that returns rows produces several result sets. closeCursor() only freed the first one, so the connection stayed busy and the next statement failed with "2014 Commands out of sync" until the connection was closed. The remaining result sets are now consumed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MySQL 5.7 and MariaDB 10.4 cannot prepare CREATE/DROP PROCEDURE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
First CI run: the new test failed on MySQL 5.7 / MariaDB 10.4 because those servers cannot prepare |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
A
CALLof a stored procedure that returns rows produces more than one result set (the rows plus the status of the CALL).MysqliStatement::closeCursor()only calledfree_result()for the first one and never moved on withmore_results()/next_result(), so the connection stayed busy and the nextprepare()failed with2014 Commands out of sync; you can't run this command now(#296). The only workaround was$db->disconnect(). The PDO MySQL driver is not affected.closeCursor()now consumes and frees the remaining result sets.Testing Instructions
New
MysqliDriverTest::testQueryAfterCallingStoredProcedurecreates a procedureSELECT 1, calls it twice and then runs another query; without the change the second statement fails with error 2014. It needs MySQL/MariaDB (MySQLi CI jobs); no server was available locally.Documentation Changes Required
None.
Fixes #296
🤖 Generated with Claude Code