From 7e8dabaee5f0bbfbe306e1cc0c1404eecba3bfd6 Mon Sep 17 00:00:00 2001 From: Pavan-Nambi Date: Sun, 12 Oct 2025 18:02:03 +0530 Subject: [PATCH] make comparison case sensitive --- core/util.rs | 2 +- testing/select.test | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/util.rs b/core/util.rs index b35fbdaa6..ea4fca470 100644 --- a/core/util.rs +++ b/core/util.rs @@ -312,7 +312,7 @@ pub fn module_args_from_sql(sql: &str) -> Result> { pub fn check_literal_equivalency(lhs: &Literal, rhs: &Literal) -> bool { match (lhs, rhs) { (Literal::Numeric(n1), Literal::Numeric(n2)) => cmp_numeric_strings(n1, n2), - (Literal::String(s1), Literal::String(s2)) => check_ident_equivalency(s1, s2), + (Literal::String(s1), Literal::String(s2)) => s1 == s2, (Literal::Blob(b1), Literal::Blob(b2)) => b1 == b2, (Literal::Keyword(k1), Literal::Keyword(k2)) => check_ident_equivalency(k1, k2), (Literal::Null, Literal::Null) => true, diff --git a/testing/select.test b/testing/select.test index 5dff582f5..1e6ebe9ce 100755 --- a/testing/select.test +++ b/testing/select.test @@ -999,3 +999,8 @@ do_execsql_test_in_memory_any_error limit-column-reference-error { CREATE TABLE t(a); SELECT * FROM t LIMIT (t.a); } + +do_execsql_test select-binary-collation { + SELECT 'a' = 'A'; + SELECT 'a' = 'a'; +} {0 1} \ No newline at end of file