-
-
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
Fix result cache and PDO connection test on pdo_sqlsrv #2650
Conversation
// Emulated prepared statements have to be disabled for this test | ||
// so that PDO actually communicates with the database server to check the query. | ||
$this->driverConnection->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false); | ||
//$this->driverConnection->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false); |
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.
Is this supposed to be commented out?
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.
No, good catch! Thanks you
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.
Fixed.
1779240
to
ec8a9d8
Compare
ec8a9d8
to
a5b02c4
Compare
…do-sqlsrv' into 2.5 Backport #2650 to 2.5.x
Backported to |
The story continues...
This fixes two test cases where
pdo_sqlsrv
fails.ResultCacheTest
Each test errors with that message. It is caused by the
setUp()
which tries to create the test table and silences exceptions. There seems to be a bug in the driver, that leaves the connection in an erroneous state when managing exceptions in userland: microsoft/msphpsql#49 (comment)To make the tests pass for now, we correctly create the table on setup and drop it on teardown now.
PDOConnectionTest
pdo_sqlsrv
for some reason only supports settingPDO::ATTR_EMULATE_PREPARES
on the statement object but not on the connection object, which makes the test useless (so skipping that one).