-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 SQL Server "extended property" SQL generation #6353
Merged
derrabus
merged 3 commits into
doctrine:3.8.x
from
mvorisek:fix_mssql_comment_with_escaped_column
May 3, 2024
Merged
Fix SQL Server "extended property" SQL generation #6353
derrabus
merged 3 commits into
doctrine:3.8.x
from
mvorisek:fix_mssql_comment_with_escaped_column
May 3, 2024
+105
−84
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8328273
to
314a224
Compare
The tests you modified assert that the expected SQL is generated, and did not fail before because that SQL is never actually sent to a server. Please add a functional test that covers the issue you're fixing. |
Tests added. |
4111af9
to
607f7dd
Compare
Done. |
greg0ire
approved these changes
Apr 22, 2024
SenseException
approved these changes
Apr 22, 2024
derrabus
approved these changes
May 3, 2024
derrabus
added a commit
that referenced
this pull request
May 16, 2024
* 4.1.x: Fix example for QB delete and update in doc block Bump doctrine/.github from 5.0.0 to 5.0.1 (#6391) PHPStan 1.10.67, PHPUnit 9.6.19, PHPCS 3.9.2 (#6387) Fix "Plugin 'mysql_native_password' is not loaded" (#6388) Run tests against MySQL 8.4 (#6386) Use 3.8.x as a target for dependabot version updates (#6384) Setup dependabot Fix SQLiteSchemaManagerTest case Switch to substr implementation fix merge Bump workflow actions Fix SQL Server "extended property" SQL generation (#6353) Fix DB name passing in SqliteSchemaManager::listTableForeignKeys() (#6338) Fix SQLite temp table name must not contain dot (#6315) Provide CODECOV_TOKEN Upgrade to codecov/codecov-action v4 Set fail_ci_if_error flag to true Specify the minor version number
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
https://learn.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-addextendedproperty-transact-sql?view=sql-server-ver15 shows the
sp_addextendedproperty
acceptssysname
datatype which is subtype of string datatype and therefore the values must be escaped as string literal instead of escaped identifier. This is evident also in the examples.As the DBAL method arguments accepts possibly escaped identifier, we unescape it before we escape the argument as string literal.