Fix | Build ReservedWords table in code#4328
Open
edwardneal wants to merge 13 commits into
Open
Conversation
edwardneal
commented
May 30, 2026
| <ReservedWord>CURSOR</ReservedWord> | ||
| </ReservedWords> | ||
| <ReservedWords> | ||
| <ReservedWord>NATIONAL </ReservedWord> |
Contributor
Author
There was a problem hiding this comment.
This is the only reserved word I expect to be different between the old and the new structure. I've assumed that it was a typo.
This file contains hidden or 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
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.
Description
This PR populates the
ReservedWordscollection returned bySqlConnection.GetSchemain code, rather than by deserializing theSqlMetaData.xmlembedded resource.There are currently 393 reserved words in this embedded resource. To make this easier to review, I've broken it down commit-by-commit.
I'm aiming to do nothing more than migrate the data out of the XML file, with one exception: the "NATIONAL " keyword is now corrected to "NATIONAL", removing the trailing space. I believe this was an oversight.
Separately to this, I've noticed two things:
SERVERPROPERTY('EngineEdition'), or a simpler check against the DNS name.I've avoided pulling a response to either of them in this PR in order to prevent it drifting into the weeds and to keep it self-contained.
Issues
Contributes to #3372.
Testing
I've manually verified that reserved words match, and added a test which verifies that the data is correct. With adjustment to account for the "NATIONAL " case, this same test also passes against main.