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. Specifically,
12 # it tests that ticket [4c86b126f22ad548fee0125337bdc9366912d9ac].
14 # When SQLite is compiled using SQLITE_ENABLE_STAT3 or SQLITE_ENABLE_STAT4,
15 # it gets the wrong answer...
17 # The problem was introduced in SQLite 3.8.1.
19 set testdir [file dirname $argv0]
20 source $testdir/tester.tcl
22 do_execsql_test tkt-4c86b126f2-1.1 {
24 local_relpath TEXT PRIMARY KEY,
27 INSERT INTO nodes VALUES('A',NULL);
28 INSERT INTO nodes VALUES('A/B',NULL);
29 INSERT INTO nodes VALUES('',NULL);
30 INSERT INTO nodes VALUES('A/B/C-move',NULL);
31 INSERT INTO nodes VALUES('A/B/C','A/B/C-move');
32 INSERT INTO nodes VALUES('A/B-move',NULL);
33 INSERT INTO nodes VALUES('A/B-move/C-move',NULL);
34 INSERT INTO nodes VALUES('A/B-move/C','x');
35 SELECT local_relpath, moved_to
37 WHERE (local_relpath = 'A/B' OR
38 ((local_relpath > 'A/B/') AND (local_relpath < 'A/B0')))
39 AND moved_to IS NOT NULL;
42 do_execsql_test tkt-4c86b126f2-2.1 {
43 CREATE TABLE t1(x TEXT UNIQUE, y TEXT UNIQUE, z);
44 INSERT INTO t1 VALUES('ghi','jkl','y');
45 SELECT * FROM t1 WHERE (x='ghi' OR y='jkl') AND z IS NOT NULL;