Fix a problem causing the recovery extension to use excessive memory and CPU time...
[sqlite.git] / test / rowvalue6.test
blobd90e61c81125915222e667c1d6b1db8fcee45ade
1 # 2016-08-18
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 # The focus of this file is handling of NULL values in row-value IN
12 # expressions.
15 set testdir [file dirname $argv0]
16 source $testdir/tester.tcl
17 set ::testprefix rowvalue6
19 do_execsql_test 1.1 {
20   CREATE TABLE t1(a,b,c);
21   CREATE INDEX t1x1 ON t1(a,b);
22   INSERT INTO t1 VALUES(1,NULL,200);
24   CREATE TABLE t2(x,y,z);
25   INSERT INTO t2 VALUES(1,NULL,55);
27   SELECT c FROM t1 WHERE (a,b) IN (SELECT x,y FROM t2 WHERE z==55);
28 } {}
29 do_execsql_test 1.2 {
30   INSERT INTO t1 VALUES(2,3,400);
31   INSERT INTO t2 VALUES(2,3,55);  
33   SELECT c FROM t1 WHERE (a,b) IN (SELECT x,y FROM t2 WHERE z==55);
34 } {400}
36 finish_test