-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Unset statement resource in bindValue #6089
Conversation
Fix odbc issue doctrine#6088
Thank you. Please add a functional test that reproduces your issue and thus covers your change. |
I've added a test case based on my description of #6088 , but could not find documentation on how to run the sqlsrv test cases, so I could not verify that the test is working as expected. Do you have documentation on how to run the tests for specific platforms? |
You need a local database server obviously. All you need to do then is create a custom PHPUnit configuration with the credentials to your database. You'll find some examples in the |
Tests are failing btw. |
Tests should pass now. But another thing I've noticed is that I can reproduce the error in the context of a Symfony app, but not within a test case of doctrine/dbal. Meaning, the test passes with and without the fix in Statement.php. A similar test fails (with same connection params and with config = eventManager = null) when having doctrine/dbal installed in the context of a Symfony application. One other thing I've realized is, that is has something to do with encoding. I have to do some further debugging to find out what's causing this issue. |
INSERT INTO bug (content) VALUES (?) | ||
SQL); | ||
|
||
$stmt->bindValue(1, implode(array_fill(0, 4000, 'x'))); |
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.
Do you know str_repeat()
?
Then it's not a valid test for your change, sorry. |
Correct, this is not a valid test case. I was finally able to do some testing and it seems the culprit is Although this pull fixes it for |
Fix odbc issue #6088
Summary
Reset statement resource after call to bindValue