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 [a7b7803e8d1e8699cd8a460a38133b98892d2e17] has
16 set testdir [file dirname $argv0]
17 source $testdir/tester.tcl
18 source $testdir/lock_common.tcl
19 source $testdir/malloc_common.tcl
21 do_test tkt-a7b7803e.1 {
24 INSERT INTO t1 VALUES(0,'first'),(99,'fuzzy');
25 SELECT (t1.a==0) AS x, b
30 do_test tkt-a7b7803e.2 {
32 SELECT a, (t1.b='fuzzy') AS x
37 do_test tkt-a7b7803e.3 {
39 SELECT (a=99) AS x, (t1.b='fuzzy') AS y, *
44 do_test tkt-a7b7803e.4 {
46 SELECT (a=99) AS x, (t1.b='first') AS y, *
51 } {0 1 0 first 1 0 99 fuzzy}
52 do_test tkt-a7b7803e.5 {
54 SELECT (M.a=99) AS x, M.b, (N.b='first') AS y, N.b
59 } {0 first 1 first 1 fuzzy 1 first 1 fuzzy 0 fuzzy}
60 do_test tkt-a7b7803e.6 {
62 SELECT (M.a=99) AS x, M.b, (N.b='first') AS y, N.b
68 do_test tkt-a7b7803e.7 {
70 SELECT (M.a=99) AS x, M.b, (N.b='first') AS y, N.b
71 FROM t1 M JOIN t1 N ON x AND y
75 do_test tkt-a7b7803e.8 {
77 SELECT (M.a=99) AS x, M.b, (N.b='first') AS y, N.b
78 FROM t1 M JOIN t1 N ON x
81 } {1 fuzzy 1 first 1 fuzzy 0 fuzzy}