SQLite

Check-in [8502fba37b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added test case to in4.test to try and duplicate crash reported on the mailing list. (CVS 5951)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8502fba37bb13c019252d0a65973a78982ec44aa
User & Date: shane 2008-11-24 15:32:00.000
Context
2008-11-24
20:01
Fixed some spelling errors in sqliteInt.h. Ticket #3509. (CVS 5952) (check-in: 7e134a5c1a user: shane tags: trunk)
15:32
Added test case to in4.test to try and duplicate crash reported on the mailing list. (CVS 5951) (check-in: 8502fba37b user: shane tags: trunk)
2008-11-22
19:50
fix the compile warnings on OS/2 (CVS 5950) (check-in: b7d0ec838b user: pweilbacher tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/in4.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 2008 September 1
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
#
# $Id: in4.test,v 1.1 2008/10/02 13:50:56 danielk1977 Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

do_test in4-1.1 {
  execsql {
    CREATE TABLE t1(a, b);











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 2008 September 1
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
#
# $Id: in4.test,v 1.2 2008/11/24 15:32:00 shane Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

do_test in4-1.1 {
  execsql {
    CREATE TABLE t1(a, b);
84
85
86
87
88
89
90
91


























92
93
do_test in4-2.7 {
  execsql { SELECT b FROM t2 WHERE a IN ('1', '2') }
} {one two}

do_test in4-2.8 {
  execsql { SELECT b FROM t2 WHERE a IN ('', '0.0.0', '2') }
} {two}



























finish_test









>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
do_test in4-2.7 {
  execsql { SELECT b FROM t2 WHERE a IN ('1', '2') }
} {one two}

do_test in4-2.8 {
  execsql { SELECT b FROM t2 WHERE a IN ('', '0.0.0', '2') }
} {two}

# add test case from the mailing list 
# (11/7/08 sqlite crash with "WHERE x in ()" query)
do_test in4-3.1 {
  execsql {
    DROP TABLE IF EXISTS t1;
    DROP TABLE IF EXISTS t2;
    CREATE TABLE t1(x, id);
    CREATE TABLE t2(x, id);
    INSERT INTO t1 VALUES(NULL, NULL);
    INSERT INTO t1 VALUES(0, NULL);
    INSERT INTO t1 VALUES(1, 3);
    INSERT INTO t1 VALUES(2, 4);
    INSERT INTO t1 VALUES(3, 5);
    INSERT INTO t1 VALUES(4, 6);
    INSERT INTO t2 VALUES(0, NULL);
    INSERT INTO t2 VALUES(4, 1);
    INSERT INTO t2 VALUES(NULL, 1);
    INSERT INTO t2 VALUES(NULL, NULL);
  }
} {}
do_test in4-3.2 {
  execsql {
    SELECT x FROM t1 WHERE id IN () AND x IN (SELECT x FROM t2 WHERE id=1)
  }
} {}

finish_test