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.
12 # Specifically, it tests the behavior of the sqlite3VdbeRecordCompare()
13 # routine in cases where the rowid is 0 or 1 in file format 4
14 # (meaning that the rowid has type code 8 or 9 with zero bytes of
15 # data). Ticket #3292.
17 # $Id: tkt3292.test,v 1.1 2008/08/13 14:07:41 drh Exp $
19 set testdir [file dirname $argv0]
20 source $testdir/tester.tcl
24 PRAGMA legacy_file_format=OFF;
25 CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT);
26 INSERT INTO t1 VALUES(0, 1);
27 INSERT INTO t1 VALUES(1, 1);
28 INSERT INTO t1 VALUES(2, 1);
29 CREATE INDEX i1 ON t1(b);
30 SELECT * FROM t1 WHERE b>=1;
35 INSERT INTO t1 VALUES(3, 0);
36 INSERT INTO t1 VALUES(4, 2);
37 SELECT * FROM t1 WHERE b>=1;
44 CREATE TABLE t2(a INTEGER PRIMARY KEY, b, c, d);
45 INSERT INTO t2 VALUES(0, 1, 'hello', x'012345');
46 INSERT INTO t2 VALUES(1, 1, 'hello', x'012345');
47 INSERT INTO t2 VALUES(2, 1, 'hello', x'012345');
48 CREATE INDEX i2 ON t2(b,c,d);
49 SELECT a FROM t2 WHERE b=1 AND c='hello' AND d>=x'012345';
54 INSERT INTO t2 VALUES(3, 1, 'hello', x'012344');
55 INSERT INTO t2 VALUES(4, 1, 'hello', x'012346');
56 SELECT a FROM t2 WHERE b=1 AND c='hello' AND d>=x'012345';