diff --git a/Cargo.lock b/Cargo.lock index 95c3aaf..d3b1565 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -143,15 +143,6 @@ 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" @@ -738,14 +729,13 @@ dependencies = [ [[package]] name = "mssql-tds" -version = "0.4.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812c3993a5f6d98e14da9d8ab0bf9f9f536e49c18240f34af9bae301e4d35ae8" +checksum = "b03612dd2098a7b98613b423414afaf3031ff080a24652941abfc1d2e13f6222" dependencies = [ "async-trait", "bigdecimal", "bitflags", - "block2", "byteorder", "bytes", "core-foundation", @@ -776,9 +766,9 @@ dependencies = [ [[package]] name = "mssql-tiberius-bridge" -version = "0.3.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7baca2d0d0d280ba914f058718ad41a09bcfd1a330d67a5c18ae720064963de9" +checksum = "2f77f4020816d04d7710bc8f74fe832100b1e13e6ee4a90614946845c64aa617" dependencies = [ "async-stream", "async-trait", @@ -864,21 +854,6 @@ 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" diff --git a/Cargo.toml b/Cargo.toml index 05cafb7..0dbe59b 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.3.0" +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.4.0" +mssql-tds = "=0.2.0" once_cell = "1" serde = { version = "1", features = ["derive"] } serde_json = "1" diff --git a/docs/dependencies.md b/docs/dependencies.md index e5045a2..0600b6e 100644 --- a/docs/dependencies.md +++ b/docs/dependencies.md @@ -1,6 +1,6 @@ # Dependency and supply-chain review -Updated 2026-11-09 for the locked `mssql-tiberius-bridge` 0.3.0 release. The +Updated 2026-10-10 for the locked `mssql-tiberius-bridge` 0.2.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.3.0`](https://crates.io/crates/mssql-tiberius-bridge/0.3.0). +- **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. - **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.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`. +- **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`. Pool recycling continues to use `Client::reset_session()` before reapplying the configured startup script. ### `mssql-tds` -- **Resolved version:** [`0.4.0`](https://crates.io/crates/mssql-tds/0.4.0), - the protocol API required by bridge 0.3.0. +- **Resolved version:** [`0.2.0`](https://crates.io/crates/mssql-tds/0.2.0), + the protocol API required by bridge 0.2.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.3.0. +findings for bridge 0.2.0. ## Open upstream issues relevant to this plugin diff --git a/src/driver/error.rs b/src/driver/error.rs index b26378d..e917f17 100644 --- a/src/driver/error.rs +++ b/src/driver/error.rs @@ -58,8 +58,6 @@ 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}"), @@ -272,34 +270,6 @@ 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";