summaryrefslogtreecommitdiffstats
path: root/test/notnull2.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:07:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:07:37 +0000
commitde1caa20c41f730e54fb6974ba7821fe48816e40 (patch)
tree4702bdab12e2b6f51bef05af9f8d8854d2e1b7e8 /test/notnull2.test
parentAdding upstream version 3.45.1. (diff)
downloadsqlite3-upstream/3.45.2.tar.xz
sqlite3-upstream/3.45.2.zip
Adding upstream version 3.45.2.upstream/3.45.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--test/notnull2.test16
1 files changed, 12 insertions, 4 deletions
diff --git a/test/notnull2.test b/test/notnull2.test
index 7f68086..09161ef 100644
--- a/test/notnull2.test
+++ b/test/notnull2.test
@@ -59,14 +59,14 @@ do_vmstep_test 1.4.2 {
do_vmstep_test 1.5.1 {
SELECT count(*) FROM t2 WHERE EXISTS(
- SELECT t2.d IS NULL FROM t1 WHERE t1.a=450
+ SELECT 1 FROM t1 WHERE t1.a=450 AND t2.d IS NULL
)
-} 10000 {1000}
+} 7000 {0}
do_vmstep_test 1.5.2 {
SELECT count(*) FROM t2 WHERE EXISTS(
- SELECT t2.c IS NULL FROM t1 WHERE t1.a=450
+ SELECT 1 FROM t1 WHERE t1.a=450 AND t2.c IS NULL
)
-} +100000 {1000}
+} +8000 {0}
#-------------------------------------------------------------------------
reset_db
@@ -111,4 +111,12 @@ do_execsql_test 4.1 {
SELECT * FROM (SELECT 3 AS c FROM t1) AS t3 LEFT JOIN t2 ON c IS NULL;
} {3 {}}
+# 2024-03-08 https://sqlite.org/forum/forumpost/440f2a2f17
+#
+reset_db
+do_execsql_test 5.0 {
+ CREATE TABLE t1(a INT NOT NULL);
+ SELECT a IS NULL, a IS NOT NULL, count(*) FROM t1;
+} {1 0 0}
+
finish_test