-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Use the same statement resource for repeated execution of the same statement on SQL Server #2494
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
Conversation
if ( ! $this->stmt) { | ||
$stmt = sqlsrv_prepare($this->conn, $this->sql, $this->params); | ||
if (!$stmt) { |
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.
This branch should be tested.
Also, add empty lines around control structures
11a8200
to
67f8ba0
Compare
67f8ba0
to
b0e5314
Compare
|
||
// it's impossible to prepare the statement without bound variables for SQL Server, | ||
// so the preparation happens before the first execution when variables are already in place | ||
$this->setExpectedException('Doctrine\\DBAL\\Driver\\SQLSrv\\SQLSrvException'); |
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.
You can use SQLSrvException::class
here, since I think that we bumped version requirements to minimum PHP 5.5
Other than that |
@morozov merged, thanks! |
Fixes #2493.