Skip to content
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

pdo_dblib closes connection when cursor closes #319

Closed
wants to merge 2 commits into from

Conversation

capile
Copy link

@capile capile commented Apr 2, 2013

The PDO connection shouldn't end when the cursor is closed. This behavior was introduced 3 years ago when pdo_dblib was adjusted for multiple rowsets (3a069e8), only on versions 5.4+.

This prevents further queries to the same connection, transactions, the usage of variables and even getting multiple rowsets with that connection (this wasn't working on 5.4.13).

This is a bugfix for https://bugs.php.net/bug.php?id=64522. Tested and the expected results were met. Should be applied to branches PHP-5.4 and PHP-5.5.

Cheers,

Guilherme Capilé

@ssufficool
Copy link

This does fix one issue, but introduces another. When not all results are fetched and another statement is issued on the connection, the server will return and error of "Attempt to issue another command on a connection with pending results". The existing dbcancel() should cancel the command batch, but not close the connection. It is instead closing the dbhandle for some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants