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. In particular,
12 # that problems related to ticket [18458b1a] have been fixed.
15 set testdir [file dirname $argv0]
16 source $testdir/tester.tcl
17 set testprefix tkt-18458b1a
22 # Disable the flattener and push-down optimizations
23 optimization_control db query-flattener 0
24 optimization_control db push-down 0
27 optimization_control db query-flattener 1
28 optimization_control db push-down 1
33 do_execsql_test $tn.1.1 {
34 CREATE TABLE t0(c0 COLLATE NOCASE);
35 INSERT INTO t0(c0) VALUES ('B');
36 CREATE VIEW v0(c0, c1) AS SELECT DISTINCT t0.c0, 'a' FROM t0;
39 do_execsql_test $tn.1.2 {
40 SELECT count(*) FROM v0 WHERE c1 >= c0;
43 do_execsql_test $tn.1.3 {
44 SELECT count(*) FROM v0 WHERE NOT NOT (c1 >= c0);
47 do_execsql_test $tn.1.4 {
48 SELECT count(*) FROM v0 WHERE ((c1 >= c0) OR 0+0);