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
17 do_test tkt-f973c7ac3-1.0 {
19 CREATE TABLE t(c1 INTEGER, c2 INTEGER);
20 INSERT INTO t VALUES(5, 5);
21 INSERT INTO t VALUES(5, 4);
27 2 "CREATE INDEX i1 ON t(c1, c2)"
32 do_test tkt-f973c7ac3-1.$tn.1 {
34 SELECT * FROM t WHERE c1 = 5 AND c2>0 AND c2<='2' ORDER BY c2 DESC
37 do_test tkt-f973c7ac3-1.$tn.2 {
39 SELECT * FROM t WHERE c1 = 5 AND c2>0 AND c2<=5 ORDER BY c2 DESC
42 do_test tkt-f973c7ac3-1.$tn.3 {
44 SELECT * FROM t WHERE c1 = 5 AND c2>0 AND c2<='5' ORDER BY c2 DESC
47 do_test tkt-f973c7ac3-1.$tn.4 {
49 SELECT * FROM t WHERE c1 = 5 AND c2>'0' AND c2<=5 ORDER BY c2 DESC
52 do_test tkt-f973c7ac3-1.$tn.5 {
54 SELECT * FROM t WHERE c1 = 5 AND c2>'0' AND c2<='5' ORDER BY c2 DESC
58 do_test tkt-f973c7ac3-1.$tn.6 {
60 SELECT * FROM t WHERE c1 = 5 AND c2>0 AND c2<='2' ORDER BY c2 ASC
63 do_test tkt-f973c7ac3-1.$tn.7 {
65 SELECT * FROM t WHERE c1 = 5 AND c2>0 AND c2<=5 ORDER BY c2 ASC
68 do_test tkt-f973c7ac3-1.$tn.8 {
70 SELECT * FROM t WHERE c1 = 5 AND c2>0 AND c2<='5' ORDER BY c2 ASC
73 do_test tkt-f973c7ac3-1.$tn.9 {
75 SELECT * FROM t WHERE c1 = 5 AND c2>'0' AND c2<=5 ORDER BY c2 ASC
78 do_test tkt-f973c7ac3-1.$tn.10 {
80 SELECT * FROM t WHERE c1 = 5 AND c2>'0' AND c2<='5' ORDER BY c2 ASC