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

Fix closing statement cursor on pdo_sqlsrv if not executed yet #2651

Merged
merged 1 commit into from
Feb 9, 2017

Conversation

deeky666
Copy link
Member

@deeky666 deeky666 commented Feb 9, 2017

pdo_sqlsrv does not strictly stick to the PDO interface, yet and throws and exception when trying to close a statement cursor if it has not been execute yet:

Exception: [PDOException] SQLSTATE[IMSSP]: The statement must be executed before results can be retrieved.

A patch is in the works, though: microsoft/msphpsql#267

Despite that, we should try to make the behaviour consistent for all kinds of PDO drivers, even those that we might not support in the core. Therefore silencing execptions in closeCursor().

@deeky666
Copy link
Member Author

deeky666 commented Feb 9, 2017

Btw there are already tests that reveal this issue: Doctrine\Tests\DBAL\Functional\StatementTest

@Ocramius Ocramius self-assigned this Feb 9, 2017
@Ocramius Ocramius added this to the 2.5.13 milestone Feb 9, 2017
@Ocramius Ocramius merged commit b627771 into doctrine:master Feb 9, 2017
Ocramius added a commit that referenced this pull request Feb 9, 2017
@Ocramius
Copy link
Member

Ocramius commented Feb 9, 2017

Backported to 2.5 via 9d633da

@morozov
Copy link
Member

morozov commented Dec 29, 2017

Should be fixed by microsoft/msphpsql#281.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants