From 68ee447d352dc48c9c5e87a50ae298e4d4ebd556 Mon Sep 17 00:00:00 2001 From: Jussi Saurio Date: Mon, 8 Sep 2025 09:27:30 +0300 Subject: [PATCH] Minimal regression test for 2949 --- testing/join.test | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/testing/join.test b/testing/join.test index 853ccc875..44434e971 100755 --- a/testing/join.test +++ b/testing/join.test @@ -310,4 +310,12 @@ do_execsql_test_on_specific_db {:memory:} min-null-regression-test { insert into t values (1,1),(2,2); insert into u values (1,1),(3,3); select count(u.x) from t left join u using(y); -} {1} \ No newline at end of file +} {1} + +# regression test for issue 2949: consuming WHERE terms not originating from the LEFT JOIN +do_execsql_test_on_specific_db {:memory:} left-join-seek-key-regression-test { + CREATE TABLE t (x INTEGER PRIMARY KEY); + CREATE TABLE u (x INTEGER PRIMARY KEY); + INSERT INTO t VALUES (1); + SELECT * FROM t LEFT JOIN u ON false WHERE u.x = 1; +} {} \ No newline at end of file