Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 4 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
22 changes: 11 additions & 11 deletions docs/dependencies.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# 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()`.

## TDS dependency provenance

### `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
Expand All @@ -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

Expand Down
30 changes: 0 additions & 30 deletions src/driver/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}"),
Expand Down Expand Up @@ -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";
Expand Down
Loading