refactor(sqlserver): isolate vendored TDS ATTENTION from standalone agents

This commit is contained in:
Rendegou authored and GitHub committed 2026-10-06 18:57:44 +08:00
1 parent ae86a8c73c
commit c87351e0df
11 files changed
+44 -5

No files matched your search

+4
View File
@@ -10,6 +10,10 @@ default = ["duckdb-sidecar", "dynamodb", "mq-admin", "sqlite-sqlcipher", "system
duckdb-sidecar = ["dbx-sql/duckdb-sidecar", "dbx-drivers/duckdb-sidecar"]
dynamodb = ["dbx-drivers/dynamodb"]
mq-admin = ["dep:rumqttc", "dbx-types/mq-admin", "dbx-drivers/mq-admin"]
# SQL Server native TDS ATTENTION on interrupt (SQL Server 2000 batch abort).
# Requires the vendored tiberius patched in by the root workspace; standalone
# agent driver workspaces build dbx-core without it. Desktop enables this.
sqlserver-native-attention = ["dbx-drivers/sqlserver-native-attention"]
sqlite-sqlcipher = ["rusqlite/bundled-sqlcipher-vendored-openssl", "dbx-drivers/sqlite-sqlcipher"]
sqlite-multiple-ciphers = ["dbx-drivers/sqlite-multiple-ciphers"]
# Keeps bundled SQLite for consumers that enable no other sqlite source
@@ -362,6 +362,8 @@ impl Drop for ExecutionGuard {
/// TCP FIN alone need not stop a SQL2000 batch immediately. ATTENTION is
/// best effort, never proof of rollback; callers always discard the connection.
/// The wire call needs the vendored tiberius (dbx-driver-sqlserver feature
/// `native-attention`); standalone crates.io builds no-op inside the client.
async fn send_native_attention(conn: &mut TxnConnection) {
if let TxnConnection::SqlServer { client: Some(client), .. } = conn {
let attention = async { client.lock().await.send_attention().await };