blob: 0e2458c15e31c440d0f22e7d3e99497db81e6e59 [file] [log] [blame]
# 2008 December 11
#
# 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.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file is automatically generated from a separate TCL script.
# This file seeks to exercise integer boundary values.
#
# $Id: boundary1.test,v 1.2 2009/01/02 15:45:48 shane Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
# Many of the boundary tests depend on a working 64-bit implementation.
if {![working_64bit_int]} { finish_test; return }
do_test boundary1-1.1 {
db eval {
CREATE TABLE t1(a,x);
INSERT INTO t1(oid,a,x) VALUES(-8388609,1,'ffffffffff7fffff');
INSERT INTO t1(oid,a,x) VALUES(-36028797018963969,2,'ff7fffffffffffff');
INSERT INTO t1(oid,a,x) VALUES(9223372036854775807,3,'7fffffffffffffff');
INSERT INTO t1(oid,a,x) VALUES(127,4,'000000000000007f');
INSERT INTO t1(oid,a,x) VALUES(3,5,'0000000000000003');
INSERT INTO t1(oid,a,x) VALUES(16777216,6,'0000000001000000');
INSERT INTO t1(oid,a,x) VALUES(4398046511103,7,'000003ffffffffff');
INSERT INTO t1(oid,a,x) VALUES(16383,8,'0000000000003fff');
INSERT INTO t1(oid,a,x) VALUES(16777215,9,'0000000000ffffff');
INSERT INTO t1(oid,a,x) VALUES(281474976710655,10,'0000ffffffffffff');
INSERT INTO t1(oid,a,x) VALUES(-2147483648,11,'ffffffff80000000');
INSERT INTO t1(oid,a,x) VALUES(268435455,12,'000000000fffffff');
INSERT INTO t1(oid,a,x) VALUES(562949953421311,13,'0001ffffffffffff');
INSERT INTO t1(oid,a,x) VALUES(4294967295,14,'00000000ffffffff');
INSERT INTO t1(oid,a,x) VALUES(2097151,15,'00000000001fffff');
INSERT INTO t1(oid,a,x) VALUES(16384,16,'0000000000004000');
INSERT INTO t1(oid,a,x) VALUES(72057594037927935,17,'00ffffffffffffff');
INSERT INTO t1(oid,a,x) VALUES(8388607,18,'00000000007fffff');
INSERT INTO t1(oid,a,x) VALUES(1099511627776,19,'0000010000000000');
INSERT INTO t1(oid,a,x) VALUES(2147483647,20,'000000007fffffff');
INSERT INTO t1(oid,a,x) VALUES(-140737488355329,21,'ffff7fffffffffff');
INSERT INTO t1(oid,a,x) VALUES(34359738368,22,'0000000800000000');
INSERT INTO t1(oid,a,x) VALUES(32767,23,'0000000000007fff');
INSERT INTO t1(oid,a,x) VALUES(8388608,24,'0000000000800000');
INSERT INTO t1(oid,a,x) VALUES(140737488355327,25,'00007fffffffffff');
INSERT INTO t1(oid,a,x) VALUES(281474976710656,26,'0001000000000000');
INSERT INTO t1(oid,a,x) VALUES(36028797018963967,27,'007fffffffffffff');
INSERT INTO t1(oid,a,x) VALUES(72057594037927936,28,'0100000000000000');
INSERT INTO t1(oid,a,x) VALUES(-32769,29,'ffffffffffff7fff');
INSERT INTO t1(oid,a,x) VALUES(255,30,'00000000000000ff');
INSERT INTO t1(oid,a,x) VALUES(4,31,'0000000000000004');
INSERT INTO t1(oid,a,x) VALUES(-32768,32,'ffffffffffff8000');
INSERT INTO t1(oid,a,x) VALUES(-2,33,'fffffffffffffffe');
INSERT INTO t1(oid,a,x) VALUES(140737488355328,34,'0000800000000000');
INSERT INTO t1(oid,a,x) VALUES(549755813888,35,'0000008000000000');
INSERT INTO t1(oid,a,x) VALUES(4294967296,36,'0000000100000000');
INSERT INTO t1(oid,a,x) VALUES(-8388608,37,'ffffffffff800000');
INSERT INTO t1(oid,a,x) VALUES(-1,38,'ffffffffffffffff');
INSERT INTO t1(oid,a,x) VALUES(34359738367,39,'00000007ffffffff');
INSERT INTO t1(oid,a,x) VALUES(268435456,40,'0000000010000000');
INSERT INTO t1(oid,a,x) VALUES(2,41,'0000000000000002');
INSERT INTO t1(oid,a,x) VALUES(2097152,42,'0000000000200000');
INSERT INTO t1(oid,a,x) VALUES(562949953421312,43,'0002000000000000');
INSERT INTO t1(oid,a,x) VALUES(-140737488355328,44,'ffff800000000000');
INSERT INTO t1(oid,a,x) VALUES(36028797018963968,45,'0080000000000000');
INSERT INTO t1(oid,a,x) VALUES(549755813887,46,'0000007fffffffff');
INSERT INTO t1(oid,a,x) VALUES(-2147483649,47,'ffffffff7fffffff');
INSERT INTO t1(oid,a,x) VALUES(65535,48,'000000000000ffff');
INSERT INTO t1(oid,a,x) VALUES(128,49,'0000000000000080');
INSERT INTO t1(oid,a,x) VALUES(32768,50,'0000000000008000');
INSERT INTO t1(oid,a,x) VALUES(2147483648,51,'0000000080000000');
INSERT INTO t1(oid,a,x) VALUES(-3,52,'fffffffffffffffd');
INSERT INTO t1(oid,a,x) VALUES(-128,53,'ffffffffffffff80');
INSERT INTO t1(oid,a,x) VALUES(-129,54,'ffffffffffffff7f');
INSERT INTO t1(oid,a,x) VALUES(-9223372036854775808,55,'8000000000000000');
INSERT INTO t1(oid,a,x) VALUES(4398046511104,56,'0000040000000000');
INSERT INTO t1(oid,a,x) VALUES(1099511627775,57,'000000ffffffffff');
INSERT INTO t1(oid,a,x) VALUES(-549755813889,58,'ffffff7fffffffff');
INSERT INTO t1(oid,a,x) VALUES(0,59,'0000000000000000');
INSERT INTO t1(oid,a,x) VALUES(1,60,'0000000000000001');
INSERT INTO t1(oid,a,x) VALUES(256,61,'0000000000000100');
INSERT INTO t1(oid,a,x) VALUES(65536,62,'0000000000010000');
INSERT INTO t1(oid,a,x) VALUES(-549755813888,63,'ffffff8000000000');
INSERT INTO t1(oid,a,x) VALUES(-36028797018963968,64,'ff80000000000000');
CREATE INDEX t1i1 ON t1(a);
CREATE INDEX t1i2 ON t1(x);
}
} {}
do_test boundary1-1.2 {
db eval {
SELECT count(*) FROM t1
}
} {64}
do_test boundary1-2.1.1 {
db eval {
SELECT * FROM t1 WHERE rowid=72057594037927935
}
} {17 00ffffffffffffff}
do_test boundary1-2.1.2 {
db eval {
SELECT rowid, a FROM t1 WHERE x='00ffffffffffffff'
}
} {72057594037927935 17}
do_test boundary1-2.1.3 {
db eval {
SELECT rowid, x FROM t1 WHERE a=17
}
} {72057594037927935 00ffffffffffffff}
do_test boundary1-2.1.gt.1 {
db eval {
SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY a
}
} {3 28}
do_test boundary1-2.1.gt.2 {
db eval {
SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY a DESC
}
} {28 3}
do_test boundary1-2.1.gt.3 {
db eval {
SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY rowid
}
} {28 3}
do_test boundary1-2.1.gt.4 {
db eval {
SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY rowid DESC
}
} {3 28}
do_test boundary1-2.1.gt.5 {
db eval {
SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY x
}
} {28 3}
do_test boundary1-2.1.ge.1 {
db eval {
SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY a
}
} {3 17 28}
do_test boundary1-2.1.ge.2 {
db eval {
SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY a DESC
}
} {28 17 3}
do_test boundary1-2.1.ge.3 {
db eval {
SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY rowid
}
} {17 28 3}
do_test boundary1-2.1.ge.4 {
db eval {
SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY rowid DESC
}
} {3 28 17}
do_test boundary1-2.1.ge.5 {
db eval {
SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY x
}
} {17 28 3}
do_test boundary1-2.1.lt.1 {
db eval {
SELECT a FROM t1 WHERE rowid < 72057594037927935 ORDER BY a
}
} {1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
do_test boundary1-2.1.lt.2 {
db eval {
SELECT a FROM t1 WHERE rowid < 72057594037927935 ORDER BY a DESC
}
} {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 27 26 25 24 23 22 21 20 19 18 16 15 14 13 12 11 10 9 8 7 6 5 4 2 1}
do_test boundary1-2.1.lt.3 {
db eval {
SELECT a FROM t1 WHERE rowid < 72057594037927935 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45}
do_test boundary1-2.1.lt.4 {
db eval {
SELECT a FROM t1 WHERE rowid < 72057594037927935 ORDER BY rowid DESC
}
} {45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.1.lt.5 {
db eval {
SELECT a FROM t1 WHERE rowid < 72057594037927935 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.1.le.1 {
db eval {
SELECT a FROM t1 WHERE rowid <= 72057594037927935 ORDER BY a
}
} {1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
do_test boundary1-2.1.le.2 {
db eval {
SELECT a FROM t1 WHERE rowid <= 72057594037927935 ORDER BY a DESC
}
} {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 2 1}
do_test boundary1-2.1.le.3 {
db eval {
SELECT a FROM t1 WHERE rowid <= 72057594037927935 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17}
do_test boundary1-2.1.le.4 {
db eval {
SELECT a FROM t1 WHERE rowid <= 72057594037927935 ORDER BY rowid DESC
}
} {17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.1.le.5 {
db eval {
SELECT a FROM t1 WHERE rowid <= 72057594037927935 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.2.1 {
db eval {
SELECT * FROM t1 WHERE rowid=16384
}
} {16 0000000000004000}
do_test boundary1-2.2.2 {
db eval {
SELECT rowid, a FROM t1 WHERE x='0000000000004000'
}
} {16384 16}
do_test boundary1-2.2.3 {
db eval {
SELECT rowid, x FROM t1 WHERE a=16
}
} {16384 0000000000004000}
do_test boundary1-2.2.gt.1 {
db eval {
SELECT a FROM t1 WHERE rowid > 16384 ORDER BY a
}
} {3 6 7 9 10 12 13 14 15 17 18 19 20 22 23 24 25 26 27 28 34 35 36 39 40 42 43 45 46 48 50 51 56 57 62}
do_test boundary1-2.2.gt.2 {
db eval {
SELECT a FROM t1 WHERE rowid > 16384 ORDER BY a DESC
}
} {62 57 56 51 50 48 46 45 43 42 40 39 36 35 34 28 27 26 25 24 23 22 20 19 18 17 15 14 13 12 10 9 7 6 3}
do_test boundary1-2.2.gt.3 {
db eval {
SELECT a FROM t1 WHERE rowid > 16384 ORDER BY rowid
}
} {23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.2.gt.4 {
db eval {
SELECT a FROM t1 WHERE rowid > 16384 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23}
do_test boundary1-2.2.gt.5 {
db eval {
SELECT a FROM t1 WHERE rowid > 16384 ORDER BY x
}
} {23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.2.ge.1 {
db eval {
SELECT a FROM t1 WHERE rowid >= 16384 ORDER BY a
}
} {3 6 7 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 34 35 36 39 40 42 43 45 46 48 50 51 56 57 62}
do_test boundary1-2.2.ge.2 {
db eval {
SELECT a FROM t1 WHERE rowid >= 16384 ORDER BY a DESC
}
} {62 57 56 51 50 48 46 45 43 42 40 39 36 35 34 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 7 6 3}
do_test boundary1-2.2.ge.3 {
db eval {
SELECT a FROM t1 WHERE rowid >= 16384 ORDER BY rowid
}
} {16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.2.ge.4 {
db eval {
SELECT a FROM t1 WHERE rowid >= 16384 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16}
do_test boundary1-2.2.ge.5 {
db eval {
SELECT a FROM t1 WHERE rowid >= 16384 ORDER BY x
}
} {16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.2.lt.1 {
db eval {
SELECT a FROM t1 WHERE rowid < 16384 ORDER BY a
}
} {1 2 4 5 8 11 21 29 30 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 61 63 64}
do_test boundary1-2.2.lt.2 {
db eval {
SELECT a FROM t1 WHERE rowid < 16384 ORDER BY a DESC
}
} {64 63 61 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 30 29 21 11 8 5 4 2 1}
do_test boundary1-2.2.lt.3 {
db eval {
SELECT a FROM t1 WHERE rowid < 16384 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8}
do_test boundary1-2.2.lt.4 {
db eval {
SELECT a FROM t1 WHERE rowid < 16384 ORDER BY rowid DESC
}
} {8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.2.lt.5 {
db eval {
SELECT a FROM t1 WHERE rowid < 16384 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.2.le.1 {
db eval {
SELECT a FROM t1 WHERE rowid <= 16384 ORDER BY a
}
} {1 2 4 5 8 11 16 21 29 30 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 61 63 64}
do_test boundary1-2.2.le.2 {
db eval {
SELECT a FROM t1 WHERE rowid <= 16384 ORDER BY a DESC
}
} {64 63 61 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 30 29 21 16 11 8 5 4 2 1}
do_test boundary1-2.2.le.3 {
db eval {
SELECT a FROM t1 WHERE rowid <= 16384 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16}
do_test boundary1-2.2.le.4 {
db eval {
SELECT a FROM t1 WHERE rowid <= 16384 ORDER BY rowid DESC
}
} {16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.2.le.5 {
db eval {
SELECT a FROM t1 WHERE rowid <= 16384 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.3.1 {
db eval {
SELECT * FROM t1 WHERE rowid=4294967296
}
} {36 0000000100000000}
do_test boundary1-2.3.2 {
db eval {
SELECT rowid, a FROM t1 WHERE x='0000000100000000'
}
} {4294967296 36}
do_test boundary1-2.3.3 {
db eval {
SELECT rowid, x FROM t1 WHERE a=36
}
} {4294967296 0000000100000000}
do_test boundary1-2.3.gt.1 {
db eval {
SELECT a FROM t1 WHERE rowid > 4294967296 ORDER BY a
}
} {3 7 10 13 17 19 22 25 26 27 28 34 35 39 43 45 46 56 57}
do_test boundary1-2.3.gt.2 {
db eval {
SELECT a FROM t1 WHERE rowid > 4294967296 ORDER BY a DESC
}
} {57 56 46 45 43 39 35 34 28 27 26 25 22 19 17 13 10 7 3}
do_test boundary1-2.3.gt.3 {
db eval {
SELECT a FROM t1 WHERE rowid > 4294967296 ORDER BY rowid
}
} {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.3.gt.4 {
db eval {
SELECT a FROM t1 WHERE rowid > 4294967296 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39}
do_test boundary1-2.3.gt.5 {
db eval {
SELECT a FROM t1 WHERE rowid > 4294967296 ORDER BY x
}
} {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.3.ge.1 {
db eval {
SELECT a FROM t1 WHERE rowid >= 4294967296 ORDER BY a
}
} {3 7 10 13 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
do_test boundary1-2.3.ge.2 {
db eval {
SELECT a FROM t1 WHERE rowid >= 4294967296 ORDER BY a DESC
}
} {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 13 10 7 3}
do_test boundary1-2.3.ge.3 {
db eval {
SELECT a FROM t1 WHERE rowid >= 4294967296 ORDER BY rowid
}
} {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.3.ge.4 {
db eval {
SELECT a FROM t1 WHERE rowid >= 4294967296 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36}
do_test boundary1-2.3.ge.5 {
db eval {
SELECT a FROM t1 WHERE rowid >= 4294967296 ORDER BY x
}
} {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.3.lt.1 {
db eval {
SELECT a FROM t1 WHERE rowid < 4294967296 ORDER BY a
}
} {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 23 24 29 30 31 32 33 37 38 40 41 42 44 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
do_test boundary1-2.3.lt.2 {
db eval {
SELECT a FROM t1 WHERE rowid < 4294967296 ORDER BY a DESC
}
} {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 44 42 41 40 38 37 33 32 31 30 29 24 23 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
do_test boundary1-2.3.lt.3 {
db eval {
SELECT a FROM t1 WHERE rowid < 4294967296 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14}
do_test boundary1-2.3.lt.4 {
db eval {
SELECT a FROM t1 WHERE rowid < 4294967296 ORDER BY rowid DESC
}
} {14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.3.lt.5 {
db eval {
SELECT a FROM t1 WHERE rowid < 4294967296 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.3.le.1 {
db eval {
SELECT a FROM t1 WHERE rowid <= 4294967296 ORDER BY a
}
} {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 23 24 29 30 31 32 33 36 37 38 40 41 42 44 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
do_test boundary1-2.3.le.2 {
db eval {
SELECT a FROM t1 WHERE rowid <= 4294967296 ORDER BY a DESC
}
} {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 44 42 41 40 38 37 36 33 32 31 30 29 24 23 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
do_test boundary1-2.3.le.3 {
db eval {
SELECT a FROM t1 WHERE rowid <= 4294967296 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36}
do_test boundary1-2.3.le.4 {
db eval {
SELECT a FROM t1 WHERE rowid <= 4294967296 ORDER BY rowid DESC
}
} {36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.3.le.5 {
db eval {
SELECT a FROM t1 WHERE rowid <= 4294967296 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.4.1 {
db eval {
SELECT * FROM t1 WHERE rowid=16777216
}
} {6 0000000001000000}
do_test boundary1-2.4.2 {
db eval {
SELECT rowid, a FROM t1 WHERE x='0000000001000000'
}
} {16777216 6}
do_test boundary1-2.4.3 {
db eval {
SELECT rowid, x FROM t1 WHERE a=6
}
} {16777216 0000000001000000}
do_test boundary1-2.4.gt.1 {
db eval {
SELECT a FROM t1 WHERE rowid > 16777216 ORDER BY a
}
} {3 7 10 12 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
do_test boundary1-2.4.gt.2 {
db eval {
SELECT a FROM t1 WHERE rowid > 16777216 ORDER BY a DESC
}
} {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 12 10 7 3}
do_test boundary1-2.4.gt.3 {
db eval {
SELECT a FROM t1 WHERE rowid > 16777216 ORDER BY rowid
}
} {12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.4.gt.4 {
db eval {
SELECT a FROM t1 WHERE rowid > 16777216 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12}
do_test boundary1-2.4.gt.5 {
db eval {
SELECT a FROM t1 WHERE rowid > 16777216 ORDER BY x
}
} {12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.4.ge.1 {
db eval {
SELECT a FROM t1 WHERE rowid >= 16777216 ORDER BY a
}
} {3 6 7 10 12 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
do_test boundary1-2.4.ge.2 {
db eval {
SELECT a FROM t1 WHERE rowid >= 16777216 ORDER BY a DESC
}
} {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 12 10 7 6 3}
do_test boundary1-2.4.ge.3 {
db eval {
SELECT a FROM t1 WHERE rowid >= 16777216 ORDER BY rowid
}
} {6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.4.ge.4 {
db eval {
SELECT a FROM t1 WHERE rowid >= 16777216 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6}
do_test boundary1-2.4.ge.5 {
db eval {
SELECT a FROM t1 WHERE rowid >= 16777216 ORDER BY x
}
} {6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.4.lt.1 {
db eval {
SELECT a FROM t1 WHERE rowid < 16777216 ORDER BY a
}
} {1 2 4 5 8 9 11 15 16 18 21 23 24 29 30 31 32 33 37 38 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
do_test boundary1-2.4.lt.2 {
db eval {
SELECT a FROM t1 WHERE rowid < 16777216 ORDER BY a DESC
}
} {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 38 37 33 32 31 30 29 24 23 21 18 16 15 11 9 8 5 4 2 1}
do_test boundary1-2.4.lt.3 {
db eval {
SELECT a FROM t1 WHERE rowid < 16777216 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9}
do_test boundary1-2.4.lt.4 {
db eval {
SELECT a FROM t1 WHERE rowid < 16777216 ORDER BY rowid DESC
}
} {9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.4.lt.5 {
db eval {
SELECT a FROM t1 WHERE rowid < 16777216 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.4.le.1 {
db eval {
SELECT a FROM t1 WHERE rowid <= 16777216 ORDER BY a
}
} {1 2 4 5 6 8 9 11 15 16 18 21 23 24 29 30 31 32 33 37 38 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
do_test boundary1-2.4.le.2 {
db eval {
SELECT a FROM t1 WHERE rowid <= 16777216 ORDER BY a DESC
}
} {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 38 37 33 32 31 30 29 24 23 21 18 16 15 11 9 8 6 5 4 2 1}
do_test boundary1-2.4.le.3 {
db eval {
SELECT a FROM t1 WHERE rowid <= 16777216 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6}
do_test boundary1-2.4.le.4 {
db eval {
SELECT a FROM t1 WHERE rowid <= 16777216 ORDER BY rowid DESC
}
} {6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.4.le.5 {
db eval {
SELECT a FROM t1 WHERE rowid <= 16777216 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.5.1 {
db eval {
SELECT * FROM t1 WHERE rowid=-32769
}
} {29 ffffffffffff7fff}
do_test boundary1-2.5.2 {
db eval {
SELECT rowid, a FROM t1 WHERE x='ffffffffffff7fff'
}
} {-32769 29}
do_test boundary1-2.5.3 {
db eval {
SELECT rowid, x FROM t1 WHERE a=29
}
} {-32769 ffffffffffff7fff}
do_test boundary1-2.5.gt.1 {
db eval {
SELECT a FROM t1 WHERE rowid > -32769 ORDER BY a
}
} {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 32 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
do_test boundary1-2.5.gt.2 {
db eval {
SELECT a FROM t1 WHERE rowid > -32769 ORDER BY a DESC
}
} {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 32 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
do_test boundary1-2.5.gt.3 {
db eval {
SELECT a FROM t1 WHERE rowid > -32769 ORDER BY rowid
}
} {32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.5.gt.4 {
db eval {
SELECT a FROM t1 WHERE rowid > -32769 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32}
do_test boundary1-2.5.gt.5 {
db eval {
SELECT a FROM t1 WHERE rowid > -32769 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 32 54 53 52 33 38}
do_test boundary1-2.5.ge.1 {
db eval {
SELECT a FROM t1 WHERE rowid >= -32769 ORDER BY a
}
} {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
do_test boundary1-2.5.ge.2 {
db eval {
SELECT a FROM t1 WHERE rowid >= -32769 ORDER BY a DESC
}
} {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
do_test boundary1-2.5.ge.3 {
db eval {
SELECT a FROM t1 WHERE rowid >= -32769 ORDER BY rowid
}
} {29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.5.ge.4 {
db eval {
SELECT a FROM t1 WHERE rowid >= -32769 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29}
do_test boundary1-2.5.ge.5 {
db eval {
SELECT a FROM t1 WHERE rowid >= -32769 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 29 32 54 53 52 33 38}
do_test boundary1-2.5.lt.1 {
db eval {
SELECT a FROM t1 WHERE rowid < -32769 ORDER BY a
}
} {1 2 11 21 37 44 47 55 58 63 64}
do_test boundary1-2.5.lt.2 {
db eval {
SELECT a FROM t1 WHERE rowid < -32769 ORDER BY a DESC
}
} {64 63 58 55 47 44 37 21 11 2 1}
do_test boundary1-2.5.lt.3 {
db eval {
SELECT a FROM t1 WHERE rowid < -32769 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37}
do_test boundary1-2.5.lt.4 {
db eval {
SELECT a FROM t1 WHERE rowid < -32769 ORDER BY rowid DESC
}
} {37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.5.lt.5 {
db eval {
SELECT a FROM t1 WHERE rowid < -32769 ORDER BY x
}
} {55 2 64 21 44 58 63 47 11 1 37}
do_test boundary1-2.5.le.1 {
db eval {
SELECT a FROM t1 WHERE rowid <= -32769 ORDER BY a
}
} {1 2 11 21 29 37 44 47 55 58 63 64}
do_test boundary1-2.5.le.2 {
db eval {
SELECT a FROM t1 WHERE rowid <= -32769 ORDER BY a DESC
}
} {64 63 58 55 47 44 37 29 21 11 2 1}
do_test boundary1-2.5.le.3 {
db eval {
SELECT a FROM t1 WHERE rowid <= -32769 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29}
do_test boundary1-2.5.le.4 {
db eval {
SELECT a FROM t1 WHERE rowid <= -32769 ORDER BY rowid DESC
}
} {29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.5.le.5 {
db eval {
SELECT a FROM t1 WHERE rowid <= -32769 ORDER BY x
}
} {55 2 64 21 44 58 63 47 11 1 37 29}
do_test boundary1-2.6.1 {
db eval {
SELECT * FROM t1 WHERE rowid=-140737488355329
}
} {21 ffff7fffffffffff}
do_test boundary1-2.6.2 {
db eval {
SELECT rowid, a FROM t1 WHERE x='ffff7fffffffffff'
}
} {-140737488355329 21}
do_test boundary1-2.6.3 {
db eval {
SELECT rowid, x FROM t1 WHERE a=21
}
} {-140737488355329 ffff7fffffffffff}
do_test boundary1-2.6.gt.1 {
db eval {
SELECT a FROM t1 WHERE rowid > -140737488355329 ORDER BY a
}
} {1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 56 57 58 59 60 61 62 63}
do_test boundary1-2.6.gt.2 {
db eval {
SELECT a FROM t1 WHERE rowid > -140737488355329 ORDER BY a DESC
}
} {63 62 61 60 59 58 57 56 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 1}
do_test boundary1-2.6.gt.3 {
db eval {
SELECT a FROM t1 WHERE rowid > -140737488355329 ORDER BY rowid
}
} {44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.6.gt.4 {
db eval {
SELECT a FROM t1 WHERE rowid > -140737488355329 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44}
do_test boundary1-2.6.gt.5 {
db eval {
SELECT a FROM t1 WHERE rowid > -140737488355329 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.6.ge.1 {
db eval {
SELECT a FROM t1 WHERE rowid >= -140737488355329 ORDER BY a
}
} {1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 56 57 58 59 60 61 62 63}
do_test boundary1-2.6.ge.2 {
db eval {
SELECT a FROM t1 WHERE rowid >= -140737488355329 ORDER BY a DESC
}
} {63 62 61 60 59 58 57 56 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 1}
do_test boundary1-2.6.ge.3 {
db eval {
SELECT a FROM t1 WHERE rowid >= -140737488355329 ORDER BY rowid
}
} {21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.6.ge.4 {
db eval {
SELECT a FROM t1 WHERE rowid >= -140737488355329 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21}
do_test boundary1-2.6.ge.5 {
db eval {
SELECT a FROM t1 WHERE rowid >= -140737488355329 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.6.lt.1 {
db eval {
SELECT a FROM t1 WHERE rowid < -140737488355329 ORDER BY a
}
} {2 55 64}
do_test boundary1-2.6.lt.2 {
db eval {
SELECT a FROM t1 WHERE rowid < -140737488355329 ORDER BY a DESC
}
} {64 55 2}
do_test boundary1-2.6.lt.3 {
db eval {
SELECT a FROM t1 WHERE rowid < -140737488355329 ORDER BY rowid
}
} {55 2 64}
do_test boundary1-2.6.lt.4 {
db eval {
SELECT a FROM t1 WHERE rowid < -140737488355329 ORDER BY rowid DESC
}
} {64 2 55}
do_test boundary1-2.6.lt.5 {
db eval {
SELECT a FROM t1 WHERE rowid < -140737488355329 ORDER BY x
}
} {55 2 64}
do_test boundary1-2.6.le.1 {
db eval {
SELECT a FROM t1 WHERE rowid <= -140737488355329 ORDER BY a
}
} {2 21 55 64}
do_test boundary1-2.6.le.2 {
db eval {
SELECT a FROM t1 WHERE rowid <= -140737488355329 ORDER BY a DESC
}
} {64 55 21 2}
do_test boundary1-2.6.le.3 {
db eval {
SELECT a FROM t1 WHERE rowid <= -140737488355329 ORDER BY rowid
}
} {55 2 64 21}
do_test boundary1-2.6.le.4 {
db eval {
SELECT a FROM t1 WHERE rowid <= -140737488355329 ORDER BY rowid DESC
}
} {21 64 2 55}
do_test boundary1-2.6.le.5 {
db eval {
SELECT a FROM t1 WHERE rowid <= -140737488355329 ORDER BY x
}
} {55 2 64 21}
do_test boundary1-2.7.1 {
db eval {
SELECT * FROM t1 WHERE rowid=2
}
} {41 0000000000000002}
do_test boundary1-2.7.2 {
db eval {
SELECT rowid, a FROM t1 WHERE x='0000000000000002'
}
} {2 41}
do_test boundary1-2.7.3 {
db eval {
SELECT rowid, x FROM t1 WHERE a=41
}
} {2 0000000000000002}
do_test boundary1-2.7.gt.1 {
db eval {
SELECT a FROM t1 WHERE rowid > 2 ORDER BY a
}
} {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 34 35 36 39 40 42 43 45 46 48 49 50 51 56 57 61 62}
do_test boundary1-2.7.gt.2 {
db eval {
SELECT a FROM t1 WHERE rowid > 2 ORDER BY a DESC
}
} {62 61 57 56 51 50 49 48 46 45 43 42 40 39 36 35 34 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
do_test boundary1-2.7.gt.3 {
db eval {
SELECT a FROM t1 WHERE rowid > 2 ORDER BY rowid
}
} {5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.7.gt.4 {
db eval {
SELECT a FROM t1 WHERE rowid > 2 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5}
do_test boundary1-2.7.gt.5 {
db eval {
SELECT a FROM t1 WHERE rowid > 2 ORDER BY x
}
} {5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.7.ge.1 {
db eval {
SELECT a FROM t1 WHERE rowid >= 2 ORDER BY a
}
} {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 34 35 36 39 40 41 42 43 45 46 48 49 50 51 56 57 61 62}
do_test boundary1-2.7.ge.2 {
db eval {
SELECT a FROM t1 WHERE rowid >= 2 ORDER BY a DESC
}
} {62 61 57 56 51 50 49 48 46 45 43 42 41 40 39 36 35 34 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
do_test boundary1-2.7.ge.3 {
db eval {
SELECT a FROM t1 WHERE rowid >= 2 ORDER BY rowid
}
} {41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.7.ge.4 {
db eval {
SELECT a FROM t1 WHERE rowid >= 2 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41}
do_test boundary1-2.7.ge.5 {
db eval {
SELECT a FROM t1 WHERE rowid >= 2 ORDER BY x
}
} {41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.7.lt.1 {
db eval {
SELECT a FROM t1 WHERE rowid < 2 ORDER BY a
}
} {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 60 63 64}
do_test boundary1-2.7.lt.2 {
db eval {
SELECT a FROM t1 WHERE rowid < 2 ORDER BY a DESC
}
} {64 63 60 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
do_test boundary1-2.7.lt.3 {
db eval {
SELECT a FROM t1 WHERE rowid < 2 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60}
do_test boundary1-2.7.lt.4 {
db eval {
SELECT a FROM t1 WHERE rowid < 2 ORDER BY rowid DESC
}
} {60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.7.lt.5 {
db eval {
SELECT a FROM t1 WHERE rowid < 2 ORDER BY x
}
} {59 60 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.7.le.1 {
db eval {
SELECT a FROM t1 WHERE rowid <= 2 ORDER BY a
}
} {1 2 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
do_test boundary1-2.7.le.2 {
db eval {
SELECT a FROM t1 WHERE rowid <= 2 ORDER BY a DESC
}
} {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 2 1}
do_test boundary1-2.7.le.3 {
db eval {
SELECT a FROM t1 WHERE rowid <= 2 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41}
do_test boundary1-2.7.le.4 {
db eval {
SELECT a FROM t1 WHERE rowid <= 2 ORDER BY rowid DESC
}
} {41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.7.le.5 {
db eval {
SELECT a FROM t1 WHERE rowid <= 2 ORDER BY x
}
} {59 60 41 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.8.1 {
db eval {
SELECT * FROM t1 WHERE rowid=4
}
} {31 0000000000000004}
do_test boundary1-2.8.2 {
db eval {
SELECT rowid, a FROM t1 WHERE x='0000000000000004'
}
} {4 31}
do_test boundary1-2.8.3 {
db eval {
SELECT rowid, x FROM t1 WHERE a=31
}
} {4 0000000000000004}
do_test boundary1-2.8.gt.1 {
db eval {
SELECT a FROM t1 WHERE rowid > 4 ORDER BY a
}
} {3 4 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 34 35 36 39 40 42 43 45 46 48 49 50 51 56 57 61 62}
do_test boundary1-2.8.gt.2 {
db eval {
SELECT a FROM t1 WHERE rowid > 4 ORDER BY a DESC
}
} {62 61 57 56 51 50 49 48 46 45 43 42 40 39 36 35 34 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 4 3}
do_test boundary1-2.8.gt.3 {
db eval {
SELECT a FROM t1 WHERE rowid > 4 ORDER BY rowid
}
} {4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.8.gt.4 {
db eval {
SELECT a FROM t1 WHERE rowid > 4 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4}
do_test boundary1-2.8.gt.5 {
db eval {
SELECT a FROM t1 WHERE rowid > 4 ORDER BY x
}
} {4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.8.ge.1 {
db eval {
SELECT a FROM t1 WHERE rowid >= 4 ORDER BY a
}
} {3 4 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 34 35 36 39 40 42 43 45 46 48 49 50 51 56 57 61 62}
do_test boundary1-2.8.ge.2 {
db eval {
SELECT a FROM t1 WHERE rowid >= 4 ORDER BY a DESC
}
} {62 61 57 56 51 50 49 48 46 45 43 42 40 39 36 35 34 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 4 3}
do_test boundary1-2.8.ge.3 {
db eval {
SELECT a FROM t1 WHERE rowid >= 4 ORDER BY rowid
}
} {31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.8.ge.4 {
db eval {
SELECT a FROM t1 WHERE rowid >= 4 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31}
do_test boundary1-2.8.ge.5 {
db eval {
SELECT a FROM t1 WHERE rowid >= 4 ORDER BY x
}
} {31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.8.lt.1 {
db eval {
SELECT a FROM t1 WHERE rowid < 4 ORDER BY a
}
} {1 2 5 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
do_test boundary1-2.8.lt.2 {
db eval {
SELECT a FROM t1 WHERE rowid < 4 ORDER BY a DESC
}
} {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 5 2 1}
do_test boundary1-2.8.lt.3 {
db eval {
SELECT a FROM t1 WHERE rowid < 4 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5}
do_test boundary1-2.8.lt.4 {
db eval {
SELECT a FROM t1 WHERE rowid < 4 ORDER BY rowid DESC
}
} {5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.8.lt.5 {
db eval {
SELECT a FROM t1 WHERE rowid < 4 ORDER BY x
}
} {59 60 41 5 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.8.le.1 {
db eval {
SELECT a FROM t1 WHERE rowid <= 4 ORDER BY a
}
} {1 2 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
do_test boundary1-2.8.le.2 {
db eval {
SELECT a FROM t1 WHERE rowid <= 4 ORDER BY a DESC
}
} {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 2 1}
do_test boundary1-2.8.le.3 {
db eval {
SELECT a FROM t1 WHERE rowid <= 4 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31}
do_test boundary1-2.8.le.4 {
db eval {
SELECT a FROM t1 WHERE rowid <= 4 ORDER BY rowid DESC
}
} {31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.8.le.5 {
db eval {
SELECT a FROM t1 WHERE rowid <= 4 ORDER BY x
}
} {59 60 41 5 31 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.9.1 {
db eval {
SELECT * FROM t1 WHERE rowid=562949953421311
}
} {13 0001ffffffffffff}
do_test boundary1-2.9.2 {
db eval {
SELECT rowid, a FROM t1 WHERE x='0001ffffffffffff'
}
} {562949953421311 13}
do_test boundary1-2.9.3 {
db eval {
SELECT rowid, x FROM t1 WHERE a=13
}
} {562949953421311 0001ffffffffffff}
do_test boundary1-2.9.gt.1 {
db eval {
SELECT a FROM t1 WHERE rowid > 562949953421311 ORDER BY a
}
} {3 17 27 28 43 45}
do_test boundary1-2.9.gt.2 {
db eval {
SELECT a FROM t1 WHERE rowid > 562949953421311 ORDER BY a DESC
}
} {45 43 28 27 17 3}
do_test boundary1-2.9.gt.3 {
db eval {
SELECT a FROM t1 WHERE rowid > 562949953421311 ORDER BY rowid
}
} {43 27 45 17 28 3}
do_test boundary1-2.9.gt.4 {
db eval {
SELECT a FROM t1 WHERE rowid > 562949953421311 ORDER BY rowid DESC
}
} {3 28 17 45 27 43}
do_test boundary1-2.9.gt.5 {
db eval {
SELECT a FROM t1 WHERE rowid > 562949953421311 ORDER BY x
}
} {43 27 45 17 28 3}
do_test boundary1-2.9.ge.1 {
db eval {
SELECT a FROM t1 WHERE rowid >= 562949953421311 ORDER BY a
}
} {3 13 17 27 28 43 45}
do_test boundary1-2.9.ge.2 {
db eval {
SELECT a FROM t1 WHERE rowid >= 562949953421311 ORDER BY a DESC
}
} {45 43 28 27 17 13 3}
do_test boundary1-2.9.ge.3 {
db eval {
SELECT a FROM t1 WHERE rowid >= 562949953421311 ORDER BY rowid
}
} {13 43 27 45 17 28 3}
do_test boundary1-2.9.ge.4 {
db eval {
SELECT a FROM t1 WHERE rowid >= 562949953421311 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13}
do_test boundary1-2.9.ge.5 {
db eval {
SELECT a FROM t1 WHERE rowid >= 562949953421311 ORDER BY x
}
} {13 43 27 45 17 28 3}
do_test boundary1-2.9.lt.1 {
db eval {
SELECT a FROM t1 WHERE rowid < 562949953421311 ORDER BY a
}
} {1 2 4 5 6 7 8 9 10 11 12 14 15 16 18 19 20 21 22 23 24 25 26 29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
do_test boundary1-2.9.lt.2 {
db eval {
SELECT a FROM t1 WHERE rowid < 562949953421311 ORDER BY a DESC
}
} {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 34 33 32 31 30 29 26 25 24 23 22 21 20 19 18 16 15 14 12 11 10 9 8 7 6 5 4 2 1}
do_test boundary1-2.9.lt.3 {
db eval {
SELECT a FROM t1 WHERE rowid < 562949953421311 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26}
do_test boundary1-2.9.lt.4 {
db eval {
SELECT a FROM t1 WHERE rowid < 562949953421311 ORDER BY rowid DESC
}
} {26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.9.lt.5 {
db eval {
SELECT a FROM t1 WHERE rowid < 562949953421311 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.9.le.1 {
db eval {
SELECT a FROM t1 WHERE rowid <= 562949953421311 ORDER BY a
}
} {1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
do_test boundary1-2.9.le.2 {
db eval {
SELECT a FROM t1 WHERE rowid <= 562949953421311 ORDER BY a DESC
}
} {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 34 33 32 31 30 29 26 25 24 23 22 21 20 19 18 16 15 14 13 12 11 10 9 8 7 6 5 4 2 1}
do_test boundary1-2.9.le.3 {
db eval {
SELECT a FROM t1 WHERE rowid <= 562949953421311 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13}
do_test boundary1-2.9.le.4 {
db eval {
SELECT a FROM t1 WHERE rowid <= 562949953421311 ORDER BY rowid DESC
}
} {13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.9.le.5 {
db eval {
SELECT a FROM t1 WHERE rowid <= 562949953421311 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.10.1 {
db eval {
SELECT * FROM t1 WHERE rowid=256
}
} {61 0000000000000100}
do_test boundary1-2.10.2 {
db eval {
SELECT rowid, a FROM t1 WHERE x='0000000000000100'
}
} {256 61}
do_test boundary1-2.10.3 {
db eval {
SELECT rowid, x FROM t1 WHERE a=61
}
} {256 0000000000000100}
do_test boundary1-2.10.gt.1 {
db eval {
SELECT a FROM t1 WHERE rowid > 256 ORDER BY a
}
} {3 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 34 35 36 39 40 42 43 45 46 48 50 51 56 57 62}
do_test boundary1-2.10.gt.2 {
db eval {
SELECT a FROM t1 WHERE rowid > 256 ORDER BY a DESC
}
} {62 57 56 51 50 48 46 45 43 42 40 39 36 35 34 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 3}
do_test boundary1-2.10.gt.3 {
db eval {
SELECT a FROM t1 WHERE rowid > 256 ORDER BY rowid
}
} {8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.10.gt.4 {
db eval {
SELECT a FROM t1 WHERE rowid > 256 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8}
do_test boundary1-2.10.gt.5 {
db eval {
SELECT a FROM t1 WHERE rowid > 256 ORDER BY x
}
} {8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.10.ge.1 {
db eval {
SELECT a FROM t1 WHERE rowid >= 256 ORDER BY a
}
} {3 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 34 35 36 39 40 42 43 45 46 48 50 51 56 57 61 62}
do_test boundary1-2.10.ge.2 {
db eval {
SELECT a FROM t1 WHERE rowid >= 256 ORDER BY a DESC
}
} {62 61 57 56 51 50 48 46 45 43 42 40 39 36 35 34 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 3}
do_test boundary1-2.10.ge.3 {
db eval {
SELECT a FROM t1 WHERE rowid >= 256 ORDER BY rowid
}
} {61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.10.ge.4 {
db eval {
SELECT a FROM t1 WHERE rowid >= 256 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61}
do_test boundary1-2.10.ge.5 {
db eval {
SELECT a FROM t1 WHERE rowid >= 256 ORDER BY x
}
} {61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.10.lt.1 {
db eval {
SELECT a FROM t1 WHERE rowid < 256 ORDER BY a
}
} {1 2 4 5 11 21 29 30 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 63 64}
do_test boundary1-2.10.lt.2 {
db eval {
SELECT a FROM t1 WHERE rowid < 256 ORDER BY a DESC
}
} {64 63 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 30 29 21 11 5 4 2 1}
do_test boundary1-2.10.lt.3 {
db eval {
SELECT a FROM t1 WHERE rowid < 256 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30}
do_test boundary1-2.10.lt.4 {
db eval {
SELECT a FROM t1 WHERE rowid < 256 ORDER BY rowid DESC
}
} {30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.10.lt.5 {
db eval {
SELECT a FROM t1 WHERE rowid < 256 ORDER BY x
}
} {59 60 41 5 31 4 49 30 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.10.le.1 {
db eval {
SELECT a FROM t1 WHERE rowid <= 256 ORDER BY a
}
} {1 2 4 5 11 21 29 30 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 61 63 64}
do_test boundary1-2.10.le.2 {
db eval {
SELECT a FROM t1 WHERE rowid <= 256 ORDER BY a DESC
}
} {64 63 61 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 30 29 21 11 5 4 2 1}
do_test boundary1-2.10.le.3 {
db eval {
SELECT a FROM t1 WHERE rowid <= 256 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61}
do_test boundary1-2.10.le.4 {
db eval {
SELECT a FROM t1 WHERE rowid <= 256 ORDER BY rowid DESC
}
} {61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.10.le.5 {
db eval {
SELECT a FROM t1 WHERE rowid <= 256 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.11.1 {
db eval {
SELECT * FROM t1 WHERE rowid=34359738368
}
} {22 0000000800000000}
do_test boundary1-2.11.2 {
db eval {
SELECT rowid, a FROM t1 WHERE x='0000000800000000'
}
} {34359738368 22}
do_test boundary1-2.11.3 {
db eval {
SELECT rowid, x FROM t1 WHERE a=22
}
} {34359738368 0000000800000000}
do_test boundary1-2.11.gt.1 {
db eval {
SELECT a FROM t1 WHERE rowid > 34359738368 ORDER BY a
}
} {3 7 10 13 17 19 25 26 27 28 34 35 43 45 46 56 57}
do_test boundary1-2.11.gt.2 {
db eval {
SELECT a FROM t1 WHERE rowid > 34359738368 ORDER BY a DESC
}
} {57 56 46 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
do_test boundary1-2.11.gt.3 {
db eval {
SELECT a FROM t1 WHERE rowid > 34359738368 ORDER BY rowid
}
} {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.11.gt.4 {
db eval {
SELECT a FROM t1 WHERE rowid > 34359738368 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46}
do_test boundary1-2.11.gt.5 {
db eval {
SELECT a FROM t1 WHERE rowid > 34359738368 ORDER BY x
}
} {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.11.ge.1 {
db eval {
SELECT a FROM t1 WHERE rowid >= 34359738368 ORDER BY a
}
} {3 7 10 13 17 19 22 25 26 27 28 34 35 43 45 46 56 57}
do_test boundary1-2.11.ge.2 {
db eval {
SELECT a FROM t1 WHERE rowid >= 34359738368 ORDER BY a DESC
}
} {57 56 46 45 43 35 34 28 27 26 25 22 19 17 13 10 7 3}
do_test boundary1-2.11.ge.3 {
db eval {
SELECT a FROM t1 WHERE rowid >= 34359738368 ORDER BY rowid
}
} {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.11.ge.4 {
db eval {
SELECT a FROM t1 WHERE rowid >= 34359738368 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22}
do_test boundary1-2.11.ge.5 {
db eval {
SELECT a FROM t1 WHERE rowid >= 34359738368 ORDER BY x
}
} {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.11.lt.1 {
db eval {
SELECT a FROM t1 WHERE rowid < 34359738368 ORDER BY a
}
} {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 23 24 29 30 31 32 33 36 37 38 39 40 41 42 44 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
do_test boundary1-2.11.lt.2 {
db eval {
SELECT a FROM t1 WHERE rowid < 34359738368 ORDER BY a DESC
}
} {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 44 42 41 40 39 38 37 36 33 32 31 30 29 24 23 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
do_test boundary1-2.11.lt.3 {
db eval {
SELECT a FROM t1 WHERE rowid < 34359738368 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39}
do_test boundary1-2.11.lt.4 {
db eval {
SELECT a FROM t1 WHERE rowid < 34359738368 ORDER BY rowid DESC
}
} {39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.11.lt.5 {
db eval {
SELECT a FROM t1 WHERE rowid < 34359738368 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.11.le.1 {
db eval {
SELECT a FROM t1 WHERE rowid <= 34359738368 ORDER BY a
}
} {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 22 23 24 29 30 31 32 33 36 37 38 39 40 41 42 44 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
do_test boundary1-2.11.le.2 {
db eval {
SELECT a FROM t1 WHERE rowid <= 34359738368 ORDER BY a DESC
}
} {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 44 42 41 40 39 38 37 36 33 32 31 30 29 24 23 22 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
do_test boundary1-2.11.le.3 {
db eval {
SELECT a FROM t1 WHERE rowid <= 34359738368 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22}
do_test boundary1-2.11.le.4 {
db eval {
SELECT a FROM t1 WHERE rowid <= 34359738368 ORDER BY rowid DESC
}
} {22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.11.le.5 {
db eval {
SELECT a FROM t1 WHERE rowid <= 34359738368 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.12.1 {
db eval {
SELECT * FROM t1 WHERE rowid=65536
}
} {62 0000000000010000}
do_test boundary1-2.12.2 {
db eval {
SELECT rowid, a FROM t1 WHERE x='0000000000010000'
}
} {65536 62}
do_test boundary1-2.12.3 {
db eval {
SELECT rowid, x FROM t1 WHERE a=62
}
} {65536 0000000000010000}
do_test boundary1-2.12.gt.1 {
db eval {
SELECT a FROM t1 WHERE rowid > 65536 ORDER BY a
}
} {3 6 7 9 10 12 13 14 15 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 42 43 45 46 51 56 57}
do_test boundary1-2.12.gt.2 {
db eval {
SELECT a FROM t1 WHERE rowid > 65536 ORDER BY a DESC
}
} {57 56 51 46 45 43 42 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 15 14 13 12 10 9 7 6 3}
do_test boundary1-2.12.gt.3 {
db eval {
SELECT a FROM t1 WHERE rowid > 65536 ORDER BY rowid
}
} {15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.12.gt.4 {
db eval {
SELECT a FROM t1 WHERE rowid > 65536 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15}
do_test boundary1-2.12.gt.5 {
db eval {
SELECT a FROM t1 WHERE rowid > 65536 ORDER BY x
}
} {15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.12.ge.1 {
db eval {
SELECT a FROM t1 WHERE rowid >= 65536 ORDER BY a
}
} {3 6 7 9 10 12 13 14 15 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 42 43 45 46 51 56 57 62}
do_test boundary1-2.12.ge.2 {
db eval {
SELECT a FROM t1 WHERE rowid >= 65536 ORDER BY a DESC
}
} {62 57 56 51 46 45 43 42 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 15 14 13 12 10 9 7 6 3}
do_test boundary1-2.12.ge.3 {
db eval {
SELECT a FROM t1 WHERE rowid >= 65536 ORDER BY rowid
}
} {62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.12.ge.4 {
db eval {
SELECT a FROM t1 WHERE rowid >= 65536 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62}
do_test boundary1-2.12.ge.5 {
db eval {
SELECT a FROM t1 WHERE rowid >= 65536 ORDER BY x
}
} {62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.12.lt.1 {
db eval {
SELECT a FROM t1 WHERE rowid < 65536 ORDER BY a
}
} {1 2 4 5 8 11 16 21 23 29 30 31 32 33 37 38 41 44 47 48 49 50 52 53 54 55 58 59 60 61 63 64}
do_test boundary1-2.12.lt.2 {
db eval {
SELECT a FROM t1 WHERE rowid < 65536 ORDER BY a DESC
}
} {64 63 61 60 59 58 55 54 53 52 50 49 48 47 44 41 38 37 33 32 31 30 29 23 21 16 11 8 5 4 2 1}
do_test boundary1-2.12.lt.3 {
db eval {
SELECT a FROM t1 WHERE rowid < 65536 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48}
do_test boundary1-2.12.lt.4 {
db eval {
SELECT a FROM t1 WHERE rowid < 65536 ORDER BY rowid DESC
}
} {48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.12.lt.5 {
db eval {
SELECT a FROM t1 WHERE rowid < 65536 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.12.le.1 {
db eval {
SELECT a FROM t1 WHERE rowid <= 65536 ORDER BY a
}
} {1 2 4 5 8 11 16 21 23 29 30 31 32 33 37 38 41 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
do_test boundary1-2.12.le.2 {
db eval {
SELECT a FROM t1 WHERE rowid <= 65536 ORDER BY a DESC
}
} {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 41 38 37 33 32 31 30 29 23 21 16 11 8 5 4 2 1}
do_test boundary1-2.12.le.3 {
db eval {
SELECT a FROM t1 WHERE rowid <= 65536 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62}
do_test boundary1-2.12.le.4 {
db eval {
SELECT a FROM t1 WHERE rowid <= 65536 ORDER BY rowid DESC
}
} {62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.12.le.5 {
db eval {
SELECT a FROM t1 WHERE rowid <= 65536 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.13.1 {
db eval {
SELECT * FROM t1 WHERE rowid=268435456
}
} {40 0000000010000000}
do_test boundary1-2.13.2 {
db eval {
SELECT rowid, a FROM t1 WHERE x='0000000010000000'
}
} {268435456 40}
do_test boundary1-2.13.3 {
db eval {
SELECT rowid, x FROM t1 WHERE a=40
}
} {268435456 0000000010000000}
do_test boundary1-2.13.gt.1 {
db eval {
SELECT a FROM t1 WHERE rowid > 268435456 ORDER BY a
}
} {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
do_test boundary1-2.13.gt.2 {
db eval {
SELECT a FROM t1 WHERE rowid > 268435456 ORDER BY a DESC
}
} {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
do_test boundary1-2.13.gt.3 {
db eval {
SELECT a FROM t1 WHERE rowid > 268435456 ORDER BY rowid
}
} {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.13.gt.4 {
db eval {
SELECT a FROM t1 WHERE rowid > 268435456 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20}
do_test boundary1-2.13.gt.5 {
db eval {
SELECT a FROM t1 WHERE rowid > 268435456 ORDER BY x
}
} {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.13.ge.1 {
db eval {
SELECT a FROM t1 WHERE rowid >= 268435456 ORDER BY a
}
} {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
do_test boundary1-2.13.ge.2 {
db eval {
SELECT a FROM t1 WHERE rowid >= 268435456 ORDER BY a DESC
}
} {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
do_test boundary1-2.13.ge.3 {
db eval {
SELECT a FROM t1 WHERE rowid >= 268435456 ORDER BY rowid
}
} {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.13.ge.4 {
db eval {
SELECT a FROM t1 WHERE rowid >= 268435456 ORDER BY rowid DESC
}
} {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40}
do_test boundary1-2.13.ge.5 {
db eval {
SELECT a FROM t1 WHERE rowid >= 268435456 ORDER BY x
}
} {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
do_test boundary1-2.13.lt.1 {
db eval {
SELECT a FROM t1 WHERE rowid < 268435456 ORDER BY a
}
} {1 2 4 5 6 8 9 11 12 15 16 18 21 23 24 29 30 31 32 33 37 38 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
do_test boundary1-2.13.lt.2 {
db eval {
SELECT a FROM t1 WHERE rowid < 268435456 ORDER BY a DESC
}
} {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 38 37 33 32 31 30 29 24 23 21 18 16 15 12 11 9 8 6 5 4 2 1}
do_test boundary1-2.13.lt.3 {
db eval {
SELECT a FROM t1 WHERE rowid < 268435456 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12}
do_test boundary1-2.13.lt.4 {
db eval {
SELECT a FROM t1 WHERE rowid < 268435456 ORDER BY rowid DESC
}
} {12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.13.lt.5 {
db eval {
SELECT a FROM t1 WHERE rowid < 268435456 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.13.le.1 {
db eval {
SELECT a FROM t1 WHERE rowid <= 268435456 ORDER BY a
}
} {1 2 4 5 6 8 9 11 12 15 16 18 21 23 24 29 30 31 32 33 37 38 40 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
do_test boundary1-2.13.le.2 {
db eval {
SELECT a FROM t1 WHERE rowid <= 268435456 ORDER BY a DESC
}
} {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 40 38 37 33 32 31 30 29 24 23 21 18 16 15 12 11 9 8 6 5 4 2 1}
do_test boundary1-2.13.le.3 {
db eval {
SELECT a FROM t1 WHERE rowid <= 268435456 ORDER BY rowid
}
} {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40}
do_test boundary1-2.13.le.4 {
db eval {
SELECT a FROM t1 WHERE rowid <= 268435456 ORDER BY rowid DESC
}
} {40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
do_test boundary1-2.13.le.5 {
db eval {
SELECT a FROM t1 WHERE rowid <= 268435456 ORDER BY x
}
} {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
do_test boundary1-2.14.1 {
db eval {
SELECT * FROM t1 WHERE rowid=-140737488355328
}
} {44 ffff800000000000}
do_test boundary1-2.14.2 {
db eval {
SELECT rowid, a FROM t1 WHERE x='ffff800000000000'
}
} {-140737488355328 44}
do_test boundary1-2.14.3 {
db eval {
SELECT rowid, x FROM t1 WHERE a=44
}
} {-140737488355328 ffff800000000000}