From ce4286dff534d10bfe0545b770de00176f6565e8 Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Wed, 10 Jun 2020 00:32:09 -0700 Subject: [PATCH] test(mssql): handle null-safe equality comparison for type test for nulls --- sqlx-test/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlx-test/src/lib.rs b/sqlx-test/src/lib.rs index 4bbd7193..55e4b85c 100644 --- a/sqlx-test/src/lib.rs +++ b/sqlx-test/src/lib.rs @@ -185,7 +185,7 @@ macro_rules! MySql_query_for_test_prepared_type { #[macro_export] macro_rules! Mssql_query_for_test_prepared_type { () => { - "SELECT CASE WHEN {0} = @p1 THEN 1 ELSE 0 END, {0}, @p2" + "SELECT CASE WHEN {0} IS NULL AND @p1 IS NULL THEN 1 WHEN {0} = @p1 THEN 1 ELSE 0 END, {0}, @p2" }; }