From e1d5cdae3042005cf7cce26efe3416355fdcb821 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2026 12:18:43 +0000 Subject: [PATCH 1/2] chore(deps): bump mssql-tds from 0.2.0 to 0.3.0 Bumps [mssql-tds](https://github.com/microsoft/mssql-rs) from 0.2.0 to 0.3.0. - [Changelog](https://github.com/microsoft/mssql-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/microsoft/mssql-rs/commits) --- updated-dependencies: - dependency-name: mssql-tds dependency-version: 0.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 41 +++++++++++++++++++++++++++++++++++++++-- Cargo.toml | 2 +- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1462f6b..752f8c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -764,6 +764,43 @@ dependencies = [ "zeroize", ] +[[package]] +name = "mssql-tds" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a53513324677e601ca5b91e477840329ec6c244875fd55b155e5a8e8af7805" +dependencies = [ + "async-trait", + "bigdecimal", + "bitflags", + "byteorder", + "bytes", + "core-foundation", + "dns-lookup", + "encoding_rs", + "futures", + "half", + "hostname", + "libc", + "native-tls", + "openssl", + "pretty-hex", + "security-framework", + "security-framework-sys", + "socket2 0.5.10", + "thiserror", + "tokio", + "tokio-native-tls", + "tokio-util", + "tracing", + "uuid", + "winapi", + "windows", + "windows-sys 0.59.0", + "x509-parser", + "zeroize", +] + [[package]] name = "mssql-tiberius-bridge" version = "0.2.0" @@ -775,7 +812,7 @@ dependencies = [ "chrono", "deadpool 0.12.3", "futures-core", - "mssql-tds", + "mssql-tds 0.2.0", "rust_decimal", "serde_json", "thiserror", @@ -1325,7 +1362,7 @@ dependencies = [ "chrono", "deadpool 0.13.1", "infer", - "mssql-tds", + "mssql-tds 0.3.0", "mssql-tiberius-bridge", "once_cell", "openssl", diff --git a/Cargo.toml b/Cargo.toml index 0dbe59b..665964a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ mssql-tiberius-bridge = "=0.2.0" # Direct dependency on the underlying protocol crate (lib name `mssql_tds`): # the result-set traits used through `Client::inner_mut()` are not re-exported # by the bridge. Pinned in lockstep with its compatible published protocol API. -mssql-tds = "=0.2.0" +mssql-tds = "=0.3.0" once_cell = "1" serde = { version = "1", features = ["derive"] } serde_json = "1" From 186c18ec1bb4b58dde2caa18f7ec3ce4cefaeb80 Mon Sep 17 00:00:00 2001 From: Andrea Debernardi <3198901+debba@users.noreply.github.com> Date: Mon, 9 Nov 2026 17:47:54 +0000 Subject: [PATCH 2/2] chore(deps): align SQL Server bridge and protocol APIs --- Cargo.lock | 74 +++++++++++++++++++------------------------- Cargo.toml | 4 +-- docs/dependencies.md | 22 ++++++------- src/driver/error.rs | 30 ++++++++++++++++++ 4 files changed, 74 insertions(+), 56 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 987f603..95c3aaf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -143,6 +143,15 @@ dependencies = [ "wyz", ] +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + [[package]] name = "borsh" version = "1.8.0" @@ -729,50 +738,14 @@ dependencies = [ [[package]] name = "mssql-tds" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03612dd2098a7b98613b423414afaf3031ff080a24652941abfc1d2e13f6222" -dependencies = [ - "async-trait", - "bigdecimal", - "bitflags", - "byteorder", - "bytes", - "core-foundation", - "dns-lookup", - "encoding_rs", - "futures", - "half", - "hostname", - "libc", - "native-tls", - "openssl", - "pretty-hex", - "security-framework", - "security-framework-sys", - "socket2 0.5.10", - "thiserror", - "tokio", - "tokio-native-tls", - "tokio-util", - "tracing", - "uuid", - "winapi", - "windows", - "windows-sys 0.59.0", - "x509-parser", - "zeroize", -] - -[[package]] -name = "mssql-tds" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7a53513324677e601ca5b91e477840329ec6c244875fd55b155e5a8e8af7805" +checksum = "812c3993a5f6d98e14da9d8ab0bf9f9f536e49c18240f34af9bae301e4d35ae8" dependencies = [ "async-trait", "bigdecimal", "bitflags", + "block2", "byteorder", "bytes", "core-foundation", @@ -803,16 +776,16 @@ dependencies = [ [[package]] name = "mssql-tiberius-bridge" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f77f4020816d04d7710bc8f74fe832100b1e13e6ee4a90614946845c64aa617" +checksum = "7baca2d0d0d280ba914f058718ad41a09bcfd1a330d67a5c18ae720064963de9" dependencies = [ "async-stream", "async-trait", "chrono", "deadpool 0.12.3", "futures-core", - "mssql-tds 0.2.0", + "mssql-tds", "rust_decimal", "serde_json", "thiserror", @@ -891,6 +864,21 @@ dependencies = [ "libc", ] +[[package]] +name = "objc2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8" +dependencies = [ + "objc2-encode", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + [[package]] name = "oid-registry" version = "0.8.1" @@ -1362,7 +1350,7 @@ dependencies = [ "chrono", "deadpool 0.13.1", "infer", - "mssql-tds 0.3.0", + "mssql-tds", "mssql-tiberius-bridge", "once_cell", "openssl", diff --git a/Cargo.toml b/Cargo.toml index 665964a..05cafb7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,11 +14,11 @@ infer = "0.22" # SQL Server driver — Microsoft's mssql-tds protocol implementation behind a # tiberius-compatible API, pooled with deadpool. Keep the exact pin and update # alongside the directly used protocol crate when the bridge changes versions. -mssql-tiberius-bridge = "=0.2.0" +mssql-tiberius-bridge = "=0.3.0" # Direct dependency on the underlying protocol crate (lib name `mssql_tds`): # the result-set traits used through `Client::inner_mut()` are not re-exported # by the bridge. Pinned in lockstep with its compatible published protocol API. -mssql-tds = "=0.3.0" +mssql-tds = "=0.4.0" once_cell = "1" serde = { version = "1", features = ["derive"] } serde_json = "1" diff --git a/docs/dependencies.md b/docs/dependencies.md index 0600b6e..e5045a2 100644 --- a/docs/dependencies.md +++ b/docs/dependencies.md @@ -1,6 +1,6 @@ # Dependency and supply-chain review -Updated 2026-10-10 for the locked `mssql-tiberius-bridge` 0.2.0 release. The +Updated 2026-11-09 for the locked `mssql-tiberius-bridge` 0.3.0 release. The bridge and protocol dependencies are exact-pinned because the plugin also uses the protocol API directly through `Client::inner_mut()`. @@ -8,23 +8,23 @@ the protocol API directly through `Client::inner_mut()`. ### `mssql-tiberius-bridge` -- **Resolved version:** [`0.2.0`](https://crates.io/crates/mssql-tiberius-bridge/0.2.0), - released 2026-10-10. This is the latest published bridge version as of this - review. +- **Resolved version:** [`0.3.0`](https://crates.io/crates/mssql-tiberius-bridge/0.3.0). - **Upstream:** [`saurabh500/mssql-tiberius-bridge`](https://github.com/saurabh500/mssql-tiberius-bridge). The MIT-licensed crate provides a Tiberius-compatible API over Microsoft's `mssql-tds` protocol implementation. -- **Upgrade impact:** 0.2.0 uses `mssql-tds` 0.2.0 and requires Rust 1.97. - Its new `Error::BulkInput` is reported as a data conversion failure without - discarding the connection. `Client::ping()` now performs only a cached - dead-connection check; the plugin's RPC ping still executes `SELECT 1`. +- **Upgrade impact:** 0.3.0 uses `mssql-tds` 0.4.0 and requires Rust 1.97. + Updating only the direct protocol dependency leaves two incompatible protocol + APIs in the dependency graph. Both pins must move together. The new + `EncodedValueTooLong` and `TvpCellSerialization` errors are reported as driver + failures, preserving encoded size limits and TVP parameter/row/column context. + The plugin's RPC ping still executes `SELECT 1`. Pool recycling continues to use `Client::reset_session()` before reapplying the configured startup script. ### `mssql-tds` -- **Resolved version:** [`0.2.0`](https://crates.io/crates/mssql-tds/0.2.0), - the protocol API required by bridge 0.2.0. +- **Resolved version:** [`0.4.0`](https://crates.io/crates/mssql-tds/0.4.0), + the protocol API required by bridge 0.3.0. - **Upstream and licence:** Microsoft's [`microsoft/mssql-rs`](https://github.com/microsoft/mssql-rs), MIT. - The direct dependency exposes result-set metadata and row iteration not @@ -36,7 +36,7 @@ the protocol API directly through `Client::inner_mut()`. The sections below retain findings from the 2026-08-30 review of preview.3 and preview.1. Their issue-status and license-inventory details were not re-audited as part of this dependency upgrade; do not treat them as current -findings for bridge 0.2.0. +findings for bridge 0.3.0. ## Open upstream issues relevant to this plugin diff --git a/src/driver/error.rs b/src/driver/error.rs index e917f17..b26378d 100644 --- a/src/driver/error.rs +++ b/src/driver/error.rs @@ -58,6 +58,8 @@ pub fn format_tds_error(error: &TdsError, ssl_mode: Option<&str>) -> String { | TdsError::ImplementationError(_) | TdsError::UnimplementedFeature { .. } | TdsError::TypeConversionError(_) + | TdsError::EncodedValueTooLong { .. } + | TdsError::TvpCellSerialization { .. } | TdsError::UnsupportedEncoding { .. } | TdsError::BulkCopyError(_) | TdsError::ColumnEncryptionError(_) => format!("SQL Server driver failure: {error}"), @@ -270,6 +272,34 @@ mod tests { assert!(message.contains("ssl_mode 'require'")); } + #[test] + fn serialization_errors_preserve_size_and_cell_context() { + let error = BridgeError::Tds(TdsError::EncodedValueTooLong { + actual: 256, + maximum: 128, + }); + let message = format_bridge_error(&error, None); + assert!(message.starts_with("SQL Server driver failure:")); + assert!(message.contains("256 bytes")); + assert!(message.contains("128 bytes")); + assert!(!bridge_error_requires_discard(&error)); + + let error = BridgeError::Tds(TdsError::TvpCellSerialization { + parameter: mssql_tds::error::TvpParameterRef::RpcPosition(2), + row: 3, + column: 4, + source: Box::new(TdsError::EncodedValueTooLong { + actual: 256, + maximum: 128, + }), + }); + let message = format_bridge_error(&error, None); + assert!(message.starts_with("SQL Server driver failure:")); + assert!(message.contains("RPC position 2, row 3, column 4")); + assert!(message.contains("256 bytes")); + assert!(!bridge_error_requires_discard(&error)); + } + #[test] fn redaction_removes_password_and_connection_string() { let connection_string = "Server=db;User Id=sa;Password=NeverExposeThis!;Encrypt=true";