3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
10 #***********************************************************************
11 # This file implements regression tests for SQLite library.
14 set testdir [file dirname $argv0]
15 source $testdir/tester.tcl
16 set testprefix seekscan1
19 CREATE TABLE t1(a TEXT, b INT, c INT NOT NULL, PRIMARY KEY(a,b,c));
20 WITH RECURSIVE c(x) AS (VALUES(0) UNION ALL SELECT x+1 FROM c WHERE x<1997)
21 INSERT INTO t1(a,b,c) SELECT printf('xyz%d',x/10),x/6,x FROM c;
22 INSERT INTO t1 VALUES('abc',234,6);
23 INSERT INTO t1 VALUES('abc',345,7);
30 WHERE b IN (234, 345) AND c BETWEEN 6 AND 6.5 AND a='abc'
38 WHERE b IN (234, 345) AND c BETWEEN 6 AND 7 AND a='abc'
47 WHERE b IN (234, 345) AND c >=6 AND a='abc'
56 WHERE b IN (234, 345) AND c<=7 AND a='abc'
64 SELECT a,b,c FROM t1 WHERE b IN (235, 345) AND c<=3 AND a='abc' ORDER BY a, b;