Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Don't return warnings as errors in sqlsrv driver #490

Merged
merged 1 commit into from Jan 3, 2014

Conversation

Projects
None yet
3 participants
Member

deeky666 commented Jan 3, 2014

The SQL Server platforms use sp_rename stored procedure for renaming schema objects like tables, indexes or columns. SQL Server raises a warning when invoking this stored procedure, although the result is as expected:

Doctrine\DBAL\Driver\SQLSrv\SQLSrvException: SQLSTATE [01000, 15477]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Vorsicht: Wenn Sie Teile eines Objektnamens ändern, werden Skripts und gespeicherte Prozeduren möglicherweise funktionsunfähig.

This PR configures the sqlsrv driver not to handle warnings returned from the server as errors to prevent this. The PDO_SQLSRV driver silences warnings, too.

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DBAL-760

We use Jira to track the state of pull requests and the versions they got
included in.

beberlei added a commit that referenced this pull request Jan 3, 2014

Merge pull request #490 from deeky666/suppress-sqlsrv-driver-server-w…
…arnings

Don't return warnings as errors in sqlsrv driver

@beberlei beberlei merged commit 3c12b03 into doctrine:master Jan 3, 2014

1 check passed

default The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment