-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Cursor is not opened on singleton selects. #2241
Conversation
you should add a new test which fails without your patch and succeeds with it |
Don't know if it is worth to include it in vcs. Here is the test code:
An failed results on current master branch:
|
@madorin thanks for the PR, Dorin. Every change usually requires an accompanying test, as this way we a) ensure the regression is fixed and b) ensure that there is no breach in the future. Please add this test case to the PR code, and in general supply tests also in the future. The tests to pdo_firebird are unfortunately not included in the travis runs, so the more important to have a good test coverage for this ext. Thanks. |
Hi Anatol! Added test case. |
@madorin, nice! I'll be testing the PR next days, if no one beats me to it. Thanks. |
Merged as cf46ac1. Thanks. |
In case if we execute twice a prepared singleton statements an error is thrown trying to close an unopened cursor.
Code sample:
$S = $D->prepare('insert into ta_test (id, name) values (next value for gs_id, :name) returning id');
$S->execute(['name' => 'One']);
$S->execute(['name' => 'Two']);
All current tests are passed with this commit change.