-
Notifications
You must be signed in to change notification settings - Fork 369
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
Function sequence error + wrong transaction management #167
Comments
@david-garcia-garcia : We are looking into this and seems like it may be by design. Using the client-side cursors allows you to cache the entire result set in memory, which explains why transactions are allowed. On the other hand, when the results are not buffered, the server will prevent transactions because the result set is still active (even with MARS enabled). For details, please refer to the following blog post Thoughts? |
Does that mean the out of the two samples in the repro script, the first one should be working?
That one seems reasonable, the second sample was just me playing around with the same script without buffered cursors enabled. I understand then that the expected result for the script should be:
Then that's OK. The specific scenario I am dealing with is Drupal iterating over a a statement result (using it's transversable interface) and doing transactional stuff inside the loop, that corresponds to the first part of the script. |
@david-garcia-garcia that's right, the execution with |
Is this supposed to be fixed in a future release? |
@david-garcia-garcia The second sample is by design and is not supposed to work. We are not able reproduce the issue in the first sample in our lab, and it is working as expected, do you have an issue with it? Feel free to reopen the issue |
This is getting interesting, and might be related to using SQL Native Client vs ODBC. In our production environments we have Native Client only installed (against SQL Server 2014), and the issue is reproducible. But on local, I just installed ODBC 13.1 and it does behave as intended. I am now getting this though (Randomly):
Could you throw any light on how the driver is internally choosing between ODBC and SQL Native Client, and if there is anyway to control that from the connection string in PDO? |
I was able to finally isolate into a simple script the Function Sequence Error issues.
Repro script here:
http://pastebin.com/bYvdzgPN
Using latest PHP7x64 driver 4.1.3 with PHP 7.0.11
Current result:
Expected result:
The text was updated successfully, but these errors were encountered: