feat!: drop support for TDS 7.1 - #1769
Conversation
TDS 7.1 is only spoken by SQL Server 2000, which left extended support in April 2013. It was deprecated with a runtime warning in #1768. Removing it deletes every pre-7.2 code path: - the client-side emulated transaction state (the SQL batch based `BEGIN`/`COMMIT`/`ROLLBACK`/`SAVE TRAN` wrappers, the private `transactionDepth` and `isSqlBatch` bookkeeping, and the batch-error transaction reset) - the pre-7.2 wire format variants (32-bit `DONE` row counts, 16-bit `ERROR`/`INFO` line numbers, 16-bit column metadata user types, single-part table names, and the conditional `ALL_HEADERS` prefix on SQL batch and RPC requests) - the TDS 7.1 deprecation warning itself, which can no longer fire `config.options.tdsVersion` is now validated against the supported versions, so configuring `7_1` (or any unknown version) fails with a clear `RangeError` instead of silently sending a garbage protocol version in the `LOGIN7` packet. BREAKING CHANGE: Support for TDS 7.1 (SQL Server 2000) has been removed. The minimum supported protocol version is TDS 7.2 (SQL Server 2005). Configuring `options.tdsVersion` with an unsupported value now throws a `RangeError`. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ReviewClean, well-scoped removal — the diff matches the PR description closely and I didn't find any leftover TDS 7.1 code paths ( Correctness
Test coverage gap
Minor / non-blocking
Sequencing note carried over from the description: this is correctly marked draft pending #1766 and the soak time for the #1768 deprecation warning — no action needed from me there, just confirming I read that context. Nice, focused cleanup overall — no security or performance concerns, and the removed transaction-emulation code was a good thing to delete given the cancellation-correctness issues described in #1767. |
ReviewNicely scoped removal — the diff matches the description well and each deleted branch corresponds to a real pre-7.2 code path. A few things worth a look before this comes out of draft: Bug:
|
Support for TDS 7.1 has been removed, so requesting it in the test configuration would now fail validation. The remaining integration test runs (TDS 7.2 through 7.4) cover all supported protocol versions. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
c9e6c7a to
e282191
Compare
ReviewClean removal — I traced the TDS-version-gated branches across Correctness
Test coverage gap
Security Style/best practices Sequencing note Overall: the removal is thorough and mechanically sound. The one thing I'd want before merging is a unit test for the new |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1769 +/- ##
==========================================
- Coverage 80.86% 80.60% -0.27%
==========================================
Files 90 90
Lines 4887 4842 -45
Branches 929 908 -21
==========================================
- Hits 3952 3903 -49
- Misses 638 642 +4
Partials 297 297 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
TDS 7.1 is only spoken by SQL Server 2000, which left extended support in April 2013. It was deprecated with a runtime warning in #1768; this PR removes it, along with every pre-7.2 code path - tedious was the last maintained SQL Server driver still speaking this protocol version. The minimum supported protocol version becomes TDS 7.2 (SQL Server 2005).
What is removed
beginTransaction/commitTransaction/rollbackTransaction/saveTransactionwere emulated as SQL batches with hand-maintained bookkeeping. That bookkeeping was unfixably wrong around cancellation (see the discussion on fix: only update emulated transaction state when the statement succeeds #1767 - the outcome of a canceled transaction statement is indeterminate at the protocol level). All of it is gone: the SQL-batch wrappers, the privatetransactionDepthandisSqlBatchproperties, and the batch-error transaction reset in the response handling. Transaction state is now always ENVCHANGE-driven.DONErow counts, 16-bitERROR/INFOline numbers, 16-bit column metadata user types, single-part table names (ColumnMetadata#tableNameis now alwaysstring[]when present), and the conditionalALL_HEADERSprefix on SQL batch and RPC requests (now always written).TEDIOUS_DEP_TDS71) added in feat: deprecate TDS 7.1 support #1768, which can no longer fire.New behavior
config.options.tdsVersionis now validated against the supported versions map. Configuring7_1- or any unknown version string - throws aRangeErrornaming the supported values, instead of silently sending a garbage protocol version in theLOGIN7packet. A server that answers theLOGIN7request with a TDS 7.1LOGINACKgets the existing "Server responded with unknown TDS version" error.Sequencing - why this is a draft
🤖 Generated with Claude Code
Generated by Claude Code