From 63847496f14c813a5d80efd5b7de0f1294ffe1e3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 16:07:11 +0200 Subject: Adding upstream version 3.45.1. Signed-off-by: Daniel Baumann --- test/tkt-c694113d5.test | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 test/tkt-c694113d5.test (limited to 'test/tkt-c694113d5.test') diff --git a/test/tkt-c694113d5.test b/test/tkt-c694113d5.test new file mode 100644 index 0000000..bac91fc --- /dev/null +++ b/test/tkt-c694113d5.test @@ -0,0 +1,36 @@ +# 2018-07-24 +# +# The author disclaims copyright to this source code. In place of +# a legal notice, here is a blessing: +# +# May you do good and not evil. +# May you find forgiveness for yourself and forgive others. +# May you share freely, never taking more than you give. +# +#*********************************************************************** +# This file implements regression tests for SQLite library. Specifically, +# it tests that ticket [c694113e50321afdf952e2d1235b08ba663f8399]: +# + +set testdir [file dirname $argv0] +source $testdir/tester.tcl + +do_test tkt-c694113d5.100 { + sqlite3 db :memory: + db eval { + CREATE TABLE t1(a INTEGER PRIMARY KEY); + CREATE TABLE t2(d INTEGER PRIMARY KEY,e,f); + INSERT INTO t1(a) VALUES(1),(2),(3),(4); + } + set answer {} + db eval {SELECT a FROM t1 WHERE NOT EXISTS(SELECT 1 FROM t2 WHERE d=a)} { + if {$a==3} { + lappend answer "CREATE INDEX" + db eval {CREATE INDEX t2e ON t2(e);} + } + lappend answer "a=$a" + } + set answer +} {a=1 a=2 {CREATE INDEX} a=3 a=4} + +finish_test -- cgit v1.2.3