From 65b505a638037491218ae92283812ef9583dee9f Mon Sep 17 00:00:00 2001 From: saurabh500 <1623701+saurabh500@users.noreply.github.com> Date: Thu, 1 Oct 2026 22:55:47 +0000 Subject: [PATCH 1/8] Set MSSQL driver identity and Python User-Agent version Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- connectorx-python/src/lib.rs | 7 +++ connectorx/src/sources/mssql/mod.rs | 3 ++ connectorx/src/sources/mssql/tds_impl.rs | 58 +++++++++++++++++++++++- connectorx/tests/test_mssql.rs | 36 +++++++++++++++ docs/databases/mssql.md | 12 +++++ 5 files changed, 115 insertions(+), 1 deletion(-) diff --git a/connectorx-python/src/lib.rs b/connectorx-python/src/lib.rs index 761ea6640..7add61f38 100644 --- a/connectorx-python/src/lib.rs +++ b/connectorx-python/src/lib.rs @@ -37,6 +37,13 @@ fn connectorx(_: Python, m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_wrapped(wrap_pyfunction!(get_meta))?; #[cfg(feature = "srcs")] { + let version = m + .py() + .import("importlib.metadata")? + .call_method1("version", ("connectorx",))? + .extract::()?; + ::connectorx::sources::mssql::set_user_agent_version(version) + .map_err(PyRuntimeError::new_err)?; m.add_wrapped(wrap_pyfunction!(get_mssql_driver))?; m.add_wrapped(wrap_pyfunction!(set_mssql_driver))?; } diff --git a/connectorx/src/sources/mssql/mod.rs b/connectorx/src/sources/mssql/mod.rs index cda1b3979..5a9c35438 100644 --- a/connectorx/src/sources/mssql/mod.rs +++ b/connectorx/src/sources/mssql/mod.rs @@ -60,3 +60,6 @@ pub use self::dual_impl::{MsSQLSource, MsSQLSourceParser, MsSQLSourcePartition}; #[cfg(feature = "src_mssql_tds")] pub(crate) use self::tds_impl::tds_get_partition_range; + +#[cfg(feature = "src_mssql_tds")] +pub use self::tds_impl::set_user_agent_version; diff --git a/connectorx/src/sources/mssql/tds_impl.rs b/connectorx/src/sources/mssql/tds_impl.rs index 17653e11c..dd81e7a93 100644 --- a/connectorx/src/sources/mssql/tds_impl.rs +++ b/connectorx/src/sources/mssql/tds_impl.rs @@ -59,13 +59,28 @@ use sqlparser::dialect::MsSqlDialect; use std::collections::HashMap; use std::convert::TryFrom; use std::ops::{Deref, DerefMut}; -use std::sync::Arc; +use std::sync::{Arc, OnceLock}; use std::time::Duration; use tokio::runtime::Runtime; use url::Url; use urlencoding::decode; use uuid_old::Uuid; +static USER_AGENT_VERSION: OnceLock = OnceLock::new(); + +/// Sets the wrapper's package version for the TDS User-Agent, leaving LOGIN7 unchanged. +/// Language bindings should call this before creating connections. Reinitializing +/// with the same version is allowed; a different version is rejected. +pub fn set_user_agent_version(version: String) -> Result<(), &'static str> { + if version.is_empty() { + return Err("MSSQL User-Agent version must not be empty"); + } + if USER_AGENT_VERSION.get_or_init(|| version.clone()) != &version { + return Err("MSSQL User-Agent version is already initialized to a different version"); + } + Ok(()) +} + /// Builds the `mssql-tds` datasource string and [`ClientContext`] from a /// ConnectorX MSSQL connection URL. Mirrors /// [`super::tiberius_impl::mssql_config`]'s parsing, but expressed against @@ -84,6 +99,15 @@ fn build_client_context(url: &Url) -> (String, ClientContext) { }; let mut context = ClientContext::with_data_source(&datasource); + context.library_name = "mssql-tds".to_string(); + // The User-Agent feature carries a separate driver name from LOGIN7. + context + .user_agent + .set_library_name(context.library_name.clone()); + if let Some(version) = USER_AGENT_VERSION.get() { + context.user_agent.set_driver_version(version.clone()); + } + context.application_name = "ConnectorX".to_string(); context.database = decode(&url.path()[1..])?.into_owned(); let params: HashMap = url.query_pairs().into_owned().collect(); @@ -137,6 +161,38 @@ fn build_client_context(url: &Url) -> (String, ClientContext) { mod configuration_tests { use super::*; + #[test] + fn package_version_overrides_only_user_agent() { + assert!(set_user_agent_version(String::new()).is_err()); + let version = "0.4.7a1"; + set_user_agent_version(version.to_string()).unwrap(); + set_user_agent_version(version.to_string()).unwrap(); + assert!(set_user_agent_version("0.4.8".to_string()).is_err()); + + let url = Url::parse("mssql://localhost/db").unwrap(); + let (_, context) = build_client_context(&url).unwrap(); + assert_eq!(context.user_agent.driver_version, version); + assert_eq!( + context.driver_version, + ClientContext::with_data_source("tcp:localhost,1433").driver_version + ); + } + + #[test] + fn driver_identity_and_application_name() { + for (query, expected_appname) in [ + ("", "ConnectorX"), + ("?appname=Custom%20Application", "Custom Application"), + ("?appname=", ""), + ] { + let url = Url::parse(&format!("mssql://localhost/db{query}")).unwrap(); + let (_, context) = build_client_context(&url).unwrap(); + assert_eq!(context.library_name, "mssql-tds"); + assert_eq!(context.user_agent.library_name, "mssql-tds"); + assert_eq!(context.application_name, expected_appname); + } + } + #[test] fn integrated_auth_respects_tiberius_platform_and_feature_gates() { for trusted in ["true", "false", "TrUe"] { diff --git a/connectorx/tests/test_mssql.rs b/connectorx/tests/test_mssql.rs index 9bfc58504..9f5e54587 100644 --- a/connectorx/tests/test_mssql.rs +++ b/connectorx/tests/test_mssql.rs @@ -17,6 +17,42 @@ use tokio::runtime::Runtime; mod test_db; +#[cfg(feature = "src_mssql_tds")] +#[test] +fn test_mssql_tds_session_identity() { + let rt = Arc::new(Runtime::new().unwrap()); + let mut url = url::Url::parse(&test_db::mssql_url()).unwrap(); + let params: Vec<_> = url + .query_pairs() + .into_owned() + .filter(|(key, _)| key != "appname") + .collect(); + url.set_query(None); + url.query_pairs_mut().extend_pairs(params); + + for appname in [None, Some("ConnectorX identity override")] { + let mut conn = url.clone(); + if let Some(appname) = appname { + conn.query_pairs_mut().append_pair("appname", appname); + } + let mut source = MsSQLSource::new(rt.clone(), conn.as_str(), 1).unwrap(); + source.set_queries(&[CXQuery::naked( + "SELECT CAST(client_interface_name AS varchar(128)) AS driver_name, \ + CAST(program_name AS varchar(128)) AS application_name \ + FROM sys.dm_exec_sessions WHERE session_id = @@SPID", + )]); + source.fetch_metadata().unwrap(); + let mut partitions = source.partition().unwrap(); + let mut parser = partitions[0].parser().unwrap(); + assert_eq!(parser.fetch_next().unwrap(), (1, true)); + assert_eq!(parser.parse::>().unwrap(), Some("mssql-tds")); + assert_eq!( + parser.parse::>().unwrap(), + Some(appname.unwrap_or("ConnectorX")) + ); + } +} + #[cfg(feature = "src_mssql_tds")] mod tds_pool_tests { use super::*; diff --git a/docs/databases/mssql.md b/docs/databases/mssql.md index d78253d3d..efad08d7e 100644 --- a/docs/databases/mssql.md +++ b/docs/databases/mssql.md @@ -59,6 +59,18 @@ its low-level types are not interchangeable with backend-specific types. Rust builds can select `src_mssql_tds` instead of `src_mssql` (`src_mssql_tiberius`) to link only TDS, or enable both for runtime selection. +The TDS backend identifies its driver as `mssql-tds` in both the login library +name (`sys.dm_exec_sessions.client_interface_name`) and the User-Agent payload. +Its default application name (`program_name`) is `ConnectorX`; the connection +URL's `appname` parameter overrides the application name without changing the +driver name. + +Python builds send the installed `connectorx` package version (the same value +as `connectorx.__version__`, including prerelease suffixes) as the User-Agent +driver version. The numeric LOGIN7 driver version is unchanged. Rust-only builds +retain the `mssql-tds` User-Agent version unless the embedding application calls +`sources::mssql::set_user_agent_version` before opening connections. + The TDS backend shares a bounded connection pool across metadata, row counts, and partition readers, sized by `MsSQLSource::new`'s `nconn`. Partitions acquire leases only while executing, so there may be more partitions than connections. From 5316cdd2ebffa7bcc258f09c4837ce13a46112bf Mon Sep 17 00:00:00 2001 From: saurabh500 <1623701+saurabh500@users.noreply.github.com> Date: Thu, 1 Oct 2026 23:08:03 +0000 Subject: [PATCH 2/8] Revert MSSQL documentation additions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/databases/mssql.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/docs/databases/mssql.md b/docs/databases/mssql.md index efad08d7e..d78253d3d 100644 --- a/docs/databases/mssql.md +++ b/docs/databases/mssql.md @@ -59,18 +59,6 @@ its low-level types are not interchangeable with backend-specific types. Rust builds can select `src_mssql_tds` instead of `src_mssql` (`src_mssql_tiberius`) to link only TDS, or enable both for runtime selection. -The TDS backend identifies its driver as `mssql-tds` in both the login library -name (`sys.dm_exec_sessions.client_interface_name`) and the User-Agent payload. -Its default application name (`program_name`) is `ConnectorX`; the connection -URL's `appname` parameter overrides the application name without changing the -driver name. - -Python builds send the installed `connectorx` package version (the same value -as `connectorx.__version__`, including prerelease suffixes) as the User-Agent -driver version. The numeric LOGIN7 driver version is unchanged. Rust-only builds -retain the `mssql-tds` User-Agent version unless the embedding application calls -`sources::mssql::set_user_agent_version` before opening connections. - The TDS backend shares a bounded connection pool across metadata, row counts, and partition readers, sized by `MsSQLSource::new`'s `nconn`. Partitions acquire leases only while executing, so there may be more partitions than connections. From 8dafe19bc973ecb5a9e3bc4b1ddf175f8715a253 Mon Sep 17 00:00:00 2001 From: saurabh500 <1623701+saurabh500@users.noreply.github.com> Date: Thu, 1 Oct 2026 23:47:16 +0000 Subject: [PATCH 3/8] Identify User-Agent library as ConnectorX Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- connectorx/src/sources/mssql/tds_impl.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connectorx/src/sources/mssql/tds_impl.rs b/connectorx/src/sources/mssql/tds_impl.rs index dd81e7a93..2bd2ddda1 100644 --- a/connectorx/src/sources/mssql/tds_impl.rs +++ b/connectorx/src/sources/mssql/tds_impl.rs @@ -103,7 +103,7 @@ fn build_client_context(url: &Url) -> (String, ClientContext) { // The User-Agent feature carries a separate driver name from LOGIN7. context .user_agent - .set_library_name(context.library_name.clone()); + .set_library_name("ConnectorX".to_string()); if let Some(version) = USER_AGENT_VERSION.get() { context.user_agent.set_driver_version(version.clone()); } @@ -188,7 +188,7 @@ mod configuration_tests { let url = Url::parse(&format!("mssql://localhost/db{query}")).unwrap(); let (_, context) = build_client_context(&url).unwrap(); assert_eq!(context.library_name, "mssql-tds"); - assert_eq!(context.user_agent.library_name, "mssql-tds"); + assert_eq!(context.user_agent.library_name, "ConnectorX"); assert_eq!(context.application_name, expected_appname); } } From 6b45ae54494b0d1a72383dc69ae2cde6f0481b97 Mon Sep 17 00:00:00 2001 From: saurabh500 <1623701+saurabh500@users.noreply.github.com> Date: Thu, 1 Oct 2026 23:48:18 +0000 Subject: [PATCH 4/8] Use lowercase connectorx User-Agent library name Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- connectorx/src/sources/mssql/tds_impl.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connectorx/src/sources/mssql/tds_impl.rs b/connectorx/src/sources/mssql/tds_impl.rs index 2bd2ddda1..5370beec0 100644 --- a/connectorx/src/sources/mssql/tds_impl.rs +++ b/connectorx/src/sources/mssql/tds_impl.rs @@ -103,7 +103,7 @@ fn build_client_context(url: &Url) -> (String, ClientContext) { // The User-Agent feature carries a separate driver name from LOGIN7. context .user_agent - .set_library_name("ConnectorX".to_string()); + .set_library_name("connectorx".to_string()); if let Some(version) = USER_AGENT_VERSION.get() { context.user_agent.set_driver_version(version.clone()); } @@ -188,7 +188,7 @@ mod configuration_tests { let url = Url::parse(&format!("mssql://localhost/db{query}")).unwrap(); let (_, context) = build_client_context(&url).unwrap(); assert_eq!(context.library_name, "mssql-tds"); - assert_eq!(context.user_agent.library_name, "ConnectorX"); + assert_eq!(context.user_agent.library_name, "connectorx"); assert_eq!(context.application_name, expected_appname); } } From a4102a70d4cf127497e88579aab12120f809ce4c Mon Sep 17 00:00:00 2001 From: saurabh500 <1623701+saurabh500@users.noreply.github.com> Date: Thu, 1 Oct 2026 23:50:37 +0000 Subject: [PATCH 5/8] Include Python runtime version in MSSQL User-Agent Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- connectorx-python/src/lib.rs | 3 +- connectorx/src/sources/mssql/mod.rs | 2 +- connectorx/src/sources/mssql/tds_impl.rs | 41 ++++++++++++++++-------- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/connectorx-python/src/lib.rs b/connectorx-python/src/lib.rs index 7add61f38..9b98ee58c 100644 --- a/connectorx-python/src/lib.rs +++ b/connectorx-python/src/lib.rs @@ -42,7 +42,8 @@ fn connectorx(_: Python, m: &Bound<'_, PyModule>) -> PyResult<()> { .import("importlib.metadata")? .call_method1("version", ("connectorx",))? .extract::()?; - ::connectorx::sources::mssql::set_user_agent_version(version) + let runtime = format!("Python {}", Python::version_str()); + ::connectorx::sources::mssql::set_user_agent_info(version, runtime) .map_err(PyRuntimeError::new_err)?; m.add_wrapped(wrap_pyfunction!(get_mssql_driver))?; m.add_wrapped(wrap_pyfunction!(set_mssql_driver))?; diff --git a/connectorx/src/sources/mssql/mod.rs b/connectorx/src/sources/mssql/mod.rs index 5a9c35438..75c7b52b1 100644 --- a/connectorx/src/sources/mssql/mod.rs +++ b/connectorx/src/sources/mssql/mod.rs @@ -62,4 +62,4 @@ pub use self::dual_impl::{MsSQLSource, MsSQLSourceParser, MsSQLSourcePartition}; pub(crate) use self::tds_impl::tds_get_partition_range; #[cfg(feature = "src_mssql_tds")] -pub use self::tds_impl::set_user_agent_version; +pub use self::tds_impl::set_user_agent_info; diff --git a/connectorx/src/sources/mssql/tds_impl.rs b/connectorx/src/sources/mssql/tds_impl.rs index 5370beec0..6a2e8d93d 100644 --- a/connectorx/src/sources/mssql/tds_impl.rs +++ b/connectorx/src/sources/mssql/tds_impl.rs @@ -66,17 +66,27 @@ use url::Url; use urlencoding::decode; use uuid_old::Uuid; -static USER_AGENT_VERSION: OnceLock = OnceLock::new(); +#[derive(Clone, PartialEq)] +struct UserAgentInfo { + version: String, + runtime: String, +} + +static USER_AGENT_INFO: OnceLock = OnceLock::new(); -/// Sets the wrapper's package version for the TDS User-Agent, leaving LOGIN7 unchanged. +/// Sets the wrapper's package version and runtime for the TDS User-Agent, leaving LOGIN7 unchanged. /// Language bindings should call this before creating connections. Reinitializing -/// with the same version is allowed; a different version is rejected. -pub fn set_user_agent_version(version: String) -> Result<(), &'static str> { +/// with the same values is allowed; different values are rejected. +pub fn set_user_agent_info(version: String, runtime: String) -> Result<(), &'static str> { if version.is_empty() { return Err("MSSQL User-Agent version must not be empty"); } - if USER_AGENT_VERSION.get_or_init(|| version.clone()) != &version { - return Err("MSSQL User-Agent version is already initialized to a different version"); + if runtime.is_empty() { + return Err("MSSQL User-Agent runtime must not be empty"); + } + let info = UserAgentInfo { version, runtime }; + if USER_AGENT_INFO.get_or_init(|| info.clone()) != &info { + return Err("MSSQL User-Agent is already initialized with different values"); } Ok(()) } @@ -104,8 +114,9 @@ fn build_client_context(url: &Url) -> (String, ClientContext) { context .user_agent .set_library_name("connectorx".to_string()); - if let Some(version) = USER_AGENT_VERSION.get() { - context.user_agent.set_driver_version(version.clone()); + if let Some(info) = USER_AGENT_INFO.get() { + context.user_agent.set_driver_version(info.version.clone()); + context.user_agent.set_runtime(info.runtime.clone()); } context.application_name = "ConnectorX".to_string(); context.database = decode(&url.path()[1..])?.into_owned(); @@ -162,16 +173,20 @@ mod configuration_tests { use super::*; #[test] - fn package_version_overrides_only_user_agent() { - assert!(set_user_agent_version(String::new()).is_err()); + fn python_user_agent_info_preserves_login_version() { let version = "0.4.7a1"; - set_user_agent_version(version.to_string()).unwrap(); - set_user_agent_version(version.to_string()).unwrap(); - assert!(set_user_agent_version("0.4.8".to_string()).is_err()); + let runtime = "Python 3.12.3"; + assert!(set_user_agent_info(String::new(), runtime.to_string()).is_err()); + assert!(set_user_agent_info(version.to_string(), String::new()).is_err()); + set_user_agent_info(version.to_string(), runtime.to_string()).unwrap(); + set_user_agent_info(version.to_string(), runtime.to_string()).unwrap(); + assert!(set_user_agent_info("0.4.8".to_string(), runtime.to_string()).is_err()); + assert!(set_user_agent_info(version.to_string(), "Python 3.13.0".to_string()).is_err()); let url = Url::parse("mssql://localhost/db").unwrap(); let (_, context) = build_client_context(&url).unwrap(); assert_eq!(context.user_agent.driver_version, version); + assert_eq!(context.user_agent.runtime, runtime); assert_eq!( context.driver_version, ClientContext::with_data_source("tcp:localhost,1433").driver_version From 2ddd158fe0dfc8bd718577a1da5e88e6db606a7b Mon Sep 17 00:00:00 2001 From: saurabh500 <1623701+saurabh500@users.noreply.github.com> Date: Fri, 2 Oct 2026 00:24:34 +0000 Subject: [PATCH 6/8] Use structured Python version for concise runtime telemetry Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- connectorx-python/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/connectorx-python/src/lib.rs b/connectorx-python/src/lib.rs index 9b98ee58c..eafb1b72a 100644 --- a/connectorx-python/src/lib.rs +++ b/connectorx-python/src/lib.rs @@ -42,7 +42,11 @@ fn connectorx(_: Python, m: &Bound<'_, PyModule>) -> PyResult<()> { .import("importlib.metadata")? .call_method1("version", ("connectorx",))? .extract::()?; - let runtime = format!("Python {}", Python::version_str()); + let python_version = m.py().import("sys")?.getattr("version_info")?; + let major = python_version.getattr("major")?.extract::()?; + let minor = python_version.getattr("minor")?.extract::()?; + let micro = python_version.getattr("micro")?.extract::()?; + let runtime = format!("Python {major}.{minor}.{micro}"); ::connectorx::sources::mssql::set_user_agent_info(version, runtime) .map_err(PyRuntimeError::new_err)?; m.add_wrapped(wrap_pyfunction!(get_mssql_driver))?; From 6aee5152d59bc1e435337138ce4a821a763e1b0e Mon Sep 17 00:00:00 2001 From: Saurabh Singh Date: Sat, 3 Oct 2026 00:44:08 +0000 Subject: [PATCH 7/8] Preserve default MSSQL library name Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- connectorx/src/sources/mssql/tds_impl.rs | 6 ++++-- connectorx/tests/test_mssql.rs | 8 +++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/connectorx/src/sources/mssql/tds_impl.rs b/connectorx/src/sources/mssql/tds_impl.rs index 6a2e8d93d..b3e3b560d 100644 --- a/connectorx/src/sources/mssql/tds_impl.rs +++ b/connectorx/src/sources/mssql/tds_impl.rs @@ -109,7 +109,6 @@ fn build_client_context(url: &Url) -> (String, ClientContext) { }; let mut context = ClientContext::with_data_source(&datasource); - context.library_name = "mssql-tds".to_string(); // The User-Agent feature carries a separate driver name from LOGIN7. context .user_agent @@ -202,7 +201,10 @@ mod configuration_tests { ] { let url = Url::parse(&format!("mssql://localhost/db{query}")).unwrap(); let (_, context) = build_client_context(&url).unwrap(); - assert_eq!(context.library_name, "mssql-tds"); + assert_eq!( + context.library_name, + ClientContext::with_data_source("tcp:localhost,1433").library_name + ); assert_eq!(context.user_agent.library_name, "connectorx"); assert_eq!(context.application_name, expected_appname); } diff --git a/connectorx/tests/test_mssql.rs b/connectorx/tests/test_mssql.rs index 9f5e54587..b8b2c0425 100644 --- a/connectorx/tests/test_mssql.rs +++ b/connectorx/tests/test_mssql.rs @@ -20,6 +20,9 @@ mod test_db; #[cfg(feature = "src_mssql_tds")] #[test] fn test_mssql_tds_session_identity() { + let default_library_name = + mssql_tds::connection::client_context::ClientContext::with_data_source("tcp:localhost,1433") + .library_name; let rt = Arc::new(Runtime::new().unwrap()); let mut url = url::Url::parse(&test_db::mssql_url()).unwrap(); let params: Vec<_> = url @@ -45,7 +48,10 @@ fn test_mssql_tds_session_identity() { let mut partitions = source.partition().unwrap(); let mut parser = partitions[0].parser().unwrap(); assert_eq!(parser.fetch_next().unwrap(), (1, true)); - assert_eq!(parser.parse::>().unwrap(), Some("mssql-tds")); + assert_eq!( + parser.parse::>().unwrap(), + Some(default_library_name.as_str()) + ); assert_eq!( parser.parse::>().unwrap(), Some(appname.unwrap_or("ConnectorX")) From 9d83631f196f06211406896dafb5f6c737acacf5 Mon Sep 17 00:00:00 2001 From: "Saurabh Singh (SQL Drivers)" Date: Tue, 6 Oct 2026 16:31:30 -0700 Subject: [PATCH 8/8] Format MSSQL session identity test Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- connectorx/tests/test_mssql.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/connectorx/tests/test_mssql.rs b/connectorx/tests/test_mssql.rs index b8b2c0425..a33e051be 100644 --- a/connectorx/tests/test_mssql.rs +++ b/connectorx/tests/test_mssql.rs @@ -21,8 +21,10 @@ mod test_db; #[test] fn test_mssql_tds_session_identity() { let default_library_name = - mssql_tds::connection::client_context::ClientContext::with_data_source("tcp:localhost,1433") - .library_name; + mssql_tds::connection::client_context::ClientContext::with_data_source( + "tcp:localhost,1433", + ) + .library_name; let rt = Arc::new(Runtime::new().unwrap()); let mut url = url::Url::parse(&test_db::mssql_url()).unwrap(); let params: Vec<_> = url