Repository navigation
fix: treat empty boolean and number connection string values as not set - #1961
Merged
dhensby merged 1 commit intoNov 19, 2026
Merged
Conversation
An empty boolean or number value, for example `UseUTC=` or `Packet Size=`, gave a different result from a left-out key: - `UseUTC=` set `useUTC: false`, but tedious defaults to true. - `Packet Size=` set 8000, but tedious defaults to 4096. - `ConnectRetryInterval=` set 10000 ms, but tedious defaults to 500 ms. - `Max Pool Size=` set 100, but node-mssql defaults to 10. - `Request Timeout=` set NaN, which msnodesqlv8 used as its query timeout. @tediousjs/connection-string gives the schema default for an empty value. node-mssql now drops the defaults from its schema, so an empty value gives undefined, and the parser skips it. This replaces the encrypt-only handling. Values that are not empty do not change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dhensby
marked this pull request as ready for review
November 18, 2026 23:32
|
🎉 This PR is included in version 12.7.16 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
What this does:
An empty boolean or number value in a connection string, for example
UseUTC=orPacket Size=, gave a different result from a left-out key. #1960 fixed this forEncryptonly. This change fixes it for every boolean and number key.UseUTC=useUTC: falsetruePacket Size=80004096ConnectRetryInterval=10000ms500msMax Pool Size=10010Request Timeout=NaN, which msnodesqlv8 used as its query timeout15000@tediousjs/connection-stringgives the schema default for an empty boolean or number value. node-mssql now drops the defaults from its schema, so an empty value givesundefined, and the parser skips it. This replaces theencrypt-only handling from #1960. Values that are not empty do not change.Connection Timeout=,Min Pool Size=,Stream=,ParseJSON=,MultiSubnetFailover=andTrustServerCertificate=already gave the default value, so their result does not change.The new unit tests check that each boolean and number key gives the same config when it is empty, only whitespace or left out. They also add tests for explicit number values. The empty-value tests fail before the fix and pass after it. Lint and all 317 unit tests pass. No live SQL Server integration tests were run.
Related issues:
Pre/Post merge checklist:
🤖 Generated with Claude Code