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.
13 # This file is automatically generated from a separate TCL script.
14 # This file seeks to exercise integer boundary values.
16 # $Id: boundary1.test,v 1.2 2009/01/02 15:45:48 shane Exp $
18 set testdir [file dirname $argv0]
19 source $testdir/tester.tcl
21 # Many of the boundary tests depend on a working 64-bit implementation.
22 if {![working_64bit_int]} { finish_test; return }
24 do_test boundary1-1.1 {
27 INSERT INTO t1(oid,a,x) VALUES(-8388609,1,'ffffffffff7fffff');
28 INSERT INTO t1(oid,a,x) VALUES(-36028797018963969,2,'ff7fffffffffffff');
29 INSERT INTO t1(oid,a,x) VALUES(9223372036854775807,3,'7fffffffffffffff');
30 INSERT INTO t1(oid,a,x) VALUES(127,4,'000000000000007f');
31 INSERT INTO t1(oid,a,x) VALUES(3,5,'0000000000000003');
32 INSERT INTO t1(oid,a,x) VALUES(16777216,6,'0000000001000000');
33 INSERT INTO t1(oid,a,x) VALUES(4398046511103,7,'000003ffffffffff');
34 INSERT INTO t1(oid,a,x) VALUES(16383,8,'0000000000003fff');
35 INSERT INTO t1(oid,a,x) VALUES(16777215,9,'0000000000ffffff');
36 INSERT INTO t1(oid,a,x) VALUES(281474976710655,10,'0000ffffffffffff');
37 INSERT INTO t1(oid,a,x) VALUES(-2147483648,11,'ffffffff80000000');
38 INSERT INTO t1(oid,a,x) VALUES(268435455,12,'000000000fffffff');
39 INSERT INTO t1(oid,a,x) VALUES(562949953421311,13,'0001ffffffffffff');
40 INSERT INTO t1(oid,a,x) VALUES(4294967295,14,'00000000ffffffff');
41 INSERT INTO t1(oid,a,x) VALUES(2097151,15,'00000000001fffff');
42 INSERT INTO t1(oid,a,x) VALUES(16384,16,'0000000000004000');
43 INSERT INTO t1(oid,a,x) VALUES(72057594037927935,17,'00ffffffffffffff');
44 INSERT INTO t1(oid,a,x) VALUES(8388607,18,'00000000007fffff');
45 INSERT INTO t1(oid,a,x) VALUES(1099511627776,19,'0000010000000000');
46 INSERT INTO t1(oid,a,x) VALUES(2147483647,20,'000000007fffffff');
47 INSERT INTO t1(oid,a,x) VALUES(-140737488355329,21,'ffff7fffffffffff');
48 INSERT INTO t1(oid,a,x) VALUES(34359738368,22,'0000000800000000');
49 INSERT INTO t1(oid,a,x) VALUES(32767,23,'0000000000007fff');
50 INSERT INTO t1(oid,a,x) VALUES(8388608,24,'0000000000800000');
51 INSERT INTO t1(oid,a,x) VALUES(140737488355327,25,'00007fffffffffff');
52 INSERT INTO t1(oid,a,x) VALUES(281474976710656,26,'0001000000000000');
53 INSERT INTO t1(oid,a,x) VALUES(36028797018963967,27,'007fffffffffffff');
54 INSERT INTO t1(oid,a,x) VALUES(72057594037927936,28,'0100000000000000');
55 INSERT INTO t1(oid,a,x) VALUES(-32769,29,'ffffffffffff7fff');
56 INSERT INTO t1(oid,a,x) VALUES(255,30,'00000000000000ff');
57 INSERT INTO t1(oid,a,x) VALUES(4,31,'0000000000000004');
58 INSERT INTO t1(oid,a,x) VALUES(-32768,32,'ffffffffffff8000');
59 INSERT INTO t1(oid,a,x) VALUES(-2,33,'fffffffffffffffe');
60 INSERT INTO t1(oid,a,x) VALUES(140737488355328,34,'0000800000000000');
61 INSERT INTO t1(oid,a,x) VALUES(549755813888,35,'0000008000000000');
62 INSERT INTO t1(oid,a,x) VALUES(4294967296,36,'0000000100000000');
63 INSERT INTO t1(oid,a,x) VALUES(-8388608,37,'ffffffffff800000');
64 INSERT INTO t1(oid,a,x) VALUES(-1,38,'ffffffffffffffff');
65 INSERT INTO t1(oid,a,x) VALUES(34359738367,39,'00000007ffffffff');
66 INSERT INTO t1(oid,a,x) VALUES(268435456,40,'0000000010000000');
67 INSERT INTO t1(oid,a,x) VALUES(2,41,'0000000000000002');
68 INSERT INTO t1(oid,a,x) VALUES(2097152,42,'0000000000200000');
69 INSERT INTO t1(oid,a,x) VALUES(562949953421312,43,'0002000000000000');
70 INSERT INTO t1(oid,a,x) VALUES(-140737488355328,44,'ffff800000000000');
71 INSERT INTO t1(oid,a,x) VALUES(36028797018963968,45,'0080000000000000');
72 INSERT INTO t1(oid,a,x) VALUES(549755813887,46,'0000007fffffffff');
73 INSERT INTO t1(oid,a,x) VALUES(-2147483649,47,'ffffffff7fffffff');
74 INSERT INTO t1(oid,a,x) VALUES(65535,48,'000000000000ffff');
75 INSERT INTO t1(oid,a,x) VALUES(128,49,'0000000000000080');
76 INSERT INTO t1(oid,a,x) VALUES(32768,50,'0000000000008000');
77 INSERT INTO t1(oid,a,x) VALUES(2147483648,51,'0000000080000000');
78 INSERT INTO t1(oid,a,x) VALUES(-3,52,'fffffffffffffffd');
79 INSERT INTO t1(oid,a,x) VALUES(-128,53,'ffffffffffffff80');
80 INSERT INTO t1(oid,a,x) VALUES(-129,54,'ffffffffffffff7f');
81 INSERT INTO t1(oid,a,x) VALUES(-9223372036854775808,55,'8000000000000000');
82 INSERT INTO t1(oid,a,x) VALUES(4398046511104,56,'0000040000000000');
83 INSERT INTO t1(oid,a,x) VALUES(1099511627775,57,'000000ffffffffff');
84 INSERT INTO t1(oid,a,x) VALUES(-549755813889,58,'ffffff7fffffffff');
85 INSERT INTO t1(oid,a,x) VALUES(0,59,'0000000000000000');
86 INSERT INTO t1(oid,a,x) VALUES(1,60,'0000000000000001');
87 INSERT INTO t1(oid,a,x) VALUES(256,61,'0000000000000100');
88 INSERT INTO t1(oid,a,x) VALUES(65536,62,'0000000000010000');
89 INSERT INTO t1(oid,a,x) VALUES(-549755813888,63,'ffffff8000000000');
90 INSERT INTO t1(oid,a,x) VALUES(-36028797018963968,64,'ff80000000000000');
91 CREATE INDEX t1i1 ON t1(a);
92 CREATE INDEX t1i2 ON t1(x);
95 do_test boundary1-1.2 {
97 SELECT count(*) FROM t1
100 do_test boundary1-2.1.1 {
102 SELECT * FROM t1 WHERE rowid=72057594037927935
104 } {17 00ffffffffffffff}
105 do_test boundary1-2.1.2 {
107 SELECT rowid, a FROM t1 WHERE x='00ffffffffffffff'
109 } {72057594037927935 17}
110 do_test boundary1-2.1.3 {
112 SELECT rowid, x FROM t1 WHERE a=17
114 } {72057594037927935 00ffffffffffffff}
115 do_test boundary1-2.1.gt.1 {
117 SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY a
120 do_test boundary1-2.1.gt.2 {
122 SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY a DESC
125 do_test boundary1-2.1.gt.3 {
127 SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY rowid
130 do_test boundary1-2.1.gt.4 {
132 SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY rowid DESC
135 do_test boundary1-2.1.gt.5 {
137 SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY x
140 do_test boundary1-2.1.ge.1 {
142 SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY a
145 do_test boundary1-2.1.ge.2 {
147 SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY a DESC
150 do_test boundary1-2.1.ge.3 {
152 SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY rowid
155 do_test boundary1-2.1.ge.4 {
157 SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY rowid DESC
160 do_test boundary1-2.1.ge.5 {
162 SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY x
165 do_test boundary1-2.1.lt.1 {
167 SELECT a FROM t1 WHERE rowid < 72057594037927935 ORDER BY a
169 } {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}
170 do_test boundary1-2.1.lt.2 {
172 SELECT a FROM t1 WHERE rowid < 72057594037927935 ORDER BY a DESC
174 } {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}
175 do_test boundary1-2.1.lt.3 {
177 SELECT a FROM t1 WHERE rowid < 72057594037927935 ORDER BY rowid
179 } {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}
180 do_test boundary1-2.1.lt.4 {
182 SELECT a FROM t1 WHERE rowid < 72057594037927935 ORDER BY rowid DESC
184 } {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}
185 do_test boundary1-2.1.lt.5 {
187 SELECT a FROM t1 WHERE rowid < 72057594037927935 ORDER BY x
189 } {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}
190 do_test boundary1-2.1.le.1 {
192 SELECT a FROM t1 WHERE rowid <= 72057594037927935 ORDER BY a
194 } {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}
195 do_test boundary1-2.1.le.2 {
197 SELECT a FROM t1 WHERE rowid <= 72057594037927935 ORDER BY a DESC
199 } {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}
200 do_test boundary1-2.1.le.3 {
202 SELECT a FROM t1 WHERE rowid <= 72057594037927935 ORDER BY rowid
204 } {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}
205 do_test boundary1-2.1.le.4 {
207 SELECT a FROM t1 WHERE rowid <= 72057594037927935 ORDER BY rowid DESC
209 } {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}
210 do_test boundary1-2.1.le.5 {
212 SELECT a FROM t1 WHERE rowid <= 72057594037927935 ORDER BY x
214 } {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}
215 do_test boundary1-2.2.1 {
217 SELECT * FROM t1 WHERE rowid=16384
219 } {16 0000000000004000}
220 do_test boundary1-2.2.2 {
222 SELECT rowid, a FROM t1 WHERE x='0000000000004000'
225 do_test boundary1-2.2.3 {
227 SELECT rowid, x FROM t1 WHERE a=16
229 } {16384 0000000000004000}
230 do_test boundary1-2.2.gt.1 {
232 SELECT a FROM t1 WHERE rowid > 16384 ORDER BY a
234 } {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}
235 do_test boundary1-2.2.gt.2 {
237 SELECT a FROM t1 WHERE rowid > 16384 ORDER BY a DESC
239 } {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}
240 do_test boundary1-2.2.gt.3 {
242 SELECT a FROM t1 WHERE rowid > 16384 ORDER BY rowid
244 } {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}
245 do_test boundary1-2.2.gt.4 {
247 SELECT a FROM t1 WHERE rowid > 16384 ORDER BY rowid DESC
249 } {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}
250 do_test boundary1-2.2.gt.5 {
252 SELECT a FROM t1 WHERE rowid > 16384 ORDER BY x
254 } {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}
255 do_test boundary1-2.2.ge.1 {
257 SELECT a FROM t1 WHERE rowid >= 16384 ORDER BY a
259 } {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}
260 do_test boundary1-2.2.ge.2 {
262 SELECT a FROM t1 WHERE rowid >= 16384 ORDER BY a DESC
264 } {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}
265 do_test boundary1-2.2.ge.3 {
267 SELECT a FROM t1 WHERE rowid >= 16384 ORDER BY rowid
269 } {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}
270 do_test boundary1-2.2.ge.4 {
272 SELECT a FROM t1 WHERE rowid >= 16384 ORDER BY rowid DESC
274 } {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}
275 do_test boundary1-2.2.ge.5 {
277 SELECT a FROM t1 WHERE rowid >= 16384 ORDER BY x
279 } {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}
280 do_test boundary1-2.2.lt.1 {
282 SELECT a FROM t1 WHERE rowid < 16384 ORDER BY a
284 } {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}
285 do_test boundary1-2.2.lt.2 {
287 SELECT a FROM t1 WHERE rowid < 16384 ORDER BY a DESC
289 } {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}
290 do_test boundary1-2.2.lt.3 {
292 SELECT a FROM t1 WHERE rowid < 16384 ORDER BY rowid
294 } {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}
295 do_test boundary1-2.2.lt.4 {
297 SELECT a FROM t1 WHERE rowid < 16384 ORDER BY rowid DESC
299 } {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}
300 do_test boundary1-2.2.lt.5 {
302 SELECT a FROM t1 WHERE rowid < 16384 ORDER BY x
304 } {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}
305 do_test boundary1-2.2.le.1 {
307 SELECT a FROM t1 WHERE rowid <= 16384 ORDER BY a
309 } {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}
310 do_test boundary1-2.2.le.2 {
312 SELECT a FROM t1 WHERE rowid <= 16384 ORDER BY a DESC
314 } {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}
315 do_test boundary1-2.2.le.3 {
317 SELECT a FROM t1 WHERE rowid <= 16384 ORDER BY rowid
319 } {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}
320 do_test boundary1-2.2.le.4 {
322 SELECT a FROM t1 WHERE rowid <= 16384 ORDER BY rowid DESC
324 } {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}
325 do_test boundary1-2.2.le.5 {
327 SELECT a FROM t1 WHERE rowid <= 16384 ORDER BY x
329 } {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}
330 do_test boundary1-2.3.1 {
332 SELECT * FROM t1 WHERE rowid=4294967296
334 } {36 0000000100000000}
335 do_test boundary1-2.3.2 {
337 SELECT rowid, a FROM t1 WHERE x='0000000100000000'
340 do_test boundary1-2.3.3 {
342 SELECT rowid, x FROM t1 WHERE a=36
344 } {4294967296 0000000100000000}
345 do_test boundary1-2.3.gt.1 {
347 SELECT a FROM t1 WHERE rowid > 4294967296 ORDER BY a
349 } {3 7 10 13 17 19 22 25 26 27 28 34 35 39 43 45 46 56 57}
350 do_test boundary1-2.3.gt.2 {
352 SELECT a FROM t1 WHERE rowid > 4294967296 ORDER BY a DESC
354 } {57 56 46 45 43 39 35 34 28 27 26 25 22 19 17 13 10 7 3}
355 do_test boundary1-2.3.gt.3 {
357 SELECT a FROM t1 WHERE rowid > 4294967296 ORDER BY rowid
359 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
360 do_test boundary1-2.3.gt.4 {
362 SELECT a FROM t1 WHERE rowid > 4294967296 ORDER BY rowid DESC
364 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39}
365 do_test boundary1-2.3.gt.5 {
367 SELECT a FROM t1 WHERE rowid > 4294967296 ORDER BY x
369 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
370 do_test boundary1-2.3.ge.1 {
372 SELECT a FROM t1 WHERE rowid >= 4294967296 ORDER BY a
374 } {3 7 10 13 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
375 do_test boundary1-2.3.ge.2 {
377 SELECT a FROM t1 WHERE rowid >= 4294967296 ORDER BY a DESC
379 } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 13 10 7 3}
380 do_test boundary1-2.3.ge.3 {
382 SELECT a FROM t1 WHERE rowid >= 4294967296 ORDER BY rowid
384 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
385 do_test boundary1-2.3.ge.4 {
387 SELECT a FROM t1 WHERE rowid >= 4294967296 ORDER BY rowid DESC
389 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36}
390 do_test boundary1-2.3.ge.5 {
392 SELECT a FROM t1 WHERE rowid >= 4294967296 ORDER BY x
394 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
395 do_test boundary1-2.3.lt.1 {
397 SELECT a FROM t1 WHERE rowid < 4294967296 ORDER BY a
399 } {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}
400 do_test boundary1-2.3.lt.2 {
402 SELECT a FROM t1 WHERE rowid < 4294967296 ORDER BY a DESC
404 } {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}
405 do_test boundary1-2.3.lt.3 {
407 SELECT a FROM t1 WHERE rowid < 4294967296 ORDER BY rowid
409 } {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}
410 do_test boundary1-2.3.lt.4 {
412 SELECT a FROM t1 WHERE rowid < 4294967296 ORDER BY rowid DESC
414 } {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}
415 do_test boundary1-2.3.lt.5 {
417 SELECT a FROM t1 WHERE rowid < 4294967296 ORDER BY x
419 } {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}
420 do_test boundary1-2.3.le.1 {
422 SELECT a FROM t1 WHERE rowid <= 4294967296 ORDER BY a
424 } {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}
425 do_test boundary1-2.3.le.2 {
427 SELECT a FROM t1 WHERE rowid <= 4294967296 ORDER BY a DESC
429 } {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}
430 do_test boundary1-2.3.le.3 {
432 SELECT a FROM t1 WHERE rowid <= 4294967296 ORDER BY rowid
434 } {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}
435 do_test boundary1-2.3.le.4 {
437 SELECT a FROM t1 WHERE rowid <= 4294967296 ORDER BY rowid DESC
439 } {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}
440 do_test boundary1-2.3.le.5 {
442 SELECT a FROM t1 WHERE rowid <= 4294967296 ORDER BY x
444 } {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}
445 do_test boundary1-2.4.1 {
447 SELECT * FROM t1 WHERE rowid=16777216
449 } {6 0000000001000000}
450 do_test boundary1-2.4.2 {
452 SELECT rowid, a FROM t1 WHERE x='0000000001000000'
455 do_test boundary1-2.4.3 {
457 SELECT rowid, x FROM t1 WHERE a=6
459 } {16777216 0000000001000000}
460 do_test boundary1-2.4.gt.1 {
462 SELECT a FROM t1 WHERE rowid > 16777216 ORDER BY a
464 } {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}
465 do_test boundary1-2.4.gt.2 {
467 SELECT a FROM t1 WHERE rowid > 16777216 ORDER BY a DESC
469 } {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}
470 do_test boundary1-2.4.gt.3 {
472 SELECT a FROM t1 WHERE rowid > 16777216 ORDER BY rowid
474 } {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}
475 do_test boundary1-2.4.gt.4 {
477 SELECT a FROM t1 WHERE rowid > 16777216 ORDER BY rowid DESC
479 } {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}
480 do_test boundary1-2.4.gt.5 {
482 SELECT a FROM t1 WHERE rowid > 16777216 ORDER BY x
484 } {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}
485 do_test boundary1-2.4.ge.1 {
487 SELECT a FROM t1 WHERE rowid >= 16777216 ORDER BY a
489 } {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}
490 do_test boundary1-2.4.ge.2 {
492 SELECT a FROM t1 WHERE rowid >= 16777216 ORDER BY a DESC
494 } {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}
495 do_test boundary1-2.4.ge.3 {
497 SELECT a FROM t1 WHERE rowid >= 16777216 ORDER BY rowid
499 } {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}
500 do_test boundary1-2.4.ge.4 {
502 SELECT a FROM t1 WHERE rowid >= 16777216 ORDER BY rowid DESC
504 } {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}
505 do_test boundary1-2.4.ge.5 {
507 SELECT a FROM t1 WHERE rowid >= 16777216 ORDER BY x
509 } {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}
510 do_test boundary1-2.4.lt.1 {
512 SELECT a FROM t1 WHERE rowid < 16777216 ORDER BY a
514 } {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}
515 do_test boundary1-2.4.lt.2 {
517 SELECT a FROM t1 WHERE rowid < 16777216 ORDER BY a DESC
519 } {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}
520 do_test boundary1-2.4.lt.3 {
522 SELECT a FROM t1 WHERE rowid < 16777216 ORDER BY rowid
524 } {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}
525 do_test boundary1-2.4.lt.4 {
527 SELECT a FROM t1 WHERE rowid < 16777216 ORDER BY rowid DESC
529 } {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}
530 do_test boundary1-2.4.lt.5 {
532 SELECT a FROM t1 WHERE rowid < 16777216 ORDER BY x
534 } {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}
535 do_test boundary1-2.4.le.1 {
537 SELECT a FROM t1 WHERE rowid <= 16777216 ORDER BY a
539 } {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}
540 do_test boundary1-2.4.le.2 {
542 SELECT a FROM t1 WHERE rowid <= 16777216 ORDER BY a DESC
544 } {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}
545 do_test boundary1-2.4.le.3 {
547 SELECT a FROM t1 WHERE rowid <= 16777216 ORDER BY rowid
549 } {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}
550 do_test boundary1-2.4.le.4 {
552 SELECT a FROM t1 WHERE rowid <= 16777216 ORDER BY rowid DESC
554 } {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}
555 do_test boundary1-2.4.le.5 {
557 SELECT a FROM t1 WHERE rowid <= 16777216 ORDER BY x
559 } {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}
560 do_test boundary1-2.5.1 {
562 SELECT * FROM t1 WHERE rowid=-32769
564 } {29 ffffffffffff7fff}
565 do_test boundary1-2.5.2 {
567 SELECT rowid, a FROM t1 WHERE x='ffffffffffff7fff'
570 do_test boundary1-2.5.3 {
572 SELECT rowid, x FROM t1 WHERE a=29
574 } {-32769 ffffffffffff7fff}
575 do_test boundary1-2.5.gt.1 {
577 SELECT a FROM t1 WHERE rowid > -32769 ORDER BY a
579 } {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}
580 do_test boundary1-2.5.gt.2 {
582 SELECT a FROM t1 WHERE rowid > -32769 ORDER BY a DESC
584 } {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}
585 do_test boundary1-2.5.gt.3 {
587 SELECT a FROM t1 WHERE rowid > -32769 ORDER BY rowid
589 } {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}
590 do_test boundary1-2.5.gt.4 {
592 SELECT a FROM t1 WHERE rowid > -32769 ORDER BY rowid DESC
594 } {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}
595 do_test boundary1-2.5.gt.5 {
597 SELECT a FROM t1 WHERE rowid > -32769 ORDER BY x
599 } {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}
600 do_test boundary1-2.5.ge.1 {
602 SELECT a FROM t1 WHERE rowid >= -32769 ORDER BY a
604 } {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}
605 do_test boundary1-2.5.ge.2 {
607 SELECT a FROM t1 WHERE rowid >= -32769 ORDER BY a DESC
609 } {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}
610 do_test boundary1-2.5.ge.3 {
612 SELECT a FROM t1 WHERE rowid >= -32769 ORDER BY rowid
614 } {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}
615 do_test boundary1-2.5.ge.4 {
617 SELECT a FROM t1 WHERE rowid >= -32769 ORDER BY rowid DESC
619 } {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}
620 do_test boundary1-2.5.ge.5 {
622 SELECT a FROM t1 WHERE rowid >= -32769 ORDER BY x
624 } {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}
625 do_test boundary1-2.5.lt.1 {
627 SELECT a FROM t1 WHERE rowid < -32769 ORDER BY a
629 } {1 2 11 21 37 44 47 55 58 63 64}
630 do_test boundary1-2.5.lt.2 {
632 SELECT a FROM t1 WHERE rowid < -32769 ORDER BY a DESC
634 } {64 63 58 55 47 44 37 21 11 2 1}
635 do_test boundary1-2.5.lt.3 {
637 SELECT a FROM t1 WHERE rowid < -32769 ORDER BY rowid
639 } {55 2 64 21 44 58 63 47 11 1 37}
640 do_test boundary1-2.5.lt.4 {
642 SELECT a FROM t1 WHERE rowid < -32769 ORDER BY rowid DESC
644 } {37 1 11 47 63 58 44 21 64 2 55}
645 do_test boundary1-2.5.lt.5 {
647 SELECT a FROM t1 WHERE rowid < -32769 ORDER BY x
649 } {55 2 64 21 44 58 63 47 11 1 37}
650 do_test boundary1-2.5.le.1 {
652 SELECT a FROM t1 WHERE rowid <= -32769 ORDER BY a
654 } {1 2 11 21 29 37 44 47 55 58 63 64}
655 do_test boundary1-2.5.le.2 {
657 SELECT a FROM t1 WHERE rowid <= -32769 ORDER BY a DESC
659 } {64 63 58 55 47 44 37 29 21 11 2 1}
660 do_test boundary1-2.5.le.3 {
662 SELECT a FROM t1 WHERE rowid <= -32769 ORDER BY rowid
664 } {55 2 64 21 44 58 63 47 11 1 37 29}
665 do_test boundary1-2.5.le.4 {
667 SELECT a FROM t1 WHERE rowid <= -32769 ORDER BY rowid DESC
669 } {29 37 1 11 47 63 58 44 21 64 2 55}
670 do_test boundary1-2.5.le.5 {
672 SELECT a FROM t1 WHERE rowid <= -32769 ORDER BY x
674 } {55 2 64 21 44 58 63 47 11 1 37 29}
675 do_test boundary1-2.6.1 {
677 SELECT * FROM t1 WHERE rowid=-140737488355329
679 } {21 ffff7fffffffffff}
680 do_test boundary1-2.6.2 {
682 SELECT rowid, a FROM t1 WHERE x='ffff7fffffffffff'
684 } {-140737488355329 21}
685 do_test boundary1-2.6.3 {
687 SELECT rowid, x FROM t1 WHERE a=21
689 } {-140737488355329 ffff7fffffffffff}
690 do_test boundary1-2.6.gt.1 {
692 SELECT a FROM t1 WHERE rowid > -140737488355329 ORDER BY a
694 } {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}
695 do_test boundary1-2.6.gt.2 {
697 SELECT a FROM t1 WHERE rowid > -140737488355329 ORDER BY a DESC
699 } {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}
700 do_test boundary1-2.6.gt.3 {
702 SELECT a FROM t1 WHERE rowid > -140737488355329 ORDER BY rowid
704 } {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}
705 do_test boundary1-2.6.gt.4 {
707 SELECT a FROM t1 WHERE rowid > -140737488355329 ORDER BY rowid DESC
709 } {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}
710 do_test boundary1-2.6.gt.5 {
712 SELECT a FROM t1 WHERE rowid > -140737488355329 ORDER BY x
714 } {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}
715 do_test boundary1-2.6.ge.1 {
717 SELECT a FROM t1 WHERE rowid >= -140737488355329 ORDER BY a
719 } {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}
720 do_test boundary1-2.6.ge.2 {
722 SELECT a FROM t1 WHERE rowid >= -140737488355329 ORDER BY a DESC
724 } {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}
725 do_test boundary1-2.6.ge.3 {
727 SELECT a FROM t1 WHERE rowid >= -140737488355329 ORDER BY rowid
729 } {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}
730 do_test boundary1-2.6.ge.4 {
732 SELECT a FROM t1 WHERE rowid >= -140737488355329 ORDER BY rowid DESC
734 } {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}
735 do_test boundary1-2.6.ge.5 {
737 SELECT a FROM t1 WHERE rowid >= -140737488355329 ORDER BY x
739 } {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}
740 do_test boundary1-2.6.lt.1 {
742 SELECT a FROM t1 WHERE rowid < -140737488355329 ORDER BY a
745 do_test boundary1-2.6.lt.2 {
747 SELECT a FROM t1 WHERE rowid < -140737488355329 ORDER BY a DESC
750 do_test boundary1-2.6.lt.3 {
752 SELECT a FROM t1 WHERE rowid < -140737488355329 ORDER BY rowid
755 do_test boundary1-2.6.lt.4 {
757 SELECT a FROM t1 WHERE rowid < -140737488355329 ORDER BY rowid DESC
760 do_test boundary1-2.6.lt.5 {
762 SELECT a FROM t1 WHERE rowid < -140737488355329 ORDER BY x
765 do_test boundary1-2.6.le.1 {
767 SELECT a FROM t1 WHERE rowid <= -140737488355329 ORDER BY a
770 do_test boundary1-2.6.le.2 {
772 SELECT a FROM t1 WHERE rowid <= -140737488355329 ORDER BY a DESC
775 do_test boundary1-2.6.le.3 {
777 SELECT a FROM t1 WHERE rowid <= -140737488355329 ORDER BY rowid
780 do_test boundary1-2.6.le.4 {
782 SELECT a FROM t1 WHERE rowid <= -140737488355329 ORDER BY rowid DESC
785 do_test boundary1-2.6.le.5 {
787 SELECT a FROM t1 WHERE rowid <= -140737488355329 ORDER BY x
790 do_test boundary1-2.7.1 {
792 SELECT * FROM t1 WHERE rowid=2
794 } {41 0000000000000002}
795 do_test boundary1-2.7.2 {
797 SELECT rowid, a FROM t1 WHERE x='0000000000000002'
800 do_test boundary1-2.7.3 {
802 SELECT rowid, x FROM t1 WHERE a=41
804 } {2 0000000000000002}
805 do_test boundary1-2.7.gt.1 {
807 SELECT a FROM t1 WHERE rowid > 2 ORDER BY a
809 } {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}
810 do_test boundary1-2.7.gt.2 {
812 SELECT a FROM t1 WHERE rowid > 2 ORDER BY a DESC
814 } {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}
815 do_test boundary1-2.7.gt.3 {
817 SELECT a FROM t1 WHERE rowid > 2 ORDER BY rowid
819 } {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}
820 do_test boundary1-2.7.gt.4 {
822 SELECT a FROM t1 WHERE rowid > 2 ORDER BY rowid DESC
824 } {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}
825 do_test boundary1-2.7.gt.5 {
827 SELECT a FROM t1 WHERE rowid > 2 ORDER BY x
829 } {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}
830 do_test boundary1-2.7.ge.1 {
832 SELECT a FROM t1 WHERE rowid >= 2 ORDER BY a
834 } {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}
835 do_test boundary1-2.7.ge.2 {
837 SELECT a FROM t1 WHERE rowid >= 2 ORDER BY a DESC
839 } {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}
840 do_test boundary1-2.7.ge.3 {
842 SELECT a FROM t1 WHERE rowid >= 2 ORDER BY rowid
844 } {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}
845 do_test boundary1-2.7.ge.4 {
847 SELECT a FROM t1 WHERE rowid >= 2 ORDER BY rowid DESC
849 } {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}
850 do_test boundary1-2.7.ge.5 {
852 SELECT a FROM t1 WHERE rowid >= 2 ORDER BY x
854 } {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}
855 do_test boundary1-2.7.lt.1 {
857 SELECT a FROM t1 WHERE rowid < 2 ORDER BY a
859 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 60 63 64}
860 do_test boundary1-2.7.lt.2 {
862 SELECT a FROM t1 WHERE rowid < 2 ORDER BY a DESC
864 } {64 63 60 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
865 do_test boundary1-2.7.lt.3 {
867 SELECT a FROM t1 WHERE rowid < 2 ORDER BY rowid
869 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60}
870 do_test boundary1-2.7.lt.4 {
872 SELECT a FROM t1 WHERE rowid < 2 ORDER BY rowid DESC
874 } {60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
875 do_test boundary1-2.7.lt.5 {
877 SELECT a FROM t1 WHERE rowid < 2 ORDER BY x
879 } {59 60 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
880 do_test boundary1-2.7.le.1 {
882 SELECT a FROM t1 WHERE rowid <= 2 ORDER BY a
884 } {1 2 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
885 do_test boundary1-2.7.le.2 {
887 SELECT a FROM t1 WHERE rowid <= 2 ORDER BY a DESC
889 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 2 1}
890 do_test boundary1-2.7.le.3 {
892 SELECT a FROM t1 WHERE rowid <= 2 ORDER BY rowid
894 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41}
895 do_test boundary1-2.7.le.4 {
897 SELECT a FROM t1 WHERE rowid <= 2 ORDER BY rowid DESC
899 } {41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
900 do_test boundary1-2.7.le.5 {
902 SELECT a FROM t1 WHERE rowid <= 2 ORDER BY x
904 } {59 60 41 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
905 do_test boundary1-2.8.1 {
907 SELECT * FROM t1 WHERE rowid=4
909 } {31 0000000000000004}
910 do_test boundary1-2.8.2 {
912 SELECT rowid, a FROM t1 WHERE x='0000000000000004'
915 do_test boundary1-2.8.3 {
917 SELECT rowid, x FROM t1 WHERE a=31
919 } {4 0000000000000004}
920 do_test boundary1-2.8.gt.1 {
922 SELECT a FROM t1 WHERE rowid > 4 ORDER BY a
924 } {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}
925 do_test boundary1-2.8.gt.2 {
927 SELECT a FROM t1 WHERE rowid > 4 ORDER BY a DESC
929 } {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}
930 do_test boundary1-2.8.gt.3 {
932 SELECT a FROM t1 WHERE rowid > 4 ORDER BY rowid
934 } {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}
935 do_test boundary1-2.8.gt.4 {
937 SELECT a FROM t1 WHERE rowid > 4 ORDER BY rowid DESC
939 } {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}
940 do_test boundary1-2.8.gt.5 {
942 SELECT a FROM t1 WHERE rowid > 4 ORDER BY x
944 } {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}
945 do_test boundary1-2.8.ge.1 {
947 SELECT a FROM t1 WHERE rowid >= 4 ORDER BY a
949 } {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}
950 do_test boundary1-2.8.ge.2 {
952 SELECT a FROM t1 WHERE rowid >= 4 ORDER BY a DESC
954 } {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}
955 do_test boundary1-2.8.ge.3 {
957 SELECT a FROM t1 WHERE rowid >= 4 ORDER BY rowid
959 } {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}
960 do_test boundary1-2.8.ge.4 {
962 SELECT a FROM t1 WHERE rowid >= 4 ORDER BY rowid DESC
964 } {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}
965 do_test boundary1-2.8.ge.5 {
967 SELECT a FROM t1 WHERE rowid >= 4 ORDER BY x
969 } {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}
970 do_test boundary1-2.8.lt.1 {
972 SELECT a FROM t1 WHERE rowid < 4 ORDER BY a
974 } {1 2 5 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
975 do_test boundary1-2.8.lt.2 {
977 SELECT a FROM t1 WHERE rowid < 4 ORDER BY a DESC
979 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 5 2 1}
980 do_test boundary1-2.8.lt.3 {
982 SELECT a FROM t1 WHERE rowid < 4 ORDER BY rowid
984 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5}
985 do_test boundary1-2.8.lt.4 {
987 SELECT a FROM t1 WHERE rowid < 4 ORDER BY rowid DESC
989 } {5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
990 do_test boundary1-2.8.lt.5 {
992 SELECT a FROM t1 WHERE rowid < 4 ORDER BY x
994 } {59 60 41 5 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
995 do_test boundary1-2.8.le.1 {
997 SELECT a FROM t1 WHERE rowid <= 4 ORDER BY a
999 } {1 2 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
1000 do_test boundary1-2.8.le.2 {
1002 SELECT a FROM t1 WHERE rowid <= 4 ORDER BY a DESC
1004 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 2 1}
1005 do_test boundary1-2.8.le.3 {
1007 SELECT a FROM t1 WHERE rowid <= 4 ORDER BY rowid
1009 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31}
1010 do_test boundary1-2.8.le.4 {
1012 SELECT a FROM t1 WHERE rowid <= 4 ORDER BY rowid DESC
1014 } {31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
1015 do_test boundary1-2.8.le.5 {
1017 SELECT a FROM t1 WHERE rowid <= 4 ORDER BY x
1019 } {59 60 41 5 31 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
1020 do_test boundary1-2.9.1 {
1022 SELECT * FROM t1 WHERE rowid=562949953421311
1024 } {13 0001ffffffffffff}
1025 do_test boundary1-2.9.2 {
1027 SELECT rowid, a FROM t1 WHERE x='0001ffffffffffff'
1029 } {562949953421311 13}
1030 do_test boundary1-2.9.3 {
1032 SELECT rowid, x FROM t1 WHERE a=13
1034 } {562949953421311 0001ffffffffffff}
1035 do_test boundary1-2.9.gt.1 {
1037 SELECT a FROM t1 WHERE rowid > 562949953421311 ORDER BY a
1039 } {3 17 27 28 43 45}
1040 do_test boundary1-2.9.gt.2 {
1042 SELECT a FROM t1 WHERE rowid > 562949953421311 ORDER BY a DESC
1044 } {45 43 28 27 17 3}
1045 do_test boundary1-2.9.gt.3 {
1047 SELECT a FROM t1 WHERE rowid > 562949953421311 ORDER BY rowid
1049 } {43 27 45 17 28 3}
1050 do_test boundary1-2.9.gt.4 {
1052 SELECT a FROM t1 WHERE rowid > 562949953421311 ORDER BY rowid DESC
1054 } {3 28 17 45 27 43}
1055 do_test boundary1-2.9.gt.5 {
1057 SELECT a FROM t1 WHERE rowid > 562949953421311 ORDER BY x
1059 } {43 27 45 17 28 3}
1060 do_test boundary1-2.9.ge.1 {
1062 SELECT a FROM t1 WHERE rowid >= 562949953421311 ORDER BY a
1064 } {3 13 17 27 28 43 45}
1065 do_test boundary1-2.9.ge.2 {
1067 SELECT a FROM t1 WHERE rowid >= 562949953421311 ORDER BY a DESC
1069 } {45 43 28 27 17 13 3}
1070 do_test boundary1-2.9.ge.3 {
1072 SELECT a FROM t1 WHERE rowid >= 562949953421311 ORDER BY rowid
1074 } {13 43 27 45 17 28 3}
1075 do_test boundary1-2.9.ge.4 {
1077 SELECT a FROM t1 WHERE rowid >= 562949953421311 ORDER BY rowid DESC
1079 } {3 28 17 45 27 43 13}
1080 do_test boundary1-2.9.ge.5 {
1082 SELECT a FROM t1 WHERE rowid >= 562949953421311 ORDER BY x
1084 } {13 43 27 45 17 28 3}
1085 do_test boundary1-2.9.lt.1 {
1087 SELECT a FROM t1 WHERE rowid < 562949953421311 ORDER BY a
1089 } {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}
1090 do_test boundary1-2.9.lt.2 {
1092 SELECT a FROM t1 WHERE rowid < 562949953421311 ORDER BY a DESC
1094 } {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}
1095 do_test boundary1-2.9.lt.3 {
1097 SELECT a FROM t1 WHERE rowid < 562949953421311 ORDER BY rowid
1099 } {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}
1100 do_test boundary1-2.9.lt.4 {
1102 SELECT a FROM t1 WHERE rowid < 562949953421311 ORDER BY rowid DESC
1104 } {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}
1105 do_test boundary1-2.9.lt.5 {
1107 SELECT a FROM t1 WHERE rowid < 562949953421311 ORDER BY x
1109 } {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}
1110 do_test boundary1-2.9.le.1 {
1112 SELECT a FROM t1 WHERE rowid <= 562949953421311 ORDER BY a
1114 } {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}
1115 do_test boundary1-2.9.le.2 {
1117 SELECT a FROM t1 WHERE rowid <= 562949953421311 ORDER BY a DESC
1119 } {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}
1120 do_test boundary1-2.9.le.3 {
1122 SELECT a FROM t1 WHERE rowid <= 562949953421311 ORDER BY rowid
1124 } {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}
1125 do_test boundary1-2.9.le.4 {
1127 SELECT a FROM t1 WHERE rowid <= 562949953421311 ORDER BY rowid DESC
1129 } {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}
1130 do_test boundary1-2.9.le.5 {
1132 SELECT a FROM t1 WHERE rowid <= 562949953421311 ORDER BY x
1134 } {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}
1135 do_test boundary1-2.10.1 {
1137 SELECT * FROM t1 WHERE rowid=256
1139 } {61 0000000000000100}
1140 do_test boundary1-2.10.2 {
1142 SELECT rowid, a FROM t1 WHERE x='0000000000000100'
1145 do_test boundary1-2.10.3 {
1147 SELECT rowid, x FROM t1 WHERE a=61
1149 } {256 0000000000000100}
1150 do_test boundary1-2.10.gt.1 {
1152 SELECT a FROM t1 WHERE rowid > 256 ORDER BY a
1154 } {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}
1155 do_test boundary1-2.10.gt.2 {
1157 SELECT a FROM t1 WHERE rowid > 256 ORDER BY a DESC
1159 } {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}
1160 do_test boundary1-2.10.gt.3 {
1162 SELECT a FROM t1 WHERE rowid > 256 ORDER BY rowid
1164 } {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}
1165 do_test boundary1-2.10.gt.4 {
1167 SELECT a FROM t1 WHERE rowid > 256 ORDER BY rowid DESC
1169 } {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}
1170 do_test boundary1-2.10.gt.5 {
1172 SELECT a FROM t1 WHERE rowid > 256 ORDER BY x
1174 } {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}
1175 do_test boundary1-2.10.ge.1 {
1177 SELECT a FROM t1 WHERE rowid >= 256 ORDER BY a
1179 } {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}
1180 do_test boundary1-2.10.ge.2 {
1182 SELECT a FROM t1 WHERE rowid >= 256 ORDER BY a DESC
1184 } {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}
1185 do_test boundary1-2.10.ge.3 {
1187 SELECT a FROM t1 WHERE rowid >= 256 ORDER BY rowid
1189 } {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}
1190 do_test boundary1-2.10.ge.4 {
1192 SELECT a FROM t1 WHERE rowid >= 256 ORDER BY rowid DESC
1194 } {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}
1195 do_test boundary1-2.10.ge.5 {
1197 SELECT a FROM t1 WHERE rowid >= 256 ORDER BY x
1199 } {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}
1200 do_test boundary1-2.10.lt.1 {
1202 SELECT a FROM t1 WHERE rowid < 256 ORDER BY a
1204 } {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}
1205 do_test boundary1-2.10.lt.2 {
1207 SELECT a FROM t1 WHERE rowid < 256 ORDER BY a DESC
1209 } {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}
1210 do_test boundary1-2.10.lt.3 {
1212 SELECT a FROM t1 WHERE rowid < 256 ORDER BY rowid
1214 } {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}
1215 do_test boundary1-2.10.lt.4 {
1217 SELECT a FROM t1 WHERE rowid < 256 ORDER BY rowid DESC
1219 } {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}
1220 do_test boundary1-2.10.lt.5 {
1222 SELECT a FROM t1 WHERE rowid < 256 ORDER BY x
1224 } {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}
1225 do_test boundary1-2.10.le.1 {
1227 SELECT a FROM t1 WHERE rowid <= 256 ORDER BY a
1229 } {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}
1230 do_test boundary1-2.10.le.2 {
1232 SELECT a FROM t1 WHERE rowid <= 256 ORDER BY a DESC
1234 } {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}
1235 do_test boundary1-2.10.le.3 {
1237 SELECT a FROM t1 WHERE rowid <= 256 ORDER BY rowid
1239 } {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}
1240 do_test boundary1-2.10.le.4 {
1242 SELECT a FROM t1 WHERE rowid <= 256 ORDER BY rowid DESC
1244 } {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}
1245 do_test boundary1-2.10.le.5 {
1247 SELECT a FROM t1 WHERE rowid <= 256 ORDER BY x
1249 } {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}
1250 do_test boundary1-2.11.1 {
1252 SELECT * FROM t1 WHERE rowid=34359738368
1254 } {22 0000000800000000}
1255 do_test boundary1-2.11.2 {
1257 SELECT rowid, a FROM t1 WHERE x='0000000800000000'
1260 do_test boundary1-2.11.3 {
1262 SELECT rowid, x FROM t1 WHERE a=22
1264 } {34359738368 0000000800000000}
1265 do_test boundary1-2.11.gt.1 {
1267 SELECT a FROM t1 WHERE rowid > 34359738368 ORDER BY a
1269 } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 46 56 57}
1270 do_test boundary1-2.11.gt.2 {
1272 SELECT a FROM t1 WHERE rowid > 34359738368 ORDER BY a DESC
1274 } {57 56 46 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
1275 do_test boundary1-2.11.gt.3 {
1277 SELECT a FROM t1 WHERE rowid > 34359738368 ORDER BY rowid
1279 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
1280 do_test boundary1-2.11.gt.4 {
1282 SELECT a FROM t1 WHERE rowid > 34359738368 ORDER BY rowid DESC
1284 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46}
1285 do_test boundary1-2.11.gt.5 {
1287 SELECT a FROM t1 WHERE rowid > 34359738368 ORDER BY x
1289 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
1290 do_test boundary1-2.11.ge.1 {
1292 SELECT a FROM t1 WHERE rowid >= 34359738368 ORDER BY a
1294 } {3 7 10 13 17 19 22 25 26 27 28 34 35 43 45 46 56 57}
1295 do_test boundary1-2.11.ge.2 {
1297 SELECT a FROM t1 WHERE rowid >= 34359738368 ORDER BY a DESC
1299 } {57 56 46 45 43 35 34 28 27 26 25 22 19 17 13 10 7 3}
1300 do_test boundary1-2.11.ge.3 {
1302 SELECT a FROM t1 WHERE rowid >= 34359738368 ORDER BY rowid
1304 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
1305 do_test boundary1-2.11.ge.4 {
1307 SELECT a FROM t1 WHERE rowid >= 34359738368 ORDER BY rowid DESC
1309 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22}
1310 do_test boundary1-2.11.ge.5 {
1312 SELECT a FROM t1 WHERE rowid >= 34359738368 ORDER BY x
1314 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
1315 do_test boundary1-2.11.lt.1 {
1317 SELECT a FROM t1 WHERE rowid < 34359738368 ORDER BY a
1319 } {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}
1320 do_test boundary1-2.11.lt.2 {
1322 SELECT a FROM t1 WHERE rowid < 34359738368 ORDER BY a DESC
1324 } {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}
1325 do_test boundary1-2.11.lt.3 {
1327 SELECT a FROM t1 WHERE rowid < 34359738368 ORDER BY rowid
1329 } {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}
1330 do_test boundary1-2.11.lt.4 {
1332 SELECT a FROM t1 WHERE rowid < 34359738368 ORDER BY rowid DESC
1334 } {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}
1335 do_test boundary1-2.11.lt.5 {
1337 SELECT a FROM t1 WHERE rowid < 34359738368 ORDER BY x
1339 } {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}
1340 do_test boundary1-2.11.le.1 {
1342 SELECT a FROM t1 WHERE rowid <= 34359738368 ORDER BY a
1344 } {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}
1345 do_test boundary1-2.11.le.2 {
1347 SELECT a FROM t1 WHERE rowid <= 34359738368 ORDER BY a DESC
1349 } {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}
1350 do_test boundary1-2.11.le.3 {
1352 SELECT a FROM t1 WHERE rowid <= 34359738368 ORDER BY rowid
1354 } {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}
1355 do_test boundary1-2.11.le.4 {
1357 SELECT a FROM t1 WHERE rowid <= 34359738368 ORDER BY rowid DESC
1359 } {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}
1360 do_test boundary1-2.11.le.5 {
1362 SELECT a FROM t1 WHERE rowid <= 34359738368 ORDER BY x
1364 } {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}
1365 do_test boundary1-2.12.1 {
1367 SELECT * FROM t1 WHERE rowid=65536
1369 } {62 0000000000010000}
1370 do_test boundary1-2.12.2 {
1372 SELECT rowid, a FROM t1 WHERE x='0000000000010000'
1375 do_test boundary1-2.12.3 {
1377 SELECT rowid, x FROM t1 WHERE a=62
1379 } {65536 0000000000010000}
1380 do_test boundary1-2.12.gt.1 {
1382 SELECT a FROM t1 WHERE rowid > 65536 ORDER BY a
1384 } {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}
1385 do_test boundary1-2.12.gt.2 {
1387 SELECT a FROM t1 WHERE rowid > 65536 ORDER BY a DESC
1389 } {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}
1390 do_test boundary1-2.12.gt.3 {
1392 SELECT a FROM t1 WHERE rowid > 65536 ORDER BY rowid
1394 } {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}
1395 do_test boundary1-2.12.gt.4 {
1397 SELECT a FROM t1 WHERE rowid > 65536 ORDER BY rowid DESC
1399 } {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}
1400 do_test boundary1-2.12.gt.5 {
1402 SELECT a FROM t1 WHERE rowid > 65536 ORDER BY x
1404 } {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}
1405 do_test boundary1-2.12.ge.1 {
1407 SELECT a FROM t1 WHERE rowid >= 65536 ORDER BY a
1409 } {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}
1410 do_test boundary1-2.12.ge.2 {
1412 SELECT a FROM t1 WHERE rowid >= 65536 ORDER BY a DESC
1414 } {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}
1415 do_test boundary1-2.12.ge.3 {
1417 SELECT a FROM t1 WHERE rowid >= 65536 ORDER BY rowid
1419 } {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}
1420 do_test boundary1-2.12.ge.4 {
1422 SELECT a FROM t1 WHERE rowid >= 65536 ORDER BY rowid DESC
1424 } {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}
1425 do_test boundary1-2.12.ge.5 {
1427 SELECT a FROM t1 WHERE rowid >= 65536 ORDER BY x
1429 } {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}
1430 do_test boundary1-2.12.lt.1 {
1432 SELECT a FROM t1 WHERE rowid < 65536 ORDER BY a
1434 } {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}
1435 do_test boundary1-2.12.lt.2 {
1437 SELECT a FROM t1 WHERE rowid < 65536 ORDER BY a DESC
1439 } {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}
1440 do_test boundary1-2.12.lt.3 {
1442 SELECT a FROM t1 WHERE rowid < 65536 ORDER BY rowid
1444 } {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}
1445 do_test boundary1-2.12.lt.4 {
1447 SELECT a FROM t1 WHERE rowid < 65536 ORDER BY rowid DESC
1449 } {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}
1450 do_test boundary1-2.12.lt.5 {
1452 SELECT a FROM t1 WHERE rowid < 65536 ORDER BY x
1454 } {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}
1455 do_test boundary1-2.12.le.1 {
1457 SELECT a FROM t1 WHERE rowid <= 65536 ORDER BY a
1459 } {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}
1460 do_test boundary1-2.12.le.2 {
1462 SELECT a FROM t1 WHERE rowid <= 65536 ORDER BY a DESC
1464 } {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}
1465 do_test boundary1-2.12.le.3 {
1467 SELECT a FROM t1 WHERE rowid <= 65536 ORDER BY rowid
1469 } {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}
1470 do_test boundary1-2.12.le.4 {
1472 SELECT a FROM t1 WHERE rowid <= 65536 ORDER BY rowid DESC
1474 } {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}
1475 do_test boundary1-2.12.le.5 {
1477 SELECT a FROM t1 WHERE rowid <= 65536 ORDER BY x
1479 } {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}
1480 do_test boundary1-2.13.1 {
1482 SELECT * FROM t1 WHERE rowid=268435456
1484 } {40 0000000010000000}
1485 do_test boundary1-2.13.2 {
1487 SELECT rowid, a FROM t1 WHERE x='0000000010000000'
1490 do_test boundary1-2.13.3 {
1492 SELECT rowid, x FROM t1 WHERE a=40
1494 } {268435456 0000000010000000}
1495 do_test boundary1-2.13.gt.1 {
1497 SELECT a FROM t1 WHERE rowid > 268435456 ORDER BY a
1499 } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
1500 do_test boundary1-2.13.gt.2 {
1502 SELECT a FROM t1 WHERE rowid > 268435456 ORDER BY a DESC
1504 } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
1505 do_test boundary1-2.13.gt.3 {
1507 SELECT a FROM t1 WHERE rowid > 268435456 ORDER BY rowid
1509 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
1510 do_test boundary1-2.13.gt.4 {
1512 SELECT a FROM t1 WHERE rowid > 268435456 ORDER BY rowid DESC
1514 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20}
1515 do_test boundary1-2.13.gt.5 {
1517 SELECT a FROM t1 WHERE rowid > 268435456 ORDER BY x
1519 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
1520 do_test boundary1-2.13.ge.1 {
1522 SELECT a FROM t1 WHERE rowid >= 268435456 ORDER BY a
1524 } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
1525 do_test boundary1-2.13.ge.2 {
1527 SELECT a FROM t1 WHERE rowid >= 268435456 ORDER BY a DESC
1529 } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
1530 do_test boundary1-2.13.ge.3 {
1532 SELECT a FROM t1 WHERE rowid >= 268435456 ORDER BY rowid
1534 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
1535 do_test boundary1-2.13.ge.4 {
1537 SELECT a FROM t1 WHERE rowid >= 268435456 ORDER BY rowid DESC
1539 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40}
1540 do_test boundary1-2.13.ge.5 {
1542 SELECT a FROM t1 WHERE rowid >= 268435456 ORDER BY x
1544 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
1545 do_test boundary1-2.13.lt.1 {
1547 SELECT a FROM t1 WHERE rowid < 268435456 ORDER BY a
1549 } {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}
1550 do_test boundary1-2.13.lt.2 {
1552 SELECT a FROM t1 WHERE rowid < 268435456 ORDER BY a DESC
1554 } {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}
1555 do_test boundary1-2.13.lt.3 {
1557 SELECT a FROM t1 WHERE rowid < 268435456 ORDER BY rowid
1559 } {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}
1560 do_test boundary1-2.13.lt.4 {
1562 SELECT a FROM t1 WHERE rowid < 268435456 ORDER BY rowid DESC
1564 } {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}
1565 do_test boundary1-2.13.lt.5 {
1567 SELECT a FROM t1 WHERE rowid < 268435456 ORDER BY x
1569 } {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}
1570 do_test boundary1-2.13.le.1 {
1572 SELECT a FROM t1 WHERE rowid <= 268435456 ORDER BY a
1574 } {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}
1575 do_test boundary1-2.13.le.2 {
1577 SELECT a FROM t1 WHERE rowid <= 268435456 ORDER BY a DESC
1579 } {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}
1580 do_test boundary1-2.13.le.3 {
1582 SELECT a FROM t1 WHERE rowid <= 268435456 ORDER BY rowid
1584 } {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}
1585 do_test boundary1-2.13.le.4 {
1587 SELECT a FROM t1 WHERE rowid <= 268435456 ORDER BY rowid DESC
1589 } {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}
1590 do_test boundary1-2.13.le.5 {
1592 SELECT a FROM t1 WHERE rowid <= 268435456 ORDER BY x
1594 } {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}
1595 do_test boundary1-2.14.1 {
1597 SELECT * FROM t1 WHERE rowid=-140737488355328
1599 } {44 ffff800000000000}
1600 do_test boundary1-2.14.2 {
1602 SELECT rowid, a FROM t1 WHERE x='ffff800000000000'
1604 } {-140737488355328 44}
1605 do_test boundary1-2.14.3 {
1607 SELECT rowid, x FROM t1 WHERE a=44
1609 } {-140737488355328 ffff800000000000}
1610 do_test boundary1-2.14.gt.1 {
1612 SELECT a FROM t1 WHERE rowid > -140737488355328 ORDER BY a
1614 } {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 45 46 47 48 49 50 51 52 53 54 56 57 58 59 60 61 62 63}
1615 do_test boundary1-2.14.gt.2 {
1617 SELECT a FROM t1 WHERE rowid > -140737488355328 ORDER BY a DESC
1619 } {63 62 61 60 59 58 57 56 54 53 52 51 50 49 48 47 46 45 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}
1620 do_test boundary1-2.14.gt.3 {
1622 SELECT a FROM t1 WHERE rowid > -140737488355328 ORDER BY rowid
1624 } {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}
1625 do_test boundary1-2.14.gt.4 {
1627 SELECT a FROM t1 WHERE rowid > -140737488355328 ORDER BY rowid DESC
1629 } {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}
1630 do_test boundary1-2.14.gt.5 {
1632 SELECT a FROM t1 WHERE rowid > -140737488355328 ORDER BY x
1634 } {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 58 63 47 11 1 37 29 32 54 53 52 33 38}
1635 do_test boundary1-2.14.ge.1 {
1637 SELECT a FROM t1 WHERE rowid >= -140737488355328 ORDER BY a
1639 } {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}
1640 do_test boundary1-2.14.ge.2 {
1642 SELECT a FROM t1 WHERE rowid >= -140737488355328 ORDER BY a DESC
1644 } {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}
1645 do_test boundary1-2.14.ge.3 {
1647 SELECT a FROM t1 WHERE rowid >= -140737488355328 ORDER BY rowid
1649 } {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}
1650 do_test boundary1-2.14.ge.4 {
1652 SELECT a FROM t1 WHERE rowid >= -140737488355328 ORDER BY rowid DESC
1654 } {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}
1655 do_test boundary1-2.14.ge.5 {
1657 SELECT a FROM t1 WHERE rowid >= -140737488355328 ORDER BY x
1659 } {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}
1660 do_test boundary1-2.14.lt.1 {
1662 SELECT a FROM t1 WHERE rowid < -140737488355328 ORDER BY a
1665 do_test boundary1-2.14.lt.2 {
1667 SELECT a FROM t1 WHERE rowid < -140737488355328 ORDER BY a DESC
1670 do_test boundary1-2.14.lt.3 {
1672 SELECT a FROM t1 WHERE rowid < -140737488355328 ORDER BY rowid
1675 do_test boundary1-2.14.lt.4 {
1677 SELECT a FROM t1 WHERE rowid < -140737488355328 ORDER BY rowid DESC
1680 do_test boundary1-2.14.lt.5 {
1682 SELECT a FROM t1 WHERE rowid < -140737488355328 ORDER BY x
1685 do_test boundary1-2.14.le.1 {
1687 SELECT a FROM t1 WHERE rowid <= -140737488355328 ORDER BY a
1690 do_test boundary1-2.14.le.2 {
1692 SELECT a FROM t1 WHERE rowid <= -140737488355328 ORDER BY a DESC
1695 do_test boundary1-2.14.le.3 {
1697 SELECT a FROM t1 WHERE rowid <= -140737488355328 ORDER BY rowid
1700 do_test boundary1-2.14.le.4 {
1702 SELECT a FROM t1 WHERE rowid <= -140737488355328 ORDER BY rowid DESC
1705 do_test boundary1-2.14.le.5 {
1707 SELECT a FROM t1 WHERE rowid <= -140737488355328 ORDER BY x
1710 do_test boundary1-2.15.1 {
1712 SELECT * FROM t1 WHERE rowid=1099511627776
1714 } {19 0000010000000000}
1715 do_test boundary1-2.15.2 {
1717 SELECT rowid, a FROM t1 WHERE x='0000010000000000'
1719 } {1099511627776 19}
1720 do_test boundary1-2.15.3 {
1722 SELECT rowid, x FROM t1 WHERE a=19
1724 } {1099511627776 0000010000000000}
1725 do_test boundary1-2.15.gt.1 {
1727 SELECT a FROM t1 WHERE rowid > 1099511627776 ORDER BY a
1729 } {3 7 10 13 17 25 26 27 28 34 43 45 56}
1730 do_test boundary1-2.15.gt.2 {
1732 SELECT a FROM t1 WHERE rowid > 1099511627776 ORDER BY a DESC
1734 } {56 45 43 34 28 27 26 25 17 13 10 7 3}
1735 do_test boundary1-2.15.gt.3 {
1737 SELECT a FROM t1 WHERE rowid > 1099511627776 ORDER BY rowid
1739 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
1740 do_test boundary1-2.15.gt.4 {
1742 SELECT a FROM t1 WHERE rowid > 1099511627776 ORDER BY rowid DESC
1744 } {3 28 17 45 27 43 13 26 10 34 25 56 7}
1745 do_test boundary1-2.15.gt.5 {
1747 SELECT a FROM t1 WHERE rowid > 1099511627776 ORDER BY x
1749 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
1750 do_test boundary1-2.15.ge.1 {
1752 SELECT a FROM t1 WHERE rowid >= 1099511627776 ORDER BY a
1754 } {3 7 10 13 17 19 25 26 27 28 34 43 45 56}
1755 do_test boundary1-2.15.ge.2 {
1757 SELECT a FROM t1 WHERE rowid >= 1099511627776 ORDER BY a DESC
1759 } {56 45 43 34 28 27 26 25 19 17 13 10 7 3}
1760 do_test boundary1-2.15.ge.3 {
1762 SELECT a FROM t1 WHERE rowid >= 1099511627776 ORDER BY rowid
1764 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
1765 do_test boundary1-2.15.ge.4 {
1767 SELECT a FROM t1 WHERE rowid >= 1099511627776 ORDER BY rowid DESC
1769 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19}
1770 do_test boundary1-2.15.ge.5 {
1772 SELECT a FROM t1 WHERE rowid >= 1099511627776 ORDER BY x
1774 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
1775 do_test boundary1-2.15.lt.1 {
1777 SELECT a FROM t1 WHERE rowid < 1099511627776 ORDER BY a
1779 } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64}
1780 do_test boundary1-2.15.lt.2 {
1782 SELECT a FROM t1 WHERE rowid < 1099511627776 ORDER BY a DESC
1784 } {64 63 62 61 60 59 58 57 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
1785 do_test boundary1-2.15.lt.3 {
1787 SELECT a FROM t1 WHERE rowid < 1099511627776 ORDER BY rowid
1789 } {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}
1790 do_test boundary1-2.15.lt.4 {
1792 SELECT a FROM t1 WHERE rowid < 1099511627776 ORDER BY rowid DESC
1794 } {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}
1795 do_test boundary1-2.15.lt.5 {
1797 SELECT a FROM t1 WHERE rowid < 1099511627776 ORDER BY x
1799 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
1800 do_test boundary1-2.15.le.1 {
1802 SELECT a FROM t1 WHERE rowid <= 1099511627776 ORDER BY a
1804 } {1 2 4 5 6 8 9 11 12 14 15 16 18 19 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64}
1805 do_test boundary1-2.15.le.2 {
1807 SELECT a FROM t1 WHERE rowid <= 1099511627776 ORDER BY a DESC
1809 } {64 63 62 61 60 59 58 57 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 19 18 16 15 14 12 11 9 8 6 5 4 2 1}
1810 do_test boundary1-2.15.le.3 {
1812 SELECT a FROM t1 WHERE rowid <= 1099511627776 ORDER BY rowid
1814 } {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}
1815 do_test boundary1-2.15.le.4 {
1817 SELECT a FROM t1 WHERE rowid <= 1099511627776 ORDER BY rowid DESC
1819 } {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}
1820 do_test boundary1-2.15.le.5 {
1822 SELECT a FROM t1 WHERE rowid <= 1099511627776 ORDER BY x
1824 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
1825 do_test boundary1-2.16.gt.1 {
1827 SELECT a FROM t1 WHERE rowid > 9223372036854775807 ORDER BY a
1830 do_test boundary1-2.16.gt.2 {
1832 SELECT a FROM t1 WHERE rowid > 9223372036854775807 ORDER BY a DESC
1835 do_test boundary1-2.16.gt.3 {
1837 SELECT a FROM t1 WHERE rowid > 9223372036854775807 ORDER BY rowid
1840 do_test boundary1-2.16.gt.4 {
1842 SELECT a FROM t1 WHERE rowid > 9223372036854775807 ORDER BY rowid DESC
1845 do_test boundary1-2.16.gt.5 {
1847 SELECT a FROM t1 WHERE rowid > 9223372036854775807 ORDER BY x
1850 do_test boundary1-2.16.ge.1 {
1852 SELECT a FROM t1 WHERE rowid >= 9223372036854775807 ORDER BY a
1855 do_test boundary1-2.16.ge.2 {
1857 SELECT a FROM t1 WHERE rowid >= 9223372036854775807 ORDER BY a DESC
1860 do_test boundary1-2.16.ge.3 {
1862 SELECT a FROM t1 WHERE rowid >= 9223372036854775807 ORDER BY rowid
1865 do_test boundary1-2.16.ge.4 {
1867 SELECT a FROM t1 WHERE rowid >= 9223372036854775807 ORDER BY rowid DESC
1870 do_test boundary1-2.16.ge.5 {
1872 SELECT a FROM t1 WHERE rowid >= 9223372036854775807 ORDER BY x
1875 do_test boundary1-2.16.lt.1 {
1877 SELECT a FROM t1 WHERE rowid < 9223372036854775807 ORDER BY a
1879 } {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 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 55 56 57 58 59 60 61 62 63 64}
1880 do_test boundary1-2.16.lt.2 {
1882 SELECT a FROM t1 WHERE rowid < 9223372036854775807 ORDER BY a DESC
1884 } {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 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 2 1}
1885 do_test boundary1-2.16.lt.3 {
1887 SELECT a FROM t1 WHERE rowid < 9223372036854775807 ORDER BY rowid
1889 } {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 28}
1890 do_test boundary1-2.16.lt.4 {
1892 SELECT a FROM t1 WHERE rowid < 9223372036854775807 ORDER BY rowid DESC
1894 } {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 64 2 55}
1895 do_test boundary1-2.16.lt.5 {
1897 SELECT a FROM t1 WHERE rowid < 9223372036854775807 ORDER BY x
1899 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
1900 do_test boundary1-2.16.le.1 {
1902 SELECT a FROM t1 WHERE rowid <= 9223372036854775807 ORDER BY a
1904 } {1 2 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 55 56 57 58 59 60 61 62 63 64}
1905 do_test boundary1-2.16.le.2 {
1907 SELECT a FROM t1 WHERE rowid <= 9223372036854775807 ORDER BY a DESC
1909 } {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 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 2 1}
1910 do_test boundary1-2.16.le.3 {
1912 SELECT a FROM t1 WHERE rowid <= 9223372036854775807 ORDER BY rowid
1914 } {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 28 3}
1915 do_test boundary1-2.16.le.4 {
1917 SELECT a FROM t1 WHERE rowid <= 9223372036854775807 ORDER BY rowid DESC
1919 } {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 64 2 55}
1920 do_test boundary1-2.16.le.5 {
1922 SELECT a FROM t1 WHERE rowid <= 9223372036854775807 ORDER BY x
1924 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
1925 do_test boundary1-2.17.1 {
1927 SELECT * FROM t1 WHERE rowid=32768
1929 } {50 0000000000008000}
1930 do_test boundary1-2.17.2 {
1932 SELECT rowid, a FROM t1 WHERE x='0000000000008000'
1935 do_test boundary1-2.17.3 {
1937 SELECT rowid, x FROM t1 WHERE a=50
1939 } {32768 0000000000008000}
1940 do_test boundary1-2.17.gt.1 {
1942 SELECT a FROM t1 WHERE rowid > 32768 ORDER BY a
1944 } {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 48 51 56 57 62}
1945 do_test boundary1-2.17.gt.2 {
1947 SELECT a FROM t1 WHERE rowid > 32768 ORDER BY a DESC
1949 } {62 57 56 51 48 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}
1950 do_test boundary1-2.17.gt.3 {
1952 SELECT a FROM t1 WHERE rowid > 32768 ORDER BY rowid
1954 } {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}
1955 do_test boundary1-2.17.gt.4 {
1957 SELECT a FROM t1 WHERE rowid > 32768 ORDER BY rowid DESC
1959 } {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}
1960 do_test boundary1-2.17.gt.5 {
1962 SELECT a FROM t1 WHERE rowid > 32768 ORDER BY x
1964 } {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}
1965 do_test boundary1-2.17.ge.1 {
1967 SELECT a FROM t1 WHERE rowid >= 32768 ORDER BY a
1969 } {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 48 50 51 56 57 62}
1970 do_test boundary1-2.17.ge.2 {
1972 SELECT a FROM t1 WHERE rowid >= 32768 ORDER BY a DESC
1974 } {62 57 56 51 50 48 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}
1975 do_test boundary1-2.17.ge.3 {
1977 SELECT a FROM t1 WHERE rowid >= 32768 ORDER BY rowid
1979 } {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}
1980 do_test boundary1-2.17.ge.4 {
1982 SELECT a FROM t1 WHERE rowid >= 32768 ORDER BY rowid DESC
1984 } {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}
1985 do_test boundary1-2.17.ge.5 {
1987 SELECT a FROM t1 WHERE rowid >= 32768 ORDER BY x
1989 } {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}
1990 do_test boundary1-2.17.lt.1 {
1992 SELECT a FROM t1 WHERE rowid < 32768 ORDER BY a
1994 } {1 2 4 5 8 11 16 21 23 29 30 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 61 63 64}
1995 do_test boundary1-2.17.lt.2 {
1997 SELECT a FROM t1 WHERE rowid < 32768 ORDER BY a DESC
1999 } {64 63 61 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 30 29 23 21 16 11 8 5 4 2 1}
2000 do_test boundary1-2.17.lt.3 {
2002 SELECT a FROM t1 WHERE rowid < 32768 ORDER BY rowid
2004 } {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}
2005 do_test boundary1-2.17.lt.4 {
2007 SELECT a FROM t1 WHERE rowid < 32768 ORDER BY rowid DESC
2009 } {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}
2010 do_test boundary1-2.17.lt.5 {
2012 SELECT a FROM t1 WHERE rowid < 32768 ORDER BY x
2014 } {59 60 41 5 31 4 49 30 61 8 16 23 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
2015 do_test boundary1-2.17.le.1 {
2017 SELECT a FROM t1 WHERE rowid <= 32768 ORDER BY a
2019 } {1 2 4 5 8 11 16 21 23 29 30 31 32 33 37 38 41 44 47 49 50 52 53 54 55 58 59 60 61 63 64}
2020 do_test boundary1-2.17.le.2 {
2022 SELECT a FROM t1 WHERE rowid <= 32768 ORDER BY a DESC
2024 } {64 63 61 60 59 58 55 54 53 52 50 49 47 44 41 38 37 33 32 31 30 29 23 21 16 11 8 5 4 2 1}
2025 do_test boundary1-2.17.le.3 {
2027 SELECT a FROM t1 WHERE rowid <= 32768 ORDER BY rowid
2029 } {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}
2030 do_test boundary1-2.17.le.4 {
2032 SELECT a FROM t1 WHERE rowid <= 32768 ORDER BY rowid DESC
2034 } {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}
2035 do_test boundary1-2.17.le.5 {
2037 SELECT a FROM t1 WHERE rowid <= 32768 ORDER BY x
2039 } {59 60 41 5 31 4 49 30 61 8 16 23 50 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
2040 do_test boundary1-2.18.1 {
2042 SELECT * FROM t1 WHERE rowid=-36028797018963968
2044 } {64 ff80000000000000}
2045 do_test boundary1-2.18.2 {
2047 SELECT rowid, a FROM t1 WHERE x='ff80000000000000'
2049 } {-36028797018963968 64}
2050 do_test boundary1-2.18.3 {
2052 SELECT rowid, x FROM t1 WHERE a=64
2054 } {-36028797018963968 ff80000000000000}
2055 do_test boundary1-2.18.gt.1 {
2057 SELECT a FROM t1 WHERE rowid > -36028797018963968 ORDER BY a
2059 } {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}
2060 do_test boundary1-2.18.gt.2 {
2062 SELECT a FROM t1 WHERE rowid > -36028797018963968 ORDER BY a DESC
2064 } {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}
2065 do_test boundary1-2.18.gt.3 {
2067 SELECT a FROM t1 WHERE rowid > -36028797018963968 ORDER BY rowid
2069 } {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}
2070 do_test boundary1-2.18.gt.4 {
2072 SELECT a FROM t1 WHERE rowid > -36028797018963968 ORDER BY rowid DESC
2074 } {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}
2075 do_test boundary1-2.18.gt.5 {
2077 SELECT a FROM t1 WHERE rowid > -36028797018963968 ORDER BY x
2079 } {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}
2080 do_test boundary1-2.18.ge.1 {
2082 SELECT a FROM t1 WHERE rowid >= -36028797018963968 ORDER BY a
2084 } {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 64}
2085 do_test boundary1-2.18.ge.2 {
2087 SELECT a FROM t1 WHERE rowid >= -36028797018963968 ORDER BY a DESC
2089 } {64 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}
2090 do_test boundary1-2.18.ge.3 {
2092 SELECT a FROM t1 WHERE rowid >= -36028797018963968 ORDER BY rowid
2094 } {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 28 3}
2095 do_test boundary1-2.18.ge.4 {
2097 SELECT a FROM t1 WHERE rowid >= -36028797018963968 ORDER BY rowid DESC
2099 } {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 64}
2100 do_test boundary1-2.18.ge.5 {
2102 SELECT a FROM t1 WHERE rowid >= -36028797018963968 ORDER BY x
2104 } {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 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
2105 do_test boundary1-2.18.lt.1 {
2107 SELECT a FROM t1 WHERE rowid < -36028797018963968 ORDER BY a
2110 do_test boundary1-2.18.lt.2 {
2112 SELECT a FROM t1 WHERE rowid < -36028797018963968 ORDER BY a DESC
2115 do_test boundary1-2.18.lt.3 {
2117 SELECT a FROM t1 WHERE rowid < -36028797018963968 ORDER BY rowid
2120 do_test boundary1-2.18.lt.4 {
2122 SELECT a FROM t1 WHERE rowid < -36028797018963968 ORDER BY rowid DESC
2125 do_test boundary1-2.18.lt.5 {
2127 SELECT a FROM t1 WHERE rowid < -36028797018963968 ORDER BY x
2130 do_test boundary1-2.18.le.1 {
2132 SELECT a FROM t1 WHERE rowid <= -36028797018963968 ORDER BY a
2135 do_test boundary1-2.18.le.2 {
2137 SELECT a FROM t1 WHERE rowid <= -36028797018963968 ORDER BY a DESC
2140 do_test boundary1-2.18.le.3 {
2142 SELECT a FROM t1 WHERE rowid <= -36028797018963968 ORDER BY rowid
2145 do_test boundary1-2.18.le.4 {
2147 SELECT a FROM t1 WHERE rowid <= -36028797018963968 ORDER BY rowid DESC
2150 do_test boundary1-2.18.le.5 {
2152 SELECT a FROM t1 WHERE rowid <= -36028797018963968 ORDER BY x
2155 do_test boundary1-2.19.1 {
2157 SELECT * FROM t1 WHERE rowid=65535
2159 } {48 000000000000ffff}
2160 do_test boundary1-2.19.2 {
2162 SELECT rowid, a FROM t1 WHERE x='000000000000ffff'
2165 do_test boundary1-2.19.3 {
2167 SELECT rowid, x FROM t1 WHERE a=48
2169 } {65535 000000000000ffff}
2170 do_test boundary1-2.19.gt.1 {
2172 SELECT a FROM t1 WHERE rowid > 65535 ORDER BY a
2174 } {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}
2175 do_test boundary1-2.19.gt.2 {
2177 SELECT a FROM t1 WHERE rowid > 65535 ORDER BY a DESC
2179 } {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}
2180 do_test boundary1-2.19.gt.3 {
2182 SELECT a FROM t1 WHERE rowid > 65535 ORDER BY rowid
2184 } {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}
2185 do_test boundary1-2.19.gt.4 {
2187 SELECT a FROM t1 WHERE rowid > 65535 ORDER BY rowid DESC
2189 } {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}
2190 do_test boundary1-2.19.gt.5 {
2192 SELECT a FROM t1 WHERE rowid > 65535 ORDER BY x
2194 } {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}
2195 do_test boundary1-2.19.ge.1 {
2197 SELECT a FROM t1 WHERE rowid >= 65535 ORDER BY a
2199 } {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 48 51 56 57 62}
2200 do_test boundary1-2.19.ge.2 {
2202 SELECT a FROM t1 WHERE rowid >= 65535 ORDER BY a DESC
2204 } {62 57 56 51 48 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}
2205 do_test boundary1-2.19.ge.3 {
2207 SELECT a FROM t1 WHERE rowid >= 65535 ORDER BY rowid
2209 } {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}
2210 do_test boundary1-2.19.ge.4 {
2212 SELECT a FROM t1 WHERE rowid >= 65535 ORDER BY rowid DESC
2214 } {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}
2215 do_test boundary1-2.19.ge.5 {
2217 SELECT a FROM t1 WHERE rowid >= 65535 ORDER BY x
2219 } {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}
2220 do_test boundary1-2.19.lt.1 {
2222 SELECT a FROM t1 WHERE rowid < 65535 ORDER BY a
2224 } {1 2 4 5 8 11 16 21 23 29 30 31 32 33 37 38 41 44 47 49 50 52 53 54 55 58 59 60 61 63 64}
2225 do_test boundary1-2.19.lt.2 {
2227 SELECT a FROM t1 WHERE rowid < 65535 ORDER BY a DESC
2229 } {64 63 61 60 59 58 55 54 53 52 50 49 47 44 41 38 37 33 32 31 30 29 23 21 16 11 8 5 4 2 1}
2230 do_test boundary1-2.19.lt.3 {
2232 SELECT a FROM t1 WHERE rowid < 65535 ORDER BY rowid
2234 } {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}
2235 do_test boundary1-2.19.lt.4 {
2237 SELECT a FROM t1 WHERE rowid < 65535 ORDER BY rowid DESC
2239 } {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}
2240 do_test boundary1-2.19.lt.5 {
2242 SELECT a FROM t1 WHERE rowid < 65535 ORDER BY x
2244 } {59 60 41 5 31 4 49 30 61 8 16 23 50 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
2245 do_test boundary1-2.19.le.1 {
2247 SELECT a FROM t1 WHERE rowid <= 65535 ORDER BY a
2249 } {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}
2250 do_test boundary1-2.19.le.2 {
2252 SELECT a FROM t1 WHERE rowid <= 65535 ORDER BY a DESC
2254 } {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}
2255 do_test boundary1-2.19.le.3 {
2257 SELECT a FROM t1 WHERE rowid <= 65535 ORDER BY rowid
2259 } {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}
2260 do_test boundary1-2.19.le.4 {
2262 SELECT a FROM t1 WHERE rowid <= 65535 ORDER BY rowid DESC
2264 } {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}
2265 do_test boundary1-2.19.le.5 {
2267 SELECT a FROM t1 WHERE rowid <= 65535 ORDER BY x
2269 } {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}
2270 do_test boundary1-2.20.1 {
2272 SELECT * FROM t1 WHERE rowid=4294967295
2274 } {14 00000000ffffffff}
2275 do_test boundary1-2.20.2 {
2277 SELECT rowid, a FROM t1 WHERE x='00000000ffffffff'
2280 do_test boundary1-2.20.3 {
2282 SELECT rowid, x FROM t1 WHERE a=14
2284 } {4294967295 00000000ffffffff}
2285 do_test boundary1-2.20.gt.1 {
2287 SELECT a FROM t1 WHERE rowid > 4294967295 ORDER BY a
2289 } {3 7 10 13 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
2290 do_test boundary1-2.20.gt.2 {
2292 SELECT a FROM t1 WHERE rowid > 4294967295 ORDER BY a DESC
2294 } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 13 10 7 3}
2295 do_test boundary1-2.20.gt.3 {
2297 SELECT a FROM t1 WHERE rowid > 4294967295 ORDER BY rowid
2299 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2300 do_test boundary1-2.20.gt.4 {
2302 SELECT a FROM t1 WHERE rowid > 4294967295 ORDER BY rowid DESC
2304 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36}
2305 do_test boundary1-2.20.gt.5 {
2307 SELECT a FROM t1 WHERE rowid > 4294967295 ORDER BY x
2309 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2310 do_test boundary1-2.20.ge.1 {
2312 SELECT a FROM t1 WHERE rowid >= 4294967295 ORDER BY a
2314 } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
2315 do_test boundary1-2.20.ge.2 {
2317 SELECT a FROM t1 WHERE rowid >= 4294967295 ORDER BY a DESC
2319 } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
2320 do_test boundary1-2.20.ge.3 {
2322 SELECT a FROM t1 WHERE rowid >= 4294967295 ORDER BY rowid
2324 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2325 do_test boundary1-2.20.ge.4 {
2327 SELECT a FROM t1 WHERE rowid >= 4294967295 ORDER BY rowid DESC
2329 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14}
2330 do_test boundary1-2.20.ge.5 {
2332 SELECT a FROM t1 WHERE rowid >= 4294967295 ORDER BY x
2334 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2335 do_test boundary1-2.20.lt.1 {
2337 SELECT a FROM t1 WHERE rowid < 4294967295 ORDER BY a
2339 } {1 2 4 5 6 8 9 11 12 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}
2340 do_test boundary1-2.20.lt.2 {
2342 SELECT a FROM t1 WHERE rowid < 4294967295 ORDER BY a DESC
2344 } {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 12 11 9 8 6 5 4 2 1}
2345 do_test boundary1-2.20.lt.3 {
2347 SELECT a FROM t1 WHERE rowid < 4294967295 ORDER BY rowid
2349 } {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}
2350 do_test boundary1-2.20.lt.4 {
2352 SELECT a FROM t1 WHERE rowid < 4294967295 ORDER BY rowid DESC
2354 } {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}
2355 do_test boundary1-2.20.lt.5 {
2357 SELECT a FROM t1 WHERE rowid < 4294967295 ORDER BY x
2359 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
2360 do_test boundary1-2.20.le.1 {
2362 SELECT a FROM t1 WHERE rowid <= 4294967295 ORDER BY a
2364 } {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}
2365 do_test boundary1-2.20.le.2 {
2367 SELECT a FROM t1 WHERE rowid <= 4294967295 ORDER BY a DESC
2369 } {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}
2370 do_test boundary1-2.20.le.3 {
2372 SELECT a FROM t1 WHERE rowid <= 4294967295 ORDER BY rowid
2374 } {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}
2375 do_test boundary1-2.20.le.4 {
2377 SELECT a FROM t1 WHERE rowid <= 4294967295 ORDER BY rowid DESC
2379 } {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}
2380 do_test boundary1-2.20.le.5 {
2382 SELECT a FROM t1 WHERE rowid <= 4294967295 ORDER BY x
2384 } {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}
2385 do_test boundary1-2.21.1 {
2387 SELECT * FROM t1 WHERE rowid=1099511627775
2389 } {57 000000ffffffffff}
2390 do_test boundary1-2.21.2 {
2392 SELECT rowid, a FROM t1 WHERE x='000000ffffffffff'
2394 } {1099511627775 57}
2395 do_test boundary1-2.21.3 {
2397 SELECT rowid, x FROM t1 WHERE a=57
2399 } {1099511627775 000000ffffffffff}
2400 do_test boundary1-2.21.gt.1 {
2402 SELECT a FROM t1 WHERE rowid > 1099511627775 ORDER BY a
2404 } {3 7 10 13 17 19 25 26 27 28 34 43 45 56}
2405 do_test boundary1-2.21.gt.2 {
2407 SELECT a FROM t1 WHERE rowid > 1099511627775 ORDER BY a DESC
2409 } {56 45 43 34 28 27 26 25 19 17 13 10 7 3}
2410 do_test boundary1-2.21.gt.3 {
2412 SELECT a FROM t1 WHERE rowid > 1099511627775 ORDER BY rowid
2414 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2415 do_test boundary1-2.21.gt.4 {
2417 SELECT a FROM t1 WHERE rowid > 1099511627775 ORDER BY rowid DESC
2419 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19}
2420 do_test boundary1-2.21.gt.5 {
2422 SELECT a FROM t1 WHERE rowid > 1099511627775 ORDER BY x
2424 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2425 do_test boundary1-2.21.ge.1 {
2427 SELECT a FROM t1 WHERE rowid >= 1099511627775 ORDER BY a
2429 } {3 7 10 13 17 19 25 26 27 28 34 43 45 56 57}
2430 do_test boundary1-2.21.ge.2 {
2432 SELECT a FROM t1 WHERE rowid >= 1099511627775 ORDER BY a DESC
2434 } {57 56 45 43 34 28 27 26 25 19 17 13 10 7 3}
2435 do_test boundary1-2.21.ge.3 {
2437 SELECT a FROM t1 WHERE rowid >= 1099511627775 ORDER BY rowid
2439 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2440 do_test boundary1-2.21.ge.4 {
2442 SELECT a FROM t1 WHERE rowid >= 1099511627775 ORDER BY rowid DESC
2444 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57}
2445 do_test boundary1-2.21.ge.5 {
2447 SELECT a FROM t1 WHERE rowid >= 1099511627775 ORDER BY x
2449 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2450 do_test boundary1-2.21.lt.1 {
2452 SELECT a FROM t1 WHERE rowid < 1099511627775 ORDER BY a
2454 } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
2455 do_test boundary1-2.21.lt.2 {
2457 SELECT a FROM t1 WHERE rowid < 1099511627775 ORDER BY a DESC
2459 } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
2460 do_test boundary1-2.21.lt.3 {
2462 SELECT a FROM t1 WHERE rowid < 1099511627775 ORDER BY rowid
2464 } {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}
2465 do_test boundary1-2.21.lt.4 {
2467 SELECT a FROM t1 WHERE rowid < 1099511627775 ORDER BY rowid DESC
2469 } {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}
2470 do_test boundary1-2.21.lt.5 {
2472 SELECT a FROM t1 WHERE rowid < 1099511627775 ORDER BY x
2474 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
2475 do_test boundary1-2.21.le.1 {
2477 SELECT a FROM t1 WHERE rowid <= 1099511627775 ORDER BY a
2479 } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64}
2480 do_test boundary1-2.21.le.2 {
2482 SELECT a FROM t1 WHERE rowid <= 1099511627775 ORDER BY a DESC
2484 } {64 63 62 61 60 59 58 57 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
2485 do_test boundary1-2.21.le.3 {
2487 SELECT a FROM t1 WHERE rowid <= 1099511627775 ORDER BY rowid
2489 } {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}
2490 do_test boundary1-2.21.le.4 {
2492 SELECT a FROM t1 WHERE rowid <= 1099511627775 ORDER BY rowid DESC
2494 } {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}
2495 do_test boundary1-2.21.le.5 {
2497 SELECT a FROM t1 WHERE rowid <= 1099511627775 ORDER BY x
2499 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
2500 do_test boundary1-2.22.1 {
2502 SELECT * FROM t1 WHERE rowid=-8388608
2504 } {37 ffffffffff800000}
2505 do_test boundary1-2.22.2 {
2507 SELECT rowid, a FROM t1 WHERE x='ffffffffff800000'
2510 do_test boundary1-2.22.3 {
2512 SELECT rowid, x FROM t1 WHERE a=37
2514 } {-8388608 ffffffffff800000}
2515 do_test boundary1-2.22.gt.1 {
2517 SELECT a FROM t1 WHERE rowid > -8388608 ORDER BY a
2519 } {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}
2520 do_test boundary1-2.22.gt.2 {
2522 SELECT a FROM t1 WHERE rowid > -8388608 ORDER BY a DESC
2524 } {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}
2525 do_test boundary1-2.22.gt.3 {
2527 SELECT a FROM t1 WHERE rowid > -8388608 ORDER BY rowid
2529 } {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}
2530 do_test boundary1-2.22.gt.4 {
2532 SELECT a FROM t1 WHERE rowid > -8388608 ORDER BY rowid DESC
2534 } {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}
2535 do_test boundary1-2.22.gt.5 {
2537 SELECT a FROM t1 WHERE rowid > -8388608 ORDER BY x
2539 } {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}
2540 do_test boundary1-2.22.ge.1 {
2542 SELECT a FROM t1 WHERE rowid >= -8388608 ORDER BY a
2544 } {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 37 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
2545 do_test boundary1-2.22.ge.2 {
2547 SELECT a FROM t1 WHERE rowid >= -8388608 ORDER BY a DESC
2549 } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 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 10 9 8 7 6 5 4 3}
2550 do_test boundary1-2.22.ge.3 {
2552 SELECT a FROM t1 WHERE rowid >= -8388608 ORDER BY rowid
2554 } {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}
2555 do_test boundary1-2.22.ge.4 {
2557 SELECT a FROM t1 WHERE rowid >= -8388608 ORDER BY rowid DESC
2559 } {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}
2560 do_test boundary1-2.22.ge.5 {
2562 SELECT a FROM t1 WHERE rowid >= -8388608 ORDER BY x
2564 } {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 37 29 32 54 53 52 33 38}
2565 do_test boundary1-2.22.lt.1 {
2567 SELECT a FROM t1 WHERE rowid < -8388608 ORDER BY a
2569 } {1 2 11 21 44 47 55 58 63 64}
2570 do_test boundary1-2.22.lt.2 {
2572 SELECT a FROM t1 WHERE rowid < -8388608 ORDER BY a DESC
2574 } {64 63 58 55 47 44 21 11 2 1}
2575 do_test boundary1-2.22.lt.3 {
2577 SELECT a FROM t1 WHERE rowid < -8388608 ORDER BY rowid
2579 } {55 2 64 21 44 58 63 47 11 1}
2580 do_test boundary1-2.22.lt.4 {
2582 SELECT a FROM t1 WHERE rowid < -8388608 ORDER BY rowid DESC
2584 } {1 11 47 63 58 44 21 64 2 55}
2585 do_test boundary1-2.22.lt.5 {
2587 SELECT a FROM t1 WHERE rowid < -8388608 ORDER BY x
2589 } {55 2 64 21 44 58 63 47 11 1}
2590 do_test boundary1-2.22.le.1 {
2592 SELECT a FROM t1 WHERE rowid <= -8388608 ORDER BY a
2594 } {1 2 11 21 37 44 47 55 58 63 64}
2595 do_test boundary1-2.22.le.2 {
2597 SELECT a FROM t1 WHERE rowid <= -8388608 ORDER BY a DESC
2599 } {64 63 58 55 47 44 37 21 11 2 1}
2600 do_test boundary1-2.22.le.3 {
2602 SELECT a FROM t1 WHERE rowid <= -8388608 ORDER BY rowid
2604 } {55 2 64 21 44 58 63 47 11 1 37}
2605 do_test boundary1-2.22.le.4 {
2607 SELECT a FROM t1 WHERE rowid <= -8388608 ORDER BY rowid DESC
2609 } {37 1 11 47 63 58 44 21 64 2 55}
2610 do_test boundary1-2.22.le.5 {
2612 SELECT a FROM t1 WHERE rowid <= -8388608 ORDER BY x
2614 } {55 2 64 21 44 58 63 47 11 1 37}
2615 do_test boundary1-2.23.1 {
2617 SELECT * FROM t1 WHERE rowid=549755813888
2619 } {35 0000008000000000}
2620 do_test boundary1-2.23.2 {
2622 SELECT rowid, a FROM t1 WHERE x='0000008000000000'
2625 do_test boundary1-2.23.3 {
2627 SELECT rowid, x FROM t1 WHERE a=35
2629 } {549755813888 0000008000000000}
2630 do_test boundary1-2.23.gt.1 {
2632 SELECT a FROM t1 WHERE rowid > 549755813888 ORDER BY a
2634 } {3 7 10 13 17 19 25 26 27 28 34 43 45 56 57}
2635 do_test boundary1-2.23.gt.2 {
2637 SELECT a FROM t1 WHERE rowid > 549755813888 ORDER BY a DESC
2639 } {57 56 45 43 34 28 27 26 25 19 17 13 10 7 3}
2640 do_test boundary1-2.23.gt.3 {
2642 SELECT a FROM t1 WHERE rowid > 549755813888 ORDER BY rowid
2644 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2645 do_test boundary1-2.23.gt.4 {
2647 SELECT a FROM t1 WHERE rowid > 549755813888 ORDER BY rowid DESC
2649 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57}
2650 do_test boundary1-2.23.gt.5 {
2652 SELECT a FROM t1 WHERE rowid > 549755813888 ORDER BY x
2654 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2655 do_test boundary1-2.23.ge.1 {
2657 SELECT a FROM t1 WHERE rowid >= 549755813888 ORDER BY a
2659 } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 56 57}
2660 do_test boundary1-2.23.ge.2 {
2662 SELECT a FROM t1 WHERE rowid >= 549755813888 ORDER BY a DESC
2664 } {57 56 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
2665 do_test boundary1-2.23.ge.3 {
2667 SELECT a FROM t1 WHERE rowid >= 549755813888 ORDER BY rowid
2669 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2670 do_test boundary1-2.23.ge.4 {
2672 SELECT a FROM t1 WHERE rowid >= 549755813888 ORDER BY rowid DESC
2674 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35}
2675 do_test boundary1-2.23.ge.5 {
2677 SELECT a FROM t1 WHERE rowid >= 549755813888 ORDER BY x
2679 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2680 do_test boundary1-2.23.lt.1 {
2682 SELECT a FROM t1 WHERE rowid < 549755813888 ORDER BY a
2684 } {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 46 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
2685 do_test boundary1-2.23.lt.2 {
2687 SELECT a FROM t1 WHERE rowid < 549755813888 ORDER BY a DESC
2689 } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 46 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}
2690 do_test boundary1-2.23.lt.3 {
2692 SELECT a FROM t1 WHERE rowid < 549755813888 ORDER BY rowid
2694 } {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}
2695 do_test boundary1-2.23.lt.4 {
2697 SELECT a FROM t1 WHERE rowid < 549755813888 ORDER BY rowid DESC
2699 } {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}
2700 do_test boundary1-2.23.lt.5 {
2702 SELECT a FROM t1 WHERE rowid < 549755813888 ORDER BY x
2704 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
2705 do_test boundary1-2.23.le.1 {
2707 SELECT a FROM t1 WHERE rowid <= 549755813888 ORDER BY a
2709 } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
2710 do_test boundary1-2.23.le.2 {
2712 SELECT a FROM t1 WHERE rowid <= 549755813888 ORDER BY a DESC
2714 } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
2715 do_test boundary1-2.23.le.3 {
2717 SELECT a FROM t1 WHERE rowid <= 549755813888 ORDER BY rowid
2719 } {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}
2720 do_test boundary1-2.23.le.4 {
2722 SELECT a FROM t1 WHERE rowid <= 549755813888 ORDER BY rowid DESC
2724 } {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}
2725 do_test boundary1-2.23.le.5 {
2727 SELECT a FROM t1 WHERE rowid <= 549755813888 ORDER BY x
2729 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
2730 do_test boundary1-2.24.1 {
2732 SELECT * FROM t1 WHERE rowid=8388607
2734 } {18 00000000007fffff}
2735 do_test boundary1-2.24.2 {
2737 SELECT rowid, a FROM t1 WHERE x='00000000007fffff'
2740 do_test boundary1-2.24.3 {
2742 SELECT rowid, x FROM t1 WHERE a=18
2744 } {8388607 00000000007fffff}
2745 do_test boundary1-2.24.gt.1 {
2747 SELECT a FROM t1 WHERE rowid > 8388607 ORDER BY a
2749 } {3 6 7 9 10 12 13 14 17 19 20 22 24 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
2750 do_test boundary1-2.24.gt.2 {
2752 SELECT a FROM t1 WHERE rowid > 8388607 ORDER BY a DESC
2754 } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 24 22 20 19 17 14 13 12 10 9 7 6 3}
2755 do_test boundary1-2.24.gt.3 {
2757 SELECT a FROM t1 WHERE rowid > 8388607 ORDER BY rowid
2759 } {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}
2760 do_test boundary1-2.24.gt.4 {
2762 SELECT a FROM t1 WHERE rowid > 8388607 ORDER BY rowid DESC
2764 } {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}
2765 do_test boundary1-2.24.gt.5 {
2767 SELECT a FROM t1 WHERE rowid > 8388607 ORDER BY x
2769 } {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}
2770 do_test boundary1-2.24.ge.1 {
2772 SELECT a FROM t1 WHERE rowid >= 8388607 ORDER BY a
2774 } {3 6 7 9 10 12 13 14 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
2775 do_test boundary1-2.24.ge.2 {
2777 SELECT a FROM t1 WHERE rowid >= 8388607 ORDER BY a DESC
2779 } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 14 13 12 10 9 7 6 3}
2780 do_test boundary1-2.24.ge.3 {
2782 SELECT a FROM t1 WHERE rowid >= 8388607 ORDER BY rowid
2784 } {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}
2785 do_test boundary1-2.24.ge.4 {
2787 SELECT a FROM t1 WHERE rowid >= 8388607 ORDER BY rowid DESC
2789 } {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}
2790 do_test boundary1-2.24.ge.5 {
2792 SELECT a FROM t1 WHERE rowid >= 8388607 ORDER BY x
2794 } {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}
2795 do_test boundary1-2.24.lt.1 {
2797 SELECT a FROM t1 WHERE rowid < 8388607 ORDER BY a
2799 } {1 2 4 5 8 11 15 16 21 23 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}
2800 do_test boundary1-2.24.lt.2 {
2802 SELECT a FROM t1 WHERE rowid < 8388607 ORDER BY a DESC
2804 } {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 23 21 16 15 11 8 5 4 2 1}
2805 do_test boundary1-2.24.lt.3 {
2807 SELECT a FROM t1 WHERE rowid < 8388607 ORDER BY rowid
2809 } {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}
2810 do_test boundary1-2.24.lt.4 {
2812 SELECT a FROM t1 WHERE rowid < 8388607 ORDER BY rowid DESC
2814 } {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}
2815 do_test boundary1-2.24.lt.5 {
2817 SELECT a FROM t1 WHERE rowid < 8388607 ORDER BY x
2819 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
2820 do_test boundary1-2.24.le.1 {
2822 SELECT a FROM t1 WHERE rowid <= 8388607 ORDER BY a
2824 } {1 2 4 5 8 11 15 16 18 21 23 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}
2825 do_test boundary1-2.24.le.2 {
2827 SELECT a FROM t1 WHERE rowid <= 8388607 ORDER BY a DESC
2829 } {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 23 21 18 16 15 11 8 5 4 2 1}
2830 do_test boundary1-2.24.le.3 {
2832 SELECT a FROM t1 WHERE rowid <= 8388607 ORDER BY rowid
2834 } {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}
2835 do_test boundary1-2.24.le.4 {
2837 SELECT a FROM t1 WHERE rowid <= 8388607 ORDER BY rowid DESC
2839 } {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}
2840 do_test boundary1-2.24.le.5 {
2842 SELECT a FROM t1 WHERE rowid <= 8388607 ORDER BY x
2844 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
2845 do_test boundary1-2.25.1 {
2847 SELECT * FROM t1 WHERE rowid=-3
2849 } {52 fffffffffffffffd}
2850 do_test boundary1-2.25.2 {
2852 SELECT rowid, a FROM t1 WHERE x='fffffffffffffffd'
2855 do_test boundary1-2.25.3 {
2857 SELECT rowid, x FROM t1 WHERE a=52
2859 } {-3 fffffffffffffffd}
2860 do_test boundary1-2.25.gt.1 {
2862 SELECT a FROM t1 WHERE rowid > -3 ORDER BY a
2864 } {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 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 56 57 59 60 61 62}
2865 do_test boundary1-2.25.gt.2 {
2867 SELECT a FROM t1 WHERE rowid > -3 ORDER BY a DESC
2869 } {62 61 60 59 57 56 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 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}
2870 do_test boundary1-2.25.gt.3 {
2872 SELECT a FROM t1 WHERE rowid > -3 ORDER BY rowid
2874 } {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}
2875 do_test boundary1-2.25.gt.4 {
2877 SELECT a FROM t1 WHERE rowid > -3 ORDER BY rowid DESC
2879 } {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}
2880 do_test boundary1-2.25.gt.5 {
2882 SELECT a FROM t1 WHERE rowid > -3 ORDER BY x
2884 } {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 33 38}
2885 do_test boundary1-2.25.ge.1 {
2887 SELECT a FROM t1 WHERE rowid >= -3 ORDER BY a
2889 } {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 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 52 56 57 59 60 61 62}
2890 do_test boundary1-2.25.ge.2 {
2892 SELECT a FROM t1 WHERE rowid >= -3 ORDER BY a DESC
2894 } {62 61 60 59 57 56 52 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 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}
2895 do_test boundary1-2.25.ge.3 {
2897 SELECT a FROM t1 WHERE rowid >= -3 ORDER BY rowid
2899 } {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}
2900 do_test boundary1-2.25.ge.4 {
2902 SELECT a FROM t1 WHERE rowid >= -3 ORDER BY rowid DESC
2904 } {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}
2905 do_test boundary1-2.25.ge.5 {
2907 SELECT a FROM t1 WHERE rowid >= -3 ORDER BY x
2909 } {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 52 33 38}
2910 do_test boundary1-2.25.lt.1 {
2912 SELECT a FROM t1 WHERE rowid < -3 ORDER BY a
2914 } {1 2 11 21 29 32 37 44 47 53 54 55 58 63 64}
2915 do_test boundary1-2.25.lt.2 {
2917 SELECT a FROM t1 WHERE rowid < -3 ORDER BY a DESC
2919 } {64 63 58 55 54 53 47 44 37 32 29 21 11 2 1}
2920 do_test boundary1-2.25.lt.3 {
2922 SELECT a FROM t1 WHERE rowid < -3 ORDER BY rowid
2924 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
2925 do_test boundary1-2.25.lt.4 {
2927 SELECT a FROM t1 WHERE rowid < -3 ORDER BY rowid DESC
2929 } {53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
2930 do_test boundary1-2.25.lt.5 {
2932 SELECT a FROM t1 WHERE rowid < -3 ORDER BY x
2934 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
2935 do_test boundary1-2.25.le.1 {
2937 SELECT a FROM t1 WHERE rowid <= -3 ORDER BY a
2939 } {1 2 11 21 29 32 37 44 47 52 53 54 55 58 63 64}
2940 do_test boundary1-2.25.le.2 {
2942 SELECT a FROM t1 WHERE rowid <= -3 ORDER BY a DESC
2944 } {64 63 58 55 54 53 52 47 44 37 32 29 21 11 2 1}
2945 do_test boundary1-2.25.le.3 {
2947 SELECT a FROM t1 WHERE rowid <= -3 ORDER BY rowid
2949 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
2950 do_test boundary1-2.25.le.4 {
2952 SELECT a FROM t1 WHERE rowid <= -3 ORDER BY rowid DESC
2954 } {52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
2955 do_test boundary1-2.25.le.5 {
2957 SELECT a FROM t1 WHERE rowid <= -3 ORDER BY x
2959 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
2960 do_test boundary1-2.26.1 {
2962 SELECT * FROM t1 WHERE rowid=0
2964 } {59 0000000000000000}
2965 do_test boundary1-2.26.2 {
2967 SELECT rowid, a FROM t1 WHERE x='0000000000000000'
2970 do_test boundary1-2.26.3 {
2972 SELECT rowid, x FROM t1 WHERE a=59
2974 } {0 0000000000000000}
2975 do_test boundary1-2.26.gt.1 {
2977 SELECT a FROM t1 WHERE rowid > 0 ORDER BY a
2979 } {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 60 61 62}
2980 do_test boundary1-2.26.gt.2 {
2982 SELECT a FROM t1 WHERE rowid > 0 ORDER BY a DESC
2984 } {62 61 60 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}
2985 do_test boundary1-2.26.gt.3 {
2987 SELECT a FROM t1 WHERE rowid > 0 ORDER BY rowid
2989 } {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}
2990 do_test boundary1-2.26.gt.4 {
2992 SELECT a FROM t1 WHERE rowid > 0 ORDER BY rowid DESC
2994 } {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}
2995 do_test boundary1-2.26.gt.5 {
2997 SELECT a FROM t1 WHERE rowid > 0 ORDER BY x
2999 } {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}
3000 do_test boundary1-2.26.ge.1 {
3002 SELECT a FROM t1 WHERE rowid >= 0 ORDER BY a
3004 } {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 59 60 61 62}
3005 do_test boundary1-2.26.ge.2 {
3007 SELECT a FROM t1 WHERE rowid >= 0 ORDER BY a DESC
3009 } {62 61 60 59 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}
3010 do_test boundary1-2.26.ge.3 {
3012 SELECT a FROM t1 WHERE rowid >= 0 ORDER BY rowid
3014 } {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}
3015 do_test boundary1-2.26.ge.4 {
3017 SELECT a FROM t1 WHERE rowid >= 0 ORDER BY rowid DESC
3019 } {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}
3020 do_test boundary1-2.26.ge.5 {
3022 SELECT a FROM t1 WHERE rowid >= 0 ORDER BY x
3024 } {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}
3025 do_test boundary1-2.26.lt.1 {
3027 SELECT a FROM t1 WHERE rowid < 0 ORDER BY a
3029 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 63 64}
3030 do_test boundary1-2.26.lt.2 {
3032 SELECT a FROM t1 WHERE rowid < 0 ORDER BY a DESC
3034 } {64 63 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
3035 do_test boundary1-2.26.lt.3 {
3037 SELECT a FROM t1 WHERE rowid < 0 ORDER BY rowid
3039 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
3040 do_test boundary1-2.26.lt.4 {
3042 SELECT a FROM t1 WHERE rowid < 0 ORDER BY rowid DESC
3044 } {38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
3045 do_test boundary1-2.26.lt.5 {
3047 SELECT a FROM t1 WHERE rowid < 0 ORDER BY x
3049 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
3050 do_test boundary1-2.26.le.1 {
3052 SELECT a FROM t1 WHERE rowid <= 0 ORDER BY a
3054 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 63 64}
3055 do_test boundary1-2.26.le.2 {
3057 SELECT a FROM t1 WHERE rowid <= 0 ORDER BY a DESC
3059 } {64 63 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
3060 do_test boundary1-2.26.le.3 {
3062 SELECT a FROM t1 WHERE rowid <= 0 ORDER BY rowid
3064 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59}
3065 do_test boundary1-2.26.le.4 {
3067 SELECT a FROM t1 WHERE rowid <= 0 ORDER BY rowid DESC
3069 } {59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
3070 do_test boundary1-2.26.le.5 {
3072 SELECT a FROM t1 WHERE rowid <= 0 ORDER BY x
3074 } {59 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
3075 do_test boundary1-2.27.1 {
3077 SELECT * FROM t1 WHERE rowid=-1
3079 } {38 ffffffffffffffff}
3080 do_test boundary1-2.27.2 {
3082 SELECT rowid, a FROM t1 WHERE x='ffffffffffffffff'
3085 do_test boundary1-2.27.3 {
3087 SELECT rowid, x FROM t1 WHERE a=38
3089 } {-1 ffffffffffffffff}
3090 do_test boundary1-2.27.gt.1 {
3092 SELECT a FROM t1 WHERE rowid > -1 ORDER BY a
3094 } {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 59 60 61 62}
3095 do_test boundary1-2.27.gt.2 {
3097 SELECT a FROM t1 WHERE rowid > -1 ORDER BY a DESC
3099 } {62 61 60 59 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}
3100 do_test boundary1-2.27.gt.3 {
3102 SELECT a FROM t1 WHERE rowid > -1 ORDER BY rowid
3104 } {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}
3105 do_test boundary1-2.27.gt.4 {
3107 SELECT a FROM t1 WHERE rowid > -1 ORDER BY rowid DESC
3109 } {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}
3110 do_test boundary1-2.27.gt.5 {
3112 SELECT a FROM t1 WHERE rowid > -1 ORDER BY x
3114 } {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}
3115 do_test boundary1-2.27.ge.1 {
3117 SELECT a FROM t1 WHERE rowid >= -1 ORDER BY a
3119 } {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 38 39 40 41 42 43 45 46 48 49 50 51 56 57 59 60 61 62}
3120 do_test boundary1-2.27.ge.2 {
3122 SELECT a FROM t1 WHERE rowid >= -1 ORDER BY a DESC
3124 } {62 61 60 59 57 56 51 50 49 48 46 45 43 42 41 40 39 38 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}
3125 do_test boundary1-2.27.ge.3 {
3127 SELECT a FROM t1 WHERE rowid >= -1 ORDER BY rowid
3129 } {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}
3130 do_test boundary1-2.27.ge.4 {
3132 SELECT a FROM t1 WHERE rowid >= -1 ORDER BY rowid DESC
3134 } {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}
3135 do_test boundary1-2.27.ge.5 {
3137 SELECT a FROM t1 WHERE rowid >= -1 ORDER BY x
3139 } {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 38}
3140 do_test boundary1-2.27.lt.1 {
3142 SELECT a FROM t1 WHERE rowid < -1 ORDER BY a
3144 } {1 2 11 21 29 32 33 37 44 47 52 53 54 55 58 63 64}
3145 do_test boundary1-2.27.lt.2 {
3147 SELECT a FROM t1 WHERE rowid < -1 ORDER BY a DESC
3149 } {64 63 58 55 54 53 52 47 44 37 33 32 29 21 11 2 1}
3150 do_test boundary1-2.27.lt.3 {
3152 SELECT a FROM t1 WHERE rowid < -1 ORDER BY rowid
3154 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
3155 do_test boundary1-2.27.lt.4 {
3157 SELECT a FROM t1 WHERE rowid < -1 ORDER BY rowid DESC
3159 } {33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
3160 do_test boundary1-2.27.lt.5 {
3162 SELECT a FROM t1 WHERE rowid < -1 ORDER BY x
3164 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
3165 do_test boundary1-2.27.le.1 {
3167 SELECT a FROM t1 WHERE rowid <= -1 ORDER BY a
3169 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 63 64}
3170 do_test boundary1-2.27.le.2 {
3172 SELECT a FROM t1 WHERE rowid <= -1 ORDER BY a DESC
3174 } {64 63 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
3175 do_test boundary1-2.27.le.3 {
3177 SELECT a FROM t1 WHERE rowid <= -1 ORDER BY rowid
3179 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
3180 do_test boundary1-2.27.le.4 {
3182 SELECT a FROM t1 WHERE rowid <= -1 ORDER BY rowid DESC
3184 } {38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
3185 do_test boundary1-2.27.le.5 {
3187 SELECT a FROM t1 WHERE rowid <= -1 ORDER BY x
3189 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
3190 do_test boundary1-2.28.1 {
3192 SELECT * FROM t1 WHERE rowid=-2
3194 } {33 fffffffffffffffe}
3195 do_test boundary1-2.28.2 {
3197 SELECT rowid, a FROM t1 WHERE x='fffffffffffffffe'
3200 do_test boundary1-2.28.3 {
3202 SELECT rowid, x FROM t1 WHERE a=33
3204 } {-2 fffffffffffffffe}
3205 do_test boundary1-2.28.gt.1 {
3207 SELECT a FROM t1 WHERE rowid > -2 ORDER BY a
3209 } {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 38 39 40 41 42 43 45 46 48 49 50 51 56 57 59 60 61 62}
3210 do_test boundary1-2.28.gt.2 {
3212 SELECT a FROM t1 WHERE rowid > -2 ORDER BY a DESC
3214 } {62 61 60 59 57 56 51 50 49 48 46 45 43 42 41 40 39 38 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}
3215 do_test boundary1-2.28.gt.3 {
3217 SELECT a FROM t1 WHERE rowid > -2 ORDER BY rowid
3219 } {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}
3220 do_test boundary1-2.28.gt.4 {
3222 SELECT a FROM t1 WHERE rowid > -2 ORDER BY rowid DESC
3224 } {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}
3225 do_test boundary1-2.28.gt.5 {
3227 SELECT a FROM t1 WHERE rowid > -2 ORDER BY x
3229 } {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 38}
3230 do_test boundary1-2.28.ge.1 {
3232 SELECT a FROM t1 WHERE rowid >= -2 ORDER BY a
3234 } {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 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 56 57 59 60 61 62}
3235 do_test boundary1-2.28.ge.2 {
3237 SELECT a FROM t1 WHERE rowid >= -2 ORDER BY a DESC
3239 } {62 61 60 59 57 56 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 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}
3240 do_test boundary1-2.28.ge.3 {
3242 SELECT a FROM t1 WHERE rowid >= -2 ORDER BY rowid
3244 } {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}
3245 do_test boundary1-2.28.ge.4 {
3247 SELECT a FROM t1 WHERE rowid >= -2 ORDER BY rowid DESC
3249 } {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}
3250 do_test boundary1-2.28.ge.5 {
3252 SELECT a FROM t1 WHERE rowid >= -2 ORDER BY x
3254 } {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 33 38}
3255 do_test boundary1-2.28.lt.1 {
3257 SELECT a FROM t1 WHERE rowid < -2 ORDER BY a
3259 } {1 2 11 21 29 32 37 44 47 52 53 54 55 58 63 64}
3260 do_test boundary1-2.28.lt.2 {
3262 SELECT a FROM t1 WHERE rowid < -2 ORDER BY a DESC
3264 } {64 63 58 55 54 53 52 47 44 37 32 29 21 11 2 1}
3265 do_test boundary1-2.28.lt.3 {
3267 SELECT a FROM t1 WHERE rowid < -2 ORDER BY rowid
3269 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
3270 do_test boundary1-2.28.lt.4 {
3272 SELECT a FROM t1 WHERE rowid < -2 ORDER BY rowid DESC
3274 } {52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
3275 do_test boundary1-2.28.lt.5 {
3277 SELECT a FROM t1 WHERE rowid < -2 ORDER BY x
3279 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
3280 do_test boundary1-2.28.le.1 {
3282 SELECT a FROM t1 WHERE rowid <= -2 ORDER BY a
3284 } {1 2 11 21 29 32 33 37 44 47 52 53 54 55 58 63 64}
3285 do_test boundary1-2.28.le.2 {
3287 SELECT a FROM t1 WHERE rowid <= -2 ORDER BY a DESC
3289 } {64 63 58 55 54 53 52 47 44 37 33 32 29 21 11 2 1}
3290 do_test boundary1-2.28.le.3 {
3292 SELECT a FROM t1 WHERE rowid <= -2 ORDER BY rowid
3294 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
3295 do_test boundary1-2.28.le.4 {
3297 SELECT a FROM t1 WHERE rowid <= -2 ORDER BY rowid DESC
3299 } {33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
3300 do_test boundary1-2.28.le.5 {
3302 SELECT a FROM t1 WHERE rowid <= -2 ORDER BY x
3304 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
3305 do_test boundary1-2.29.1 {
3307 SELECT * FROM t1 WHERE rowid=2097152
3309 } {42 0000000000200000}
3310 do_test boundary1-2.29.2 {
3312 SELECT rowid, a FROM t1 WHERE x='0000000000200000'
3315 do_test boundary1-2.29.3 {
3317 SELECT rowid, x FROM t1 WHERE a=42
3319 } {2097152 0000000000200000}
3320 do_test boundary1-2.29.gt.1 {
3322 SELECT a FROM t1 WHERE rowid > 2097152 ORDER BY a
3324 } {3 6 7 9 10 12 13 14 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
3325 do_test boundary1-2.29.gt.2 {
3327 SELECT a FROM t1 WHERE rowid > 2097152 ORDER BY a DESC
3329 } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 14 13 12 10 9 7 6 3}
3330 do_test boundary1-2.29.gt.3 {
3332 SELECT a FROM t1 WHERE rowid > 2097152 ORDER BY rowid
3334 } {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}
3335 do_test boundary1-2.29.gt.4 {
3337 SELECT a FROM t1 WHERE rowid > 2097152 ORDER BY rowid DESC
3339 } {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}
3340 do_test boundary1-2.29.gt.5 {
3342 SELECT a FROM t1 WHERE rowid > 2097152 ORDER BY x
3344 } {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}
3345 do_test boundary1-2.29.ge.1 {
3347 SELECT a FROM t1 WHERE rowid >= 2097152 ORDER BY a
3349 } {3 6 7 9 10 12 13 14 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 42 43 45 46 51 56 57}
3350 do_test boundary1-2.29.ge.2 {
3352 SELECT a FROM t1 WHERE rowid >= 2097152 ORDER BY a DESC
3354 } {57 56 51 46 45 43 42 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 14 13 12 10 9 7 6 3}
3355 do_test boundary1-2.29.ge.3 {
3357 SELECT a FROM t1 WHERE rowid >= 2097152 ORDER BY rowid
3359 } {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}
3360 do_test boundary1-2.29.ge.4 {
3362 SELECT a FROM t1 WHERE rowid >= 2097152 ORDER BY rowid DESC
3364 } {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}
3365 do_test boundary1-2.29.ge.5 {
3367 SELECT a FROM t1 WHERE rowid >= 2097152 ORDER BY x
3369 } {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}
3370 do_test boundary1-2.29.lt.1 {
3372 SELECT a FROM t1 WHERE rowid < 2097152 ORDER BY a
3374 } {1 2 4 5 8 11 15 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}
3375 do_test boundary1-2.29.lt.2 {
3377 SELECT a FROM t1 WHERE rowid < 2097152 ORDER BY a DESC
3379 } {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 15 11 8 5 4 2 1}
3380 do_test boundary1-2.29.lt.3 {
3382 SELECT a FROM t1 WHERE rowid < 2097152 ORDER BY rowid
3384 } {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}
3385 do_test boundary1-2.29.lt.4 {
3387 SELECT a FROM t1 WHERE rowid < 2097152 ORDER BY rowid DESC
3389 } {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}
3390 do_test boundary1-2.29.lt.5 {
3392 SELECT a FROM t1 WHERE rowid < 2097152 ORDER BY x
3394 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
3395 do_test boundary1-2.29.le.1 {
3397 SELECT a FROM t1 WHERE rowid <= 2097152 ORDER BY a
3399 } {1 2 4 5 8 11 15 16 21 23 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}
3400 do_test boundary1-2.29.le.2 {
3402 SELECT a FROM t1 WHERE rowid <= 2097152 ORDER BY a DESC
3404 } {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 23 21 16 15 11 8 5 4 2 1}
3405 do_test boundary1-2.29.le.3 {
3407 SELECT a FROM t1 WHERE rowid <= 2097152 ORDER BY rowid
3409 } {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}
3410 do_test boundary1-2.29.le.4 {
3412 SELECT a FROM t1 WHERE rowid <= 2097152 ORDER BY rowid DESC
3414 } {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}
3415 do_test boundary1-2.29.le.5 {
3417 SELECT a FROM t1 WHERE rowid <= 2097152 ORDER BY x
3419 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
3420 do_test boundary1-2.30.1 {
3422 SELECT * FROM t1 WHERE rowid=128
3424 } {49 0000000000000080}
3425 do_test boundary1-2.30.2 {
3427 SELECT rowid, a FROM t1 WHERE x='0000000000000080'
3430 do_test boundary1-2.30.3 {
3432 SELECT rowid, x FROM t1 WHERE a=49
3434 } {128 0000000000000080}
3435 do_test boundary1-2.30.gt.1 {
3437 SELECT a FROM t1 WHERE rowid > 128 ORDER BY a
3439 } {3 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 50 51 56 57 61 62}
3440 do_test boundary1-2.30.gt.2 {
3442 SELECT a FROM t1 WHERE rowid > 128 ORDER BY a DESC
3444 } {62 61 57 56 51 50 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 3}
3445 do_test boundary1-2.30.gt.3 {
3447 SELECT a FROM t1 WHERE rowid > 128 ORDER BY rowid
3449 } {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}
3450 do_test boundary1-2.30.gt.4 {
3452 SELECT a FROM t1 WHERE rowid > 128 ORDER BY rowid DESC
3454 } {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}
3455 do_test boundary1-2.30.gt.5 {
3457 SELECT a FROM t1 WHERE rowid > 128 ORDER BY x
3459 } {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}
3460 do_test boundary1-2.30.ge.1 {
3462 SELECT a FROM t1 WHERE rowid >= 128 ORDER BY a
3464 } {3 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}
3465 do_test boundary1-2.30.ge.2 {
3467 SELECT a FROM t1 WHERE rowid >= 128 ORDER BY a DESC
3469 } {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 3}
3470 do_test boundary1-2.30.ge.3 {
3472 SELECT a FROM t1 WHERE rowid >= 128 ORDER BY rowid
3474 } {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}
3475 do_test boundary1-2.30.ge.4 {
3477 SELECT a FROM t1 WHERE rowid >= 128 ORDER BY rowid DESC
3479 } {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}
3480 do_test boundary1-2.30.ge.5 {
3482 SELECT a FROM t1 WHERE rowid >= 128 ORDER BY x
3484 } {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}
3485 do_test boundary1-2.30.lt.1 {
3487 SELECT a FROM t1 WHERE rowid < 128 ORDER BY a
3489 } {1 2 4 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
3490 do_test boundary1-2.30.lt.2 {
3492 SELECT a FROM t1 WHERE rowid < 128 ORDER BY a DESC
3494 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 4 2 1}
3495 do_test boundary1-2.30.lt.3 {
3497 SELECT a FROM t1 WHERE rowid < 128 ORDER BY rowid
3499 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4}
3500 do_test boundary1-2.30.lt.4 {
3502 SELECT a FROM t1 WHERE rowid < 128 ORDER BY rowid DESC
3504 } {4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
3505 do_test boundary1-2.30.lt.5 {
3507 SELECT a FROM t1 WHERE rowid < 128 ORDER BY x
3509 } {59 60 41 5 31 4 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
3510 do_test boundary1-2.30.le.1 {
3512 SELECT a FROM t1 WHERE rowid <= 128 ORDER BY a
3514 } {1 2 4 5 11 21 29 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 63 64}
3515 do_test boundary1-2.30.le.2 {
3517 SELECT a FROM t1 WHERE rowid <= 128 ORDER BY a DESC
3519 } {64 63 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 29 21 11 5 4 2 1}
3520 do_test boundary1-2.30.le.3 {
3522 SELECT a FROM t1 WHERE rowid <= 128 ORDER BY rowid
3524 } {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}
3525 do_test boundary1-2.30.le.4 {
3527 SELECT a FROM t1 WHERE rowid <= 128 ORDER BY rowid DESC
3529 } {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}
3530 do_test boundary1-2.30.le.5 {
3532 SELECT a FROM t1 WHERE rowid <= 128 ORDER BY x
3534 } {59 60 41 5 31 4 49 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
3535 do_test boundary1-2.31.1 {
3537 SELECT * FROM t1 WHERE rowid=255
3539 } {30 00000000000000ff}
3540 do_test boundary1-2.31.2 {
3542 SELECT rowid, a FROM t1 WHERE x='00000000000000ff'
3545 do_test boundary1-2.31.3 {
3547 SELECT rowid, x FROM t1 WHERE a=30
3549 } {255 00000000000000ff}
3550 do_test boundary1-2.31.gt.1 {
3552 SELECT a FROM t1 WHERE rowid > 255 ORDER BY a
3554 } {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}
3555 do_test boundary1-2.31.gt.2 {
3557 SELECT a FROM t1 WHERE rowid > 255 ORDER BY a DESC
3559 } {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}
3560 do_test boundary1-2.31.gt.3 {
3562 SELECT a FROM t1 WHERE rowid > 255 ORDER BY rowid
3564 } {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}
3565 do_test boundary1-2.31.gt.4 {
3567 SELECT a FROM t1 WHERE rowid > 255 ORDER BY rowid DESC
3569 } {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}
3570 do_test boundary1-2.31.gt.5 {
3572 SELECT a FROM t1 WHERE rowid > 255 ORDER BY x
3574 } {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}
3575 do_test boundary1-2.31.ge.1 {
3577 SELECT a FROM t1 WHERE rowid >= 255 ORDER BY a
3579 } {3 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 50 51 56 57 61 62}
3580 do_test boundary1-2.31.ge.2 {
3582 SELECT a FROM t1 WHERE rowid >= 255 ORDER BY a DESC
3584 } {62 61 57 56 51 50 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 3}
3585 do_test boundary1-2.31.ge.3 {
3587 SELECT a FROM t1 WHERE rowid >= 255 ORDER BY rowid
3589 } {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}
3590 do_test boundary1-2.31.ge.4 {
3592 SELECT a FROM t1 WHERE rowid >= 255 ORDER BY rowid DESC
3594 } {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}
3595 do_test boundary1-2.31.ge.5 {
3597 SELECT a FROM t1 WHERE rowid >= 255 ORDER BY x
3599 } {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}
3600 do_test boundary1-2.31.lt.1 {
3602 SELECT a FROM t1 WHERE rowid < 255 ORDER BY a
3604 } {1 2 4 5 11 21 29 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 63 64}
3605 do_test boundary1-2.31.lt.2 {
3607 SELECT a FROM t1 WHERE rowid < 255 ORDER BY a DESC
3609 } {64 63 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 29 21 11 5 4 2 1}
3610 do_test boundary1-2.31.lt.3 {
3612 SELECT a FROM t1 WHERE rowid < 255 ORDER BY rowid
3614 } {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}
3615 do_test boundary1-2.31.lt.4 {
3617 SELECT a FROM t1 WHERE rowid < 255 ORDER BY rowid DESC
3619 } {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}
3620 do_test boundary1-2.31.lt.5 {
3622 SELECT a FROM t1 WHERE rowid < 255 ORDER BY x
3624 } {59 60 41 5 31 4 49 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
3625 do_test boundary1-2.31.le.1 {
3627 SELECT a FROM t1 WHERE rowid <= 255 ORDER BY a
3629 } {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}
3630 do_test boundary1-2.31.le.2 {
3632 SELECT a FROM t1 WHERE rowid <= 255 ORDER BY a DESC
3634 } {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}
3635 do_test boundary1-2.31.le.3 {
3637 SELECT a FROM t1 WHERE rowid <= 255 ORDER BY rowid
3639 } {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}
3640 do_test boundary1-2.31.le.4 {
3642 SELECT a FROM t1 WHERE rowid <= 255 ORDER BY rowid DESC
3644 } {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}
3645 do_test boundary1-2.31.le.5 {
3647 SELECT a FROM t1 WHERE rowid <= 255 ORDER BY x
3649 } {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}
3650 do_test boundary1-2.32.1 {
3652 SELECT * FROM t1 WHERE rowid=-2147483648
3654 } {11 ffffffff80000000}
3655 do_test boundary1-2.32.2 {
3657 SELECT rowid, a FROM t1 WHERE x='ffffffff80000000'
3660 do_test boundary1-2.32.3 {
3662 SELECT rowid, x FROM t1 WHERE a=11
3664 } {-2147483648 ffffffff80000000}
3665 do_test boundary1-2.32.gt.1 {
3667 SELECT a FROM t1 WHERE rowid > -2147483648 ORDER BY a
3669 } {1 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 37 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
3670 do_test boundary1-2.32.gt.2 {
3672 SELECT a FROM t1 WHERE rowid > -2147483648 ORDER BY a DESC
3674 } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 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 10 9 8 7 6 5 4 3 1}
3675 do_test boundary1-2.32.gt.3 {
3677 SELECT a FROM t1 WHERE rowid > -2147483648 ORDER BY rowid
3679 } {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}
3680 do_test boundary1-2.32.gt.4 {
3682 SELECT a FROM t1 WHERE rowid > -2147483648 ORDER BY rowid DESC
3684 } {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}
3685 do_test boundary1-2.32.gt.5 {
3687 SELECT a FROM t1 WHERE rowid > -2147483648 ORDER BY x
3689 } {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 1 37 29 32 54 53 52 33 38}
3690 do_test boundary1-2.32.ge.1 {
3692 SELECT a FROM t1 WHERE rowid >= -2147483648 ORDER BY a
3694 } {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 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
3695 do_test boundary1-2.32.ge.2 {
3697 SELECT a FROM t1 WHERE rowid >= -2147483648 ORDER BY a DESC
3699 } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 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}
3700 do_test boundary1-2.32.ge.3 {
3702 SELECT a FROM t1 WHERE rowid >= -2147483648 ORDER BY rowid
3704 } {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}
3705 do_test boundary1-2.32.ge.4 {
3707 SELECT a FROM t1 WHERE rowid >= -2147483648 ORDER BY rowid DESC
3709 } {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}
3710 do_test boundary1-2.32.ge.5 {
3712 SELECT a FROM t1 WHERE rowid >= -2147483648 ORDER BY x
3714 } {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 11 1 37 29 32 54 53 52 33 38}
3715 do_test boundary1-2.32.lt.1 {
3717 SELECT a FROM t1 WHERE rowid < -2147483648 ORDER BY a
3719 } {2 21 44 47 55 58 63 64}
3720 do_test boundary1-2.32.lt.2 {
3722 SELECT a FROM t1 WHERE rowid < -2147483648 ORDER BY a DESC
3724 } {64 63 58 55 47 44 21 2}
3725 do_test boundary1-2.32.lt.3 {
3727 SELECT a FROM t1 WHERE rowid < -2147483648 ORDER BY rowid
3729 } {55 2 64 21 44 58 63 47}
3730 do_test boundary1-2.32.lt.4 {
3732 SELECT a FROM t1 WHERE rowid < -2147483648 ORDER BY rowid DESC
3734 } {47 63 58 44 21 64 2 55}
3735 do_test boundary1-2.32.lt.5 {
3737 SELECT a FROM t1 WHERE rowid < -2147483648 ORDER BY x
3739 } {55 2 64 21 44 58 63 47}
3740 do_test boundary1-2.32.le.1 {
3742 SELECT a FROM t1 WHERE rowid <= -2147483648 ORDER BY a
3744 } {2 11 21 44 47 55 58 63 64}
3745 do_test boundary1-2.32.le.2 {
3747 SELECT a FROM t1 WHERE rowid <= -2147483648 ORDER BY a DESC
3749 } {64 63 58 55 47 44 21 11 2}
3750 do_test boundary1-2.32.le.3 {
3752 SELECT a FROM t1 WHERE rowid <= -2147483648 ORDER BY rowid
3754 } {55 2 64 21 44 58 63 47 11}
3755 do_test boundary1-2.32.le.4 {
3757 SELECT a FROM t1 WHERE rowid <= -2147483648 ORDER BY rowid DESC
3759 } {11 47 63 58 44 21 64 2 55}
3760 do_test boundary1-2.32.le.5 {
3762 SELECT a FROM t1 WHERE rowid <= -2147483648 ORDER BY x
3764 } {55 2 64 21 44 58 63 47 11}
3765 do_test boundary1-2.33.1 {
3767 SELECT * FROM t1 WHERE rowid=34359738367
3769 } {39 00000007ffffffff}
3770 do_test boundary1-2.33.2 {
3772 SELECT rowid, a FROM t1 WHERE x='00000007ffffffff'
3775 do_test boundary1-2.33.3 {
3777 SELECT rowid, x FROM t1 WHERE a=39
3779 } {34359738367 00000007ffffffff}
3780 do_test boundary1-2.33.gt.1 {
3782 SELECT a FROM t1 WHERE rowid > 34359738367 ORDER BY a
3784 } {3 7 10 13 17 19 22 25 26 27 28 34 35 43 45 46 56 57}
3785 do_test boundary1-2.33.gt.2 {
3787 SELECT a FROM t1 WHERE rowid > 34359738367 ORDER BY a DESC
3789 } {57 56 46 45 43 35 34 28 27 26 25 22 19 17 13 10 7 3}
3790 do_test boundary1-2.33.gt.3 {
3792 SELECT a FROM t1 WHERE rowid > 34359738367 ORDER BY rowid
3794 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
3795 do_test boundary1-2.33.gt.4 {
3797 SELECT a FROM t1 WHERE rowid > 34359738367 ORDER BY rowid DESC
3799 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22}
3800 do_test boundary1-2.33.gt.5 {
3802 SELECT a FROM t1 WHERE rowid > 34359738367 ORDER BY x
3804 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
3805 do_test boundary1-2.33.ge.1 {
3807 SELECT a FROM t1 WHERE rowid >= 34359738367 ORDER BY a
3809 } {3 7 10 13 17 19 22 25 26 27 28 34 35 39 43 45 46 56 57}
3810 do_test boundary1-2.33.ge.2 {
3812 SELECT a FROM t1 WHERE rowid >= 34359738367 ORDER BY a DESC
3814 } {57 56 46 45 43 39 35 34 28 27 26 25 22 19 17 13 10 7 3}
3815 do_test boundary1-2.33.ge.3 {
3817 SELECT a FROM t1 WHERE rowid >= 34359738367 ORDER BY rowid
3819 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
3820 do_test boundary1-2.33.ge.4 {
3822 SELECT a FROM t1 WHERE rowid >= 34359738367 ORDER BY rowid DESC
3824 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39}
3825 do_test boundary1-2.33.ge.5 {
3827 SELECT a FROM t1 WHERE rowid >= 34359738367 ORDER BY x
3829 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
3830 do_test boundary1-2.33.lt.1 {
3832 SELECT a FROM t1 WHERE rowid < 34359738367 ORDER BY a
3834 } {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}
3835 do_test boundary1-2.33.lt.2 {
3837 SELECT a FROM t1 WHERE rowid < 34359738367 ORDER BY a DESC
3839 } {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}
3840 do_test boundary1-2.33.lt.3 {
3842 SELECT a FROM t1 WHERE rowid < 34359738367 ORDER BY rowid
3844 } {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}
3845 do_test boundary1-2.33.lt.4 {
3847 SELECT a FROM t1 WHERE rowid < 34359738367 ORDER BY rowid DESC
3849 } {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}
3850 do_test boundary1-2.33.lt.5 {
3852 SELECT a FROM t1 WHERE rowid < 34359738367 ORDER BY x
3854 } {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}
3855 do_test boundary1-2.33.le.1 {
3857 SELECT a FROM t1 WHERE rowid <= 34359738367 ORDER BY a
3859 } {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}
3860 do_test boundary1-2.33.le.2 {
3862 SELECT a FROM t1 WHERE rowid <= 34359738367 ORDER BY a DESC
3864 } {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}
3865 do_test boundary1-2.33.le.3 {
3867 SELECT a FROM t1 WHERE rowid <= 34359738367 ORDER BY rowid
3869 } {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}
3870 do_test boundary1-2.33.le.4 {
3872 SELECT a FROM t1 WHERE rowid <= 34359738367 ORDER BY rowid DESC
3874 } {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}
3875 do_test boundary1-2.33.le.5 {
3877 SELECT a FROM t1 WHERE rowid <= 34359738367 ORDER BY x
3879 } {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}
3880 do_test boundary1-2.34.1 {
3882 SELECT * FROM t1 WHERE rowid=-549755813889
3884 } {58 ffffff7fffffffff}
3885 do_test boundary1-2.34.2 {
3887 SELECT rowid, a FROM t1 WHERE x='ffffff7fffffffff'
3889 } {-549755813889 58}
3890 do_test boundary1-2.34.3 {
3892 SELECT rowid, x FROM t1 WHERE a=58
3894 } {-549755813889 ffffff7fffffffff}
3895 do_test boundary1-2.34.gt.1 {
3897 SELECT a FROM t1 WHERE rowid > -549755813889 ORDER BY a
3899 } {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 45 46 47 48 49 50 51 52 53 54 56 57 59 60 61 62 63}
3900 do_test boundary1-2.34.gt.2 {
3902 SELECT a FROM t1 WHERE rowid > -549755813889 ORDER BY a DESC
3904 } {63 62 61 60 59 57 56 54 53 52 51 50 49 48 47 46 45 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}
3905 do_test boundary1-2.34.gt.3 {
3907 SELECT a FROM t1 WHERE rowid > -549755813889 ORDER BY rowid
3909 } {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}
3910 do_test boundary1-2.34.gt.4 {
3912 SELECT a FROM t1 WHERE rowid > -549755813889 ORDER BY rowid DESC
3914 } {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}
3915 do_test boundary1-2.34.gt.5 {
3917 SELECT a FROM t1 WHERE rowid > -549755813889 ORDER BY x
3919 } {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 63 47 11 1 37 29 32 54 53 52 33 38}
3920 do_test boundary1-2.34.ge.1 {
3922 SELECT a FROM t1 WHERE rowid >= -549755813889 ORDER BY a
3924 } {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 45 46 47 48 49 50 51 52 53 54 56 57 58 59 60 61 62 63}
3925 do_test boundary1-2.34.ge.2 {
3927 SELECT a FROM t1 WHERE rowid >= -549755813889 ORDER BY a DESC
3929 } {63 62 61 60 59 58 57 56 54 53 52 51 50 49 48 47 46 45 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}
3930 do_test boundary1-2.34.ge.3 {
3932 SELECT a FROM t1 WHERE rowid >= -549755813889 ORDER BY rowid
3934 } {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}
3935 do_test boundary1-2.34.ge.4 {
3937 SELECT a FROM t1 WHERE rowid >= -549755813889 ORDER BY rowid DESC
3939 } {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}
3940 do_test boundary1-2.34.ge.5 {
3942 SELECT a FROM t1 WHERE rowid >= -549755813889 ORDER BY x
3944 } {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 58 63 47 11 1 37 29 32 54 53 52 33 38}
3945 do_test boundary1-2.34.lt.1 {
3947 SELECT a FROM t1 WHERE rowid < -549755813889 ORDER BY a
3950 do_test boundary1-2.34.lt.2 {
3952 SELECT a FROM t1 WHERE rowid < -549755813889 ORDER BY a DESC
3955 do_test boundary1-2.34.lt.3 {
3957 SELECT a FROM t1 WHERE rowid < -549755813889 ORDER BY rowid
3960 do_test boundary1-2.34.lt.4 {
3962 SELECT a FROM t1 WHERE rowid < -549755813889 ORDER BY rowid DESC
3965 do_test boundary1-2.34.lt.5 {
3967 SELECT a FROM t1 WHERE rowid < -549755813889 ORDER BY x
3970 do_test boundary1-2.34.le.1 {
3972 SELECT a FROM t1 WHERE rowid <= -549755813889 ORDER BY a
3974 } {2 21 44 55 58 64}
3975 do_test boundary1-2.34.le.2 {
3977 SELECT a FROM t1 WHERE rowid <= -549755813889 ORDER BY a DESC
3979 } {64 58 55 44 21 2}
3980 do_test boundary1-2.34.le.3 {
3982 SELECT a FROM t1 WHERE rowid <= -549755813889 ORDER BY rowid
3984 } {55 2 64 21 44 58}
3985 do_test boundary1-2.34.le.4 {
3987 SELECT a FROM t1 WHERE rowid <= -549755813889 ORDER BY rowid DESC
3989 } {58 44 21 64 2 55}
3990 do_test boundary1-2.34.le.5 {
3992 SELECT a FROM t1 WHERE rowid <= -549755813889 ORDER BY x
3994 } {55 2 64 21 44 58}
3995 do_test boundary1-2.35.1 {
3997 SELECT * FROM t1 WHERE rowid=-32768
3999 } {32 ffffffffffff8000}
4000 do_test boundary1-2.35.2 {
4002 SELECT rowid, a FROM t1 WHERE x='ffffffffffff8000'
4005 do_test boundary1-2.35.3 {
4007 SELECT rowid, x FROM t1 WHERE a=32
4009 } {-32768 ffffffffffff8000}
4010 do_test boundary1-2.35.gt.1 {
4012 SELECT a FROM t1 WHERE rowid > -32768 ORDER BY a
4014 } {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 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}
4015 do_test boundary1-2.35.gt.2 {
4017 SELECT a FROM t1 WHERE rowid > -32768 ORDER BY a DESC
4019 } {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 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}
4020 do_test boundary1-2.35.gt.3 {
4022 SELECT a FROM t1 WHERE rowid > -32768 ORDER BY rowid
4024 } {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}
4025 do_test boundary1-2.35.gt.4 {
4027 SELECT a FROM t1 WHERE rowid > -32768 ORDER BY rowid DESC
4029 } {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}
4030 do_test boundary1-2.35.gt.5 {
4032 SELECT a FROM t1 WHERE rowid > -32768 ORDER BY x
4034 } {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 54 53 52 33 38}
4035 do_test boundary1-2.35.ge.1 {
4037 SELECT a FROM t1 WHERE rowid >= -32768 ORDER BY a
4039 } {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}
4040 do_test boundary1-2.35.ge.2 {
4042 SELECT a FROM t1 WHERE rowid >= -32768 ORDER BY a DESC
4044 } {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}
4045 do_test boundary1-2.35.ge.3 {
4047 SELECT a FROM t1 WHERE rowid >= -32768 ORDER BY rowid
4049 } {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}
4050 do_test boundary1-2.35.ge.4 {
4052 SELECT a FROM t1 WHERE rowid >= -32768 ORDER BY rowid DESC
4054 } {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}
4055 do_test boundary1-2.35.ge.5 {
4057 SELECT a FROM t1 WHERE rowid >= -32768 ORDER BY x
4059 } {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}
4060 do_test boundary1-2.35.lt.1 {
4062 SELECT a FROM t1 WHERE rowid < -32768 ORDER BY a
4064 } {1 2 11 21 29 37 44 47 55 58 63 64}
4065 do_test boundary1-2.35.lt.2 {
4067 SELECT a FROM t1 WHERE rowid < -32768 ORDER BY a DESC
4069 } {64 63 58 55 47 44 37 29 21 11 2 1}
4070 do_test boundary1-2.35.lt.3 {
4072 SELECT a FROM t1 WHERE rowid < -32768 ORDER BY rowid
4074 } {55 2 64 21 44 58 63 47 11 1 37 29}
4075 do_test boundary1-2.35.lt.4 {
4077 SELECT a FROM t1 WHERE rowid < -32768 ORDER BY rowid DESC
4079 } {29 37 1 11 47 63 58 44 21 64 2 55}
4080 do_test boundary1-2.35.lt.5 {
4082 SELECT a FROM t1 WHERE rowid < -32768 ORDER BY x
4084 } {55 2 64 21 44 58 63 47 11 1 37 29}
4085 do_test boundary1-2.35.le.1 {
4087 SELECT a FROM t1 WHERE rowid <= -32768 ORDER BY a
4089 } {1 2 11 21 29 32 37 44 47 55 58 63 64}
4090 do_test boundary1-2.35.le.2 {
4092 SELECT a FROM t1 WHERE rowid <= -32768 ORDER BY a DESC
4094 } {64 63 58 55 47 44 37 32 29 21 11 2 1}
4095 do_test boundary1-2.35.le.3 {
4097 SELECT a FROM t1 WHERE rowid <= -32768 ORDER BY rowid
4099 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
4100 do_test boundary1-2.35.le.4 {
4102 SELECT a FROM t1 WHERE rowid <= -32768 ORDER BY rowid DESC
4104 } {32 29 37 1 11 47 63 58 44 21 64 2 55}
4105 do_test boundary1-2.35.le.5 {
4107 SELECT a FROM t1 WHERE rowid <= -32768 ORDER BY x
4109 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
4110 do_test boundary1-2.36.1 {
4112 SELECT * FROM t1 WHERE rowid=2147483647
4114 } {20 000000007fffffff}
4115 do_test boundary1-2.36.2 {
4117 SELECT rowid, a FROM t1 WHERE x='000000007fffffff'
4120 do_test boundary1-2.36.3 {
4122 SELECT rowid, x FROM t1 WHERE a=20
4124 } {2147483647 000000007fffffff}
4125 do_test boundary1-2.36.gt.1 {
4127 SELECT a FROM t1 WHERE rowid > 2147483647 ORDER BY a
4129 } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
4130 do_test boundary1-2.36.gt.2 {
4132 SELECT a FROM t1 WHERE rowid > 2147483647 ORDER BY a DESC
4134 } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
4135 do_test boundary1-2.36.gt.3 {
4137 SELECT a FROM t1 WHERE rowid > 2147483647 ORDER BY rowid
4139 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4140 do_test boundary1-2.36.gt.4 {
4142 SELECT a FROM t1 WHERE rowid > 2147483647 ORDER BY rowid DESC
4144 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51}
4145 do_test boundary1-2.36.gt.5 {
4147 SELECT a FROM t1 WHERE rowid > 2147483647 ORDER BY x
4149 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4150 do_test boundary1-2.36.ge.1 {
4152 SELECT a FROM t1 WHERE rowid >= 2147483647 ORDER BY a
4154 } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
4155 do_test boundary1-2.36.ge.2 {
4157 SELECT a FROM t1 WHERE rowid >= 2147483647 ORDER BY a DESC
4159 } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
4160 do_test boundary1-2.36.ge.3 {
4162 SELECT a FROM t1 WHERE rowid >= 2147483647 ORDER BY rowid
4164 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4165 do_test boundary1-2.36.ge.4 {
4167 SELECT a FROM t1 WHERE rowid >= 2147483647 ORDER BY rowid DESC
4169 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20}
4170 do_test boundary1-2.36.ge.5 {
4172 SELECT a FROM t1 WHERE rowid >= 2147483647 ORDER BY x
4174 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4175 do_test boundary1-2.36.lt.1 {
4177 SELECT a FROM t1 WHERE rowid < 2147483647 ORDER BY a
4179 } {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}
4180 do_test boundary1-2.36.lt.2 {
4182 SELECT a FROM t1 WHERE rowid < 2147483647 ORDER BY a DESC
4184 } {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}
4185 do_test boundary1-2.36.lt.3 {
4187 SELECT a FROM t1 WHERE rowid < 2147483647 ORDER BY rowid
4189 } {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}
4190 do_test boundary1-2.36.lt.4 {
4192 SELECT a FROM t1 WHERE rowid < 2147483647 ORDER BY rowid DESC
4194 } {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}
4195 do_test boundary1-2.36.lt.5 {
4197 SELECT a FROM t1 WHERE rowid < 2147483647 ORDER BY x
4199 } {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}
4200 do_test boundary1-2.36.le.1 {
4202 SELECT a FROM t1 WHERE rowid <= 2147483647 ORDER BY a
4204 } {1 2 4 5 6 8 9 11 12 15 16 18 20 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}
4205 do_test boundary1-2.36.le.2 {
4207 SELECT a FROM t1 WHERE rowid <= 2147483647 ORDER BY a DESC
4209 } {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 20 18 16 15 12 11 9 8 6 5 4 2 1}
4210 do_test boundary1-2.36.le.3 {
4212 SELECT a FROM t1 WHERE rowid <= 2147483647 ORDER BY rowid
4214 } {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}
4215 do_test boundary1-2.36.le.4 {
4217 SELECT a FROM t1 WHERE rowid <= 2147483647 ORDER BY rowid DESC
4219 } {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}
4220 do_test boundary1-2.36.le.5 {
4222 SELECT a FROM t1 WHERE rowid <= 2147483647 ORDER BY x
4224 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
4225 do_test boundary1-2.37.1 {
4227 SELECT * FROM t1 WHERE rowid=-129
4229 } {54 ffffffffffffff7f}
4230 do_test boundary1-2.37.2 {
4232 SELECT rowid, a FROM t1 WHERE x='ffffffffffffff7f'
4235 do_test boundary1-2.37.3 {
4237 SELECT rowid, x FROM t1 WHERE a=54
4239 } {-129 ffffffffffffff7f}
4240 do_test boundary1-2.37.gt.1 {
4242 SELECT a FROM t1 WHERE rowid > -129 ORDER BY a
4244 } {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 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 52 53 56 57 59 60 61 62}
4245 do_test boundary1-2.37.gt.2 {
4247 SELECT a FROM t1 WHERE rowid > -129 ORDER BY a DESC
4249 } {62 61 60 59 57 56 53 52 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 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}
4250 do_test boundary1-2.37.gt.3 {
4252 SELECT a FROM t1 WHERE rowid > -129 ORDER BY rowid
4254 } {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}
4255 do_test boundary1-2.37.gt.4 {
4257 SELECT a FROM t1 WHERE rowid > -129 ORDER BY rowid DESC
4259 } {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}
4260 do_test boundary1-2.37.gt.5 {
4262 SELECT a FROM t1 WHERE rowid > -129 ORDER BY x
4264 } {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 53 52 33 38}
4265 do_test boundary1-2.37.ge.1 {
4267 SELECT a FROM t1 WHERE rowid >= -129 ORDER BY a
4269 } {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 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}
4270 do_test boundary1-2.37.ge.2 {
4272 SELECT a FROM t1 WHERE rowid >= -129 ORDER BY a DESC
4274 } {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 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}
4275 do_test boundary1-2.37.ge.3 {
4277 SELECT a FROM t1 WHERE rowid >= -129 ORDER BY rowid
4279 } {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}
4280 do_test boundary1-2.37.ge.4 {
4282 SELECT a FROM t1 WHERE rowid >= -129 ORDER BY rowid DESC
4284 } {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}
4285 do_test boundary1-2.37.ge.5 {
4287 SELECT a FROM t1 WHERE rowid >= -129 ORDER BY x
4289 } {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 54 53 52 33 38}
4290 do_test boundary1-2.37.lt.1 {
4292 SELECT a FROM t1 WHERE rowid < -129 ORDER BY a
4294 } {1 2 11 21 29 32 37 44 47 55 58 63 64}
4295 do_test boundary1-2.37.lt.2 {
4297 SELECT a FROM t1 WHERE rowid < -129 ORDER BY a DESC
4299 } {64 63 58 55 47 44 37 32 29 21 11 2 1}
4300 do_test boundary1-2.37.lt.3 {
4302 SELECT a FROM t1 WHERE rowid < -129 ORDER BY rowid
4304 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
4305 do_test boundary1-2.37.lt.4 {
4307 SELECT a FROM t1 WHERE rowid < -129 ORDER BY rowid DESC
4309 } {32 29 37 1 11 47 63 58 44 21 64 2 55}
4310 do_test boundary1-2.37.lt.5 {
4312 SELECT a FROM t1 WHERE rowid < -129 ORDER BY x
4314 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
4315 do_test boundary1-2.37.le.1 {
4317 SELECT a FROM t1 WHERE rowid <= -129 ORDER BY a
4319 } {1 2 11 21 29 32 37 44 47 54 55 58 63 64}
4320 do_test boundary1-2.37.le.2 {
4322 SELECT a FROM t1 WHERE rowid <= -129 ORDER BY a DESC
4324 } {64 63 58 55 54 47 44 37 32 29 21 11 2 1}
4325 do_test boundary1-2.37.le.3 {
4327 SELECT a FROM t1 WHERE rowid <= -129 ORDER BY rowid
4329 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
4330 do_test boundary1-2.37.le.4 {
4332 SELECT a FROM t1 WHERE rowid <= -129 ORDER BY rowid DESC
4334 } {54 32 29 37 1 11 47 63 58 44 21 64 2 55}
4335 do_test boundary1-2.37.le.5 {
4337 SELECT a FROM t1 WHERE rowid <= -129 ORDER BY x
4339 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
4340 do_test boundary1-2.38.1 {
4342 SELECT * FROM t1 WHERE rowid=-128
4344 } {53 ffffffffffffff80}
4345 do_test boundary1-2.38.2 {
4347 SELECT rowid, a FROM t1 WHERE x='ffffffffffffff80'
4350 do_test boundary1-2.38.3 {
4352 SELECT rowid, x FROM t1 WHERE a=53
4354 } {-128 ffffffffffffff80}
4355 do_test boundary1-2.38.gt.1 {
4357 SELECT a FROM t1 WHERE rowid > -128 ORDER BY a
4359 } {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 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 52 56 57 59 60 61 62}
4360 do_test boundary1-2.38.gt.2 {
4362 SELECT a FROM t1 WHERE rowid > -128 ORDER BY a DESC
4364 } {62 61 60 59 57 56 52 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 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}
4365 do_test boundary1-2.38.gt.3 {
4367 SELECT a FROM t1 WHERE rowid > -128 ORDER BY rowid
4369 } {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}
4370 do_test boundary1-2.38.gt.4 {
4372 SELECT a FROM t1 WHERE rowid > -128 ORDER BY rowid DESC
4374 } {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}
4375 do_test boundary1-2.38.gt.5 {
4377 SELECT a FROM t1 WHERE rowid > -128 ORDER BY x
4379 } {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 52 33 38}
4380 do_test boundary1-2.38.ge.1 {
4382 SELECT a FROM t1 WHERE rowid >= -128 ORDER BY a
4384 } {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 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 52 53 56 57 59 60 61 62}
4385 do_test boundary1-2.38.ge.2 {
4387 SELECT a FROM t1 WHERE rowid >= -128 ORDER BY a DESC
4389 } {62 61 60 59 57 56 53 52 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 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}
4390 do_test boundary1-2.38.ge.3 {
4392 SELECT a FROM t1 WHERE rowid >= -128 ORDER BY rowid
4394 } {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}
4395 do_test boundary1-2.38.ge.4 {
4397 SELECT a FROM t1 WHERE rowid >= -128 ORDER BY rowid DESC
4399 } {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}
4400 do_test boundary1-2.38.ge.5 {
4402 SELECT a FROM t1 WHERE rowid >= -128 ORDER BY x
4404 } {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 53 52 33 38}
4405 do_test boundary1-2.38.lt.1 {
4407 SELECT a FROM t1 WHERE rowid < -128 ORDER BY a
4409 } {1 2 11 21 29 32 37 44 47 54 55 58 63 64}
4410 do_test boundary1-2.38.lt.2 {
4412 SELECT a FROM t1 WHERE rowid < -128 ORDER BY a DESC
4414 } {64 63 58 55 54 47 44 37 32 29 21 11 2 1}
4415 do_test boundary1-2.38.lt.3 {
4417 SELECT a FROM t1 WHERE rowid < -128 ORDER BY rowid
4419 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
4420 do_test boundary1-2.38.lt.4 {
4422 SELECT a FROM t1 WHERE rowid < -128 ORDER BY rowid DESC
4424 } {54 32 29 37 1 11 47 63 58 44 21 64 2 55}
4425 do_test boundary1-2.38.lt.5 {
4427 SELECT a FROM t1 WHERE rowid < -128 ORDER BY x
4429 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
4430 do_test boundary1-2.38.le.1 {
4432 SELECT a FROM t1 WHERE rowid <= -128 ORDER BY a
4434 } {1 2 11 21 29 32 37 44 47 53 54 55 58 63 64}
4435 do_test boundary1-2.38.le.2 {
4437 SELECT a FROM t1 WHERE rowid <= -128 ORDER BY a DESC
4439 } {64 63 58 55 54 53 47 44 37 32 29 21 11 2 1}
4440 do_test boundary1-2.38.le.3 {
4442 SELECT a FROM t1 WHERE rowid <= -128 ORDER BY rowid
4444 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
4445 do_test boundary1-2.38.le.4 {
4447 SELECT a FROM t1 WHERE rowid <= -128 ORDER BY rowid DESC
4449 } {53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
4450 do_test boundary1-2.38.le.5 {
4452 SELECT a FROM t1 WHERE rowid <= -128 ORDER BY x
4454 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
4455 do_test boundary1-2.39.1 {
4457 SELECT * FROM t1 WHERE rowid=72057594037927936
4459 } {28 0100000000000000}
4460 do_test boundary1-2.39.2 {
4462 SELECT rowid, a FROM t1 WHERE x='0100000000000000'
4464 } {72057594037927936 28}
4465 do_test boundary1-2.39.3 {
4467 SELECT rowid, x FROM t1 WHERE a=28
4469 } {72057594037927936 0100000000000000}
4470 do_test boundary1-2.39.gt.1 {
4472 SELECT a FROM t1 WHERE rowid > 72057594037927936 ORDER BY a
4475 do_test boundary1-2.39.gt.2 {
4477 SELECT a FROM t1 WHERE rowid > 72057594037927936 ORDER BY a DESC
4480 do_test boundary1-2.39.gt.3 {
4482 SELECT a FROM t1 WHERE rowid > 72057594037927936 ORDER BY rowid
4485 do_test boundary1-2.39.gt.4 {
4487 SELECT a FROM t1 WHERE rowid > 72057594037927936 ORDER BY rowid DESC
4490 do_test boundary1-2.39.gt.5 {
4492 SELECT a FROM t1 WHERE rowid > 72057594037927936 ORDER BY x
4495 do_test boundary1-2.39.ge.1 {
4497 SELECT a FROM t1 WHERE rowid >= 72057594037927936 ORDER BY a
4500 do_test boundary1-2.39.ge.2 {
4502 SELECT a FROM t1 WHERE rowid >= 72057594037927936 ORDER BY a DESC
4505 do_test boundary1-2.39.ge.3 {
4507 SELECT a FROM t1 WHERE rowid >= 72057594037927936 ORDER BY rowid
4510 do_test boundary1-2.39.ge.4 {
4512 SELECT a FROM t1 WHERE rowid >= 72057594037927936 ORDER BY rowid DESC
4515 do_test boundary1-2.39.ge.5 {
4517 SELECT a FROM t1 WHERE rowid >= 72057594037927936 ORDER BY x
4520 do_test boundary1-2.39.lt.1 {
4522 SELECT a FROM t1 WHERE rowid < 72057594037927936 ORDER BY a
4524 } {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}
4525 do_test boundary1-2.39.lt.2 {
4527 SELECT a FROM t1 WHERE rowid < 72057594037927936 ORDER BY a DESC
4529 } {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}
4530 do_test boundary1-2.39.lt.3 {
4532 SELECT a FROM t1 WHERE rowid < 72057594037927936 ORDER BY rowid
4534 } {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}
4535 do_test boundary1-2.39.lt.4 {
4537 SELECT a FROM t1 WHERE rowid < 72057594037927936 ORDER BY rowid DESC
4539 } {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}
4540 do_test boundary1-2.39.lt.5 {
4542 SELECT a FROM t1 WHERE rowid < 72057594037927936 ORDER BY x
4544 } {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}
4545 do_test boundary1-2.39.le.1 {
4547 SELECT a FROM t1 WHERE rowid <= 72057594037927936 ORDER BY a
4549 } {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 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 55 56 57 58 59 60 61 62 63 64}
4550 do_test boundary1-2.39.le.2 {
4552 SELECT a FROM t1 WHERE rowid <= 72057594037927936 ORDER BY a DESC
4554 } {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 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 2 1}
4555 do_test boundary1-2.39.le.3 {
4557 SELECT a FROM t1 WHERE rowid <= 72057594037927936 ORDER BY rowid
4559 } {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 28}
4560 do_test boundary1-2.39.le.4 {
4562 SELECT a FROM t1 WHERE rowid <= 72057594037927936 ORDER BY rowid DESC
4564 } {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 64 2 55}
4565 do_test boundary1-2.39.le.5 {
4567 SELECT a FROM t1 WHERE rowid <= 72057594037927936 ORDER BY x
4569 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
4570 do_test boundary1-2.40.1 {
4572 SELECT * FROM t1 WHERE rowid=2147483648
4574 } {51 0000000080000000}
4575 do_test boundary1-2.40.2 {
4577 SELECT rowid, a FROM t1 WHERE x='0000000080000000'
4580 do_test boundary1-2.40.3 {
4582 SELECT rowid, x FROM t1 WHERE a=51
4584 } {2147483648 0000000080000000}
4585 do_test boundary1-2.40.gt.1 {
4587 SELECT a FROM t1 WHERE rowid > 2147483648 ORDER BY a
4589 } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
4590 do_test boundary1-2.40.gt.2 {
4592 SELECT a FROM t1 WHERE rowid > 2147483648 ORDER BY a DESC
4594 } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
4595 do_test boundary1-2.40.gt.3 {
4597 SELECT a FROM t1 WHERE rowid > 2147483648 ORDER BY rowid
4599 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4600 do_test boundary1-2.40.gt.4 {
4602 SELECT a FROM t1 WHERE rowid > 2147483648 ORDER BY rowid DESC
4604 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14}
4605 do_test boundary1-2.40.gt.5 {
4607 SELECT a FROM t1 WHERE rowid > 2147483648 ORDER BY x
4609 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4610 do_test boundary1-2.40.ge.1 {
4612 SELECT a FROM t1 WHERE rowid >= 2147483648 ORDER BY a
4614 } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
4615 do_test boundary1-2.40.ge.2 {
4617 SELECT a FROM t1 WHERE rowid >= 2147483648 ORDER BY a DESC
4619 } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
4620 do_test boundary1-2.40.ge.3 {
4622 SELECT a FROM t1 WHERE rowid >= 2147483648 ORDER BY rowid
4624 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4625 do_test boundary1-2.40.ge.4 {
4627 SELECT a FROM t1 WHERE rowid >= 2147483648 ORDER BY rowid DESC
4629 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51}
4630 do_test boundary1-2.40.ge.5 {
4632 SELECT a FROM t1 WHERE rowid >= 2147483648 ORDER BY x
4634 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4635 do_test boundary1-2.40.lt.1 {
4637 SELECT a FROM t1 WHERE rowid < 2147483648 ORDER BY a
4639 } {1 2 4 5 6 8 9 11 12 15 16 18 20 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}
4640 do_test boundary1-2.40.lt.2 {
4642 SELECT a FROM t1 WHERE rowid < 2147483648 ORDER BY a DESC
4644 } {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 20 18 16 15 12 11 9 8 6 5 4 2 1}
4645 do_test boundary1-2.40.lt.3 {
4647 SELECT a FROM t1 WHERE rowid < 2147483648 ORDER BY rowid
4649 } {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}
4650 do_test boundary1-2.40.lt.4 {
4652 SELECT a FROM t1 WHERE rowid < 2147483648 ORDER BY rowid DESC
4654 } {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}
4655 do_test boundary1-2.40.lt.5 {
4657 SELECT a FROM t1 WHERE rowid < 2147483648 ORDER BY x
4659 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
4660 do_test boundary1-2.40.le.1 {
4662 SELECT a FROM t1 WHERE rowid <= 2147483648 ORDER BY a
4664 } {1 2 4 5 6 8 9 11 12 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}
4665 do_test boundary1-2.40.le.2 {
4667 SELECT a FROM t1 WHERE rowid <= 2147483648 ORDER BY a DESC
4669 } {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 12 11 9 8 6 5 4 2 1}
4670 do_test boundary1-2.40.le.3 {
4672 SELECT a FROM t1 WHERE rowid <= 2147483648 ORDER BY rowid
4674 } {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}
4675 do_test boundary1-2.40.le.4 {
4677 SELECT a FROM t1 WHERE rowid <= 2147483648 ORDER BY rowid DESC
4679 } {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}
4680 do_test boundary1-2.40.le.5 {
4682 SELECT a FROM t1 WHERE rowid <= 2147483648 ORDER BY x
4684 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
4685 do_test boundary1-2.41.1 {
4687 SELECT * FROM t1 WHERE rowid=549755813887
4689 } {46 0000007fffffffff}
4690 do_test boundary1-2.41.2 {
4692 SELECT rowid, a FROM t1 WHERE x='0000007fffffffff'
4695 do_test boundary1-2.41.3 {
4697 SELECT rowid, x FROM t1 WHERE a=46
4699 } {549755813887 0000007fffffffff}
4700 do_test boundary1-2.41.gt.1 {
4702 SELECT a FROM t1 WHERE rowid > 549755813887 ORDER BY a
4704 } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 56 57}
4705 do_test boundary1-2.41.gt.2 {
4707 SELECT a FROM t1 WHERE rowid > 549755813887 ORDER BY a DESC
4709 } {57 56 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
4710 do_test boundary1-2.41.gt.3 {
4712 SELECT a FROM t1 WHERE rowid > 549755813887 ORDER BY rowid
4714 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4715 do_test boundary1-2.41.gt.4 {
4717 SELECT a FROM t1 WHERE rowid > 549755813887 ORDER BY rowid DESC
4719 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35}
4720 do_test boundary1-2.41.gt.5 {
4722 SELECT a FROM t1 WHERE rowid > 549755813887 ORDER BY x
4724 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4725 do_test boundary1-2.41.ge.1 {
4727 SELECT a FROM t1 WHERE rowid >= 549755813887 ORDER BY a
4729 } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 46 56 57}
4730 do_test boundary1-2.41.ge.2 {
4732 SELECT a FROM t1 WHERE rowid >= 549755813887 ORDER BY a DESC
4734 } {57 56 46 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
4735 do_test boundary1-2.41.ge.3 {
4737 SELECT a FROM t1 WHERE rowid >= 549755813887 ORDER BY rowid
4739 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4740 do_test boundary1-2.41.ge.4 {
4742 SELECT a FROM t1 WHERE rowid >= 549755813887 ORDER BY rowid DESC
4744 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46}
4745 do_test boundary1-2.41.ge.5 {
4747 SELECT a FROM t1 WHERE rowid >= 549755813887 ORDER BY x
4749 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4750 do_test boundary1-2.41.lt.1 {
4752 SELECT a FROM t1 WHERE rowid < 549755813887 ORDER BY a
4754 } {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}
4755 do_test boundary1-2.41.lt.2 {
4757 SELECT a FROM t1 WHERE rowid < 549755813887 ORDER BY a DESC
4759 } {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}
4760 do_test boundary1-2.41.lt.3 {
4762 SELECT a FROM t1 WHERE rowid < 549755813887 ORDER BY rowid
4764 } {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}
4765 do_test boundary1-2.41.lt.4 {
4767 SELECT a FROM t1 WHERE rowid < 549755813887 ORDER BY rowid DESC
4769 } {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}
4770 do_test boundary1-2.41.lt.5 {
4772 SELECT a FROM t1 WHERE rowid < 549755813887 ORDER BY x
4774 } {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}
4775 do_test boundary1-2.41.le.1 {
4777 SELECT a FROM t1 WHERE rowid <= 549755813887 ORDER BY a
4779 } {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 46 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
4780 do_test boundary1-2.41.le.2 {
4782 SELECT a FROM t1 WHERE rowid <= 549755813887 ORDER BY a DESC
4784 } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 46 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}
4785 do_test boundary1-2.41.le.3 {
4787 SELECT a FROM t1 WHERE rowid <= 549755813887 ORDER BY rowid
4789 } {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}
4790 do_test boundary1-2.41.le.4 {
4792 SELECT a FROM t1 WHERE rowid <= 549755813887 ORDER BY rowid DESC
4794 } {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}
4795 do_test boundary1-2.41.le.5 {
4797 SELECT a FROM t1 WHERE rowid <= 549755813887 ORDER BY x
4799 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
4800 do_test boundary1-2.42.1 {
4802 SELECT * FROM t1 WHERE rowid=-549755813888
4804 } {63 ffffff8000000000}
4805 do_test boundary1-2.42.2 {
4807 SELECT rowid, a FROM t1 WHERE x='ffffff8000000000'
4809 } {-549755813888 63}
4810 do_test boundary1-2.42.3 {
4812 SELECT rowid, x FROM t1 WHERE a=63
4814 } {-549755813888 ffffff8000000000}
4815 do_test boundary1-2.42.gt.1 {
4817 SELECT a FROM t1 WHERE rowid > -549755813888 ORDER BY a
4819 } {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 45 46 47 48 49 50 51 52 53 54 56 57 59 60 61 62}
4820 do_test boundary1-2.42.gt.2 {
4822 SELECT a FROM t1 WHERE rowid > -549755813888 ORDER BY a DESC
4824 } {62 61 60 59 57 56 54 53 52 51 50 49 48 47 46 45 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}
4825 do_test boundary1-2.42.gt.3 {
4827 SELECT a FROM t1 WHERE rowid > -549755813888 ORDER BY rowid
4829 } {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}
4830 do_test boundary1-2.42.gt.4 {
4832 SELECT a FROM t1 WHERE rowid > -549755813888 ORDER BY rowid DESC
4834 } {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}
4835 do_test boundary1-2.42.gt.5 {
4837 SELECT a FROM t1 WHERE rowid > -549755813888 ORDER BY x
4839 } {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 47 11 1 37 29 32 54 53 52 33 38}
4840 do_test boundary1-2.42.ge.1 {
4842 SELECT a FROM t1 WHERE rowid >= -549755813888 ORDER BY a
4844 } {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 45 46 47 48 49 50 51 52 53 54 56 57 59 60 61 62 63}
4845 do_test boundary1-2.42.ge.2 {
4847 SELECT a FROM t1 WHERE rowid >= -549755813888 ORDER BY a DESC
4849 } {63 62 61 60 59 57 56 54 53 52 51 50 49 48 47 46 45 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}
4850 do_test boundary1-2.42.ge.3 {
4852 SELECT a FROM t1 WHERE rowid >= -549755813888 ORDER BY rowid
4854 } {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}
4855 do_test boundary1-2.42.ge.4 {
4857 SELECT a FROM t1 WHERE rowid >= -549755813888 ORDER BY rowid DESC
4859 } {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}
4860 do_test boundary1-2.42.ge.5 {
4862 SELECT a FROM t1 WHERE rowid >= -549755813888 ORDER BY x
4864 } {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 63 47 11 1 37 29 32 54 53 52 33 38}
4865 do_test boundary1-2.42.lt.1 {
4867 SELECT a FROM t1 WHERE rowid < -549755813888 ORDER BY a
4869 } {2 21 44 55 58 64}
4870 do_test boundary1-2.42.lt.2 {
4872 SELECT a FROM t1 WHERE rowid < -549755813888 ORDER BY a DESC
4874 } {64 58 55 44 21 2}
4875 do_test boundary1-2.42.lt.3 {
4877 SELECT a FROM t1 WHERE rowid < -549755813888 ORDER BY rowid
4879 } {55 2 64 21 44 58}
4880 do_test boundary1-2.42.lt.4 {
4882 SELECT a FROM t1 WHERE rowid < -549755813888 ORDER BY rowid DESC
4884 } {58 44 21 64 2 55}
4885 do_test boundary1-2.42.lt.5 {
4887 SELECT a FROM t1 WHERE rowid < -549755813888 ORDER BY x
4889 } {55 2 64 21 44 58}
4890 do_test boundary1-2.42.le.1 {
4892 SELECT a FROM t1 WHERE rowid <= -549755813888 ORDER BY a
4894 } {2 21 44 55 58 63 64}
4895 do_test boundary1-2.42.le.2 {
4897 SELECT a FROM t1 WHERE rowid <= -549755813888 ORDER BY a DESC
4899 } {64 63 58 55 44 21 2}
4900 do_test boundary1-2.42.le.3 {
4902 SELECT a FROM t1 WHERE rowid <= -549755813888 ORDER BY rowid
4904 } {55 2 64 21 44 58 63}
4905 do_test boundary1-2.42.le.4 {
4907 SELECT a FROM t1 WHERE rowid <= -549755813888 ORDER BY rowid DESC
4909 } {63 58 44 21 64 2 55}
4910 do_test boundary1-2.42.le.5 {
4912 SELECT a FROM t1 WHERE rowid <= -549755813888 ORDER BY x
4914 } {55 2 64 21 44 58 63}
4915 do_test boundary1-2.43.1 {
4917 SELECT * FROM t1 WHERE rowid=281474976710655
4919 } {10 0000ffffffffffff}
4920 do_test boundary1-2.43.2 {
4922 SELECT rowid, a FROM t1 WHERE x='0000ffffffffffff'
4924 } {281474976710655 10}
4925 do_test boundary1-2.43.3 {
4927 SELECT rowid, x FROM t1 WHERE a=10
4929 } {281474976710655 0000ffffffffffff}
4930 do_test boundary1-2.43.gt.1 {
4932 SELECT a FROM t1 WHERE rowid > 281474976710655 ORDER BY a
4934 } {3 13 17 26 27 28 43 45}
4935 do_test boundary1-2.43.gt.2 {
4937 SELECT a FROM t1 WHERE rowid > 281474976710655 ORDER BY a DESC
4939 } {45 43 28 27 26 17 13 3}
4940 do_test boundary1-2.43.gt.3 {
4942 SELECT a FROM t1 WHERE rowid > 281474976710655 ORDER BY rowid
4944 } {26 13 43 27 45 17 28 3}
4945 do_test boundary1-2.43.gt.4 {
4947 SELECT a FROM t1 WHERE rowid > 281474976710655 ORDER BY rowid DESC
4949 } {3 28 17 45 27 43 13 26}
4950 do_test boundary1-2.43.gt.5 {
4952 SELECT a FROM t1 WHERE rowid > 281474976710655 ORDER BY x
4954 } {26 13 43 27 45 17 28 3}
4955 do_test boundary1-2.43.ge.1 {
4957 SELECT a FROM t1 WHERE rowid >= 281474976710655 ORDER BY a
4959 } {3 10 13 17 26 27 28 43 45}
4960 do_test boundary1-2.43.ge.2 {
4962 SELECT a FROM t1 WHERE rowid >= 281474976710655 ORDER BY a DESC
4964 } {45 43 28 27 26 17 13 10 3}
4965 do_test boundary1-2.43.ge.3 {
4967 SELECT a FROM t1 WHERE rowid >= 281474976710655 ORDER BY rowid
4969 } {10 26 13 43 27 45 17 28 3}
4970 do_test boundary1-2.43.ge.4 {
4972 SELECT a FROM t1 WHERE rowid >= 281474976710655 ORDER BY rowid DESC
4974 } {3 28 17 45 27 43 13 26 10}
4975 do_test boundary1-2.43.ge.5 {
4977 SELECT a FROM t1 WHERE rowid >= 281474976710655 ORDER BY x
4979 } {10 26 13 43 27 45 17 28 3}
4980 do_test boundary1-2.43.lt.1 {
4982 SELECT a FROM t1 WHERE rowid < 281474976710655 ORDER BY a
4984 } {1 2 4 5 6 7 8 9 11 12 14 15 16 18 19 20 21 22 23 24 25 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}
4985 do_test boundary1-2.43.lt.2 {
4987 SELECT a FROM t1 WHERE rowid < 281474976710655 ORDER BY a DESC
4989 } {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 25 24 23 22 21 20 19 18 16 15 14 12 11 9 8 7 6 5 4 2 1}
4990 do_test boundary1-2.43.lt.3 {
4992 SELECT a FROM t1 WHERE rowid < 281474976710655 ORDER BY rowid
4994 } {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}
4995 do_test boundary1-2.43.lt.4 {
4997 SELECT a FROM t1 WHERE rowid < 281474976710655 ORDER BY rowid DESC
4999 } {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}
5000 do_test boundary1-2.43.lt.5 {
5002 SELECT a FROM t1 WHERE rowid < 281474976710655 ORDER BY x
5004 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
5005 do_test boundary1-2.43.le.1 {
5007 SELECT a FROM t1 WHERE rowid <= 281474976710655 ORDER BY a
5009 } {1 2 4 5 6 7 8 9 10 11 12 14 15 16 18 19 20 21 22 23 24 25 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}
5010 do_test boundary1-2.43.le.2 {
5012 SELECT a FROM t1 WHERE rowid <= 281474976710655 ORDER BY a DESC
5014 } {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 25 24 23 22 21 20 19 18 16 15 14 12 11 10 9 8 7 6 5 4 2 1}
5015 do_test boundary1-2.43.le.3 {
5017 SELECT a FROM t1 WHERE rowid <= 281474976710655 ORDER BY rowid
5019 } {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}
5020 do_test boundary1-2.43.le.4 {
5022 SELECT a FROM t1 WHERE rowid <= 281474976710655 ORDER BY rowid DESC
5024 } {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}
5025 do_test boundary1-2.43.le.5 {
5027 SELECT a FROM t1 WHERE rowid <= 281474976710655 ORDER BY x
5029 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
5030 do_test boundary1-2.44.1 {
5032 SELECT * FROM t1 WHERE rowid=4398046511103
5034 } {7 000003ffffffffff}
5035 do_test boundary1-2.44.2 {
5037 SELECT rowid, a FROM t1 WHERE x='000003ffffffffff'
5040 do_test boundary1-2.44.3 {
5042 SELECT rowid, x FROM t1 WHERE a=7
5044 } {4398046511103 000003ffffffffff}
5045 do_test boundary1-2.44.gt.1 {
5047 SELECT a FROM t1 WHERE rowid > 4398046511103 ORDER BY a
5049 } {3 10 13 17 25 26 27 28 34 43 45 56}
5050 do_test boundary1-2.44.gt.2 {
5052 SELECT a FROM t1 WHERE rowid > 4398046511103 ORDER BY a DESC
5054 } {56 45 43 34 28 27 26 25 17 13 10 3}
5055 do_test boundary1-2.44.gt.3 {
5057 SELECT a FROM t1 WHERE rowid > 4398046511103 ORDER BY rowid
5059 } {56 25 34 10 26 13 43 27 45 17 28 3}
5060 do_test boundary1-2.44.gt.4 {
5062 SELECT a FROM t1 WHERE rowid > 4398046511103 ORDER BY rowid DESC
5064 } {3 28 17 45 27 43 13 26 10 34 25 56}
5065 do_test boundary1-2.44.gt.5 {
5067 SELECT a FROM t1 WHERE rowid > 4398046511103 ORDER BY x
5069 } {56 25 34 10 26 13 43 27 45 17 28 3}
5070 do_test boundary1-2.44.ge.1 {
5072 SELECT a FROM t1 WHERE rowid >= 4398046511103 ORDER BY a
5074 } {3 7 10 13 17 25 26 27 28 34 43 45 56}
5075 do_test boundary1-2.44.ge.2 {
5077 SELECT a FROM t1 WHERE rowid >= 4398046511103 ORDER BY a DESC
5079 } {56 45 43 34 28 27 26 25 17 13 10 7 3}
5080 do_test boundary1-2.44.ge.3 {
5082 SELECT a FROM t1 WHERE rowid >= 4398046511103 ORDER BY rowid
5084 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
5085 do_test boundary1-2.44.ge.4 {
5087 SELECT a FROM t1 WHERE rowid >= 4398046511103 ORDER BY rowid DESC
5089 } {3 28 17 45 27 43 13 26 10 34 25 56 7}
5090 do_test boundary1-2.44.ge.5 {
5092 SELECT a FROM t1 WHERE rowid >= 4398046511103 ORDER BY x
5094 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
5095 do_test boundary1-2.44.lt.1 {
5097 SELECT a FROM t1 WHERE rowid < 4398046511103 ORDER BY a
5099 } {1 2 4 5 6 8 9 11 12 14 15 16 18 19 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64}
5100 do_test boundary1-2.44.lt.2 {
5102 SELECT a FROM t1 WHERE rowid < 4398046511103 ORDER BY a DESC
5104 } {64 63 62 61 60 59 58 57 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 19 18 16 15 14 12 11 9 8 6 5 4 2 1}
5105 do_test boundary1-2.44.lt.3 {
5107 SELECT a FROM t1 WHERE rowid < 4398046511103 ORDER BY rowid
5109 } {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}
5110 do_test boundary1-2.44.lt.4 {
5112 SELECT a FROM t1 WHERE rowid < 4398046511103 ORDER BY rowid DESC
5114 } {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}
5115 do_test boundary1-2.44.lt.5 {
5117 SELECT a FROM t1 WHERE rowid < 4398046511103 ORDER BY x
5119 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
5120 do_test boundary1-2.44.le.1 {
5122 SELECT a FROM t1 WHERE rowid <= 4398046511103 ORDER BY a
5124 } {1 2 4 5 6 7 8 9 11 12 14 15 16 18 19 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64}
5125 do_test boundary1-2.44.le.2 {
5127 SELECT a FROM t1 WHERE rowid <= 4398046511103 ORDER BY a DESC
5129 } {64 63 62 61 60 59 58 57 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 19 18 16 15 14 12 11 9 8 7 6 5 4 2 1}
5130 do_test boundary1-2.44.le.3 {
5132 SELECT a FROM t1 WHERE rowid <= 4398046511103 ORDER BY rowid
5134 } {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}
5135 do_test boundary1-2.44.le.4 {
5137 SELECT a FROM t1 WHERE rowid <= 4398046511103 ORDER BY rowid DESC
5139 } {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}
5140 do_test boundary1-2.44.le.5 {
5142 SELECT a FROM t1 WHERE rowid <= 4398046511103 ORDER BY x
5144 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
5145 do_test boundary1-2.45.1 {
5147 SELECT * FROM t1 WHERE rowid=268435455
5149 } {12 000000000fffffff}
5150 do_test boundary1-2.45.2 {
5152 SELECT rowid, a FROM t1 WHERE x='000000000fffffff'
5155 do_test boundary1-2.45.3 {
5157 SELECT rowid, x FROM t1 WHERE a=12
5159 } {268435455 000000000fffffff}
5160 do_test boundary1-2.45.gt.1 {
5162 SELECT a FROM t1 WHERE rowid > 268435455 ORDER BY a
5164 } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
5165 do_test boundary1-2.45.gt.2 {
5167 SELECT a FROM t1 WHERE rowid > 268435455 ORDER BY a DESC
5169 } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
5170 do_test boundary1-2.45.gt.3 {
5172 SELECT a FROM t1 WHERE rowid > 268435455 ORDER BY rowid
5174 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
5175 do_test boundary1-2.45.gt.4 {
5177 SELECT a FROM t1 WHERE rowid > 268435455 ORDER BY rowid DESC
5179 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40}
5180 do_test boundary1-2.45.gt.5 {
5182 SELECT a FROM t1 WHERE rowid > 268435455 ORDER BY x
5184 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
5185 do_test boundary1-2.45.ge.1 {
5187 SELECT a FROM t1 WHERE rowid >= 268435455 ORDER BY a
5189 } {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}
5190 do_test boundary1-2.45.ge.2 {
5192 SELECT a FROM t1 WHERE rowid >= 268435455 ORDER BY a DESC
5194 } {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}
5195 do_test boundary1-2.45.ge.3 {
5197 SELECT a FROM t1 WHERE rowid >= 268435455 ORDER BY rowid
5199 } {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}
5200 do_test boundary1-2.45.ge.4 {
5202 SELECT a FROM t1 WHERE rowid >= 268435455 ORDER BY rowid DESC
5204 } {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}
5205 do_test boundary1-2.45.ge.5 {
5207 SELECT a FROM t1 WHERE rowid >= 268435455 ORDER BY x
5209 } {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}
5210 do_test boundary1-2.45.lt.1 {
5212 SELECT a FROM t1 WHERE rowid < 268435455 ORDER BY a
5214 } {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}
5215 do_test boundary1-2.45.lt.2 {
5217 SELECT a FROM t1 WHERE rowid < 268435455 ORDER BY a DESC
5219 } {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}
5220 do_test boundary1-2.45.lt.3 {
5222 SELECT a FROM t1 WHERE rowid < 268435455 ORDER BY rowid
5224 } {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}
5225 do_test boundary1-2.45.lt.4 {
5227 SELECT a FROM t1 WHERE rowid < 268435455 ORDER BY rowid DESC
5229 } {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}
5230 do_test boundary1-2.45.lt.5 {
5232 SELECT a FROM t1 WHERE rowid < 268435455 ORDER BY x
5234 } {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}
5235 do_test boundary1-2.45.le.1 {
5237 SELECT a FROM t1 WHERE rowid <= 268435455 ORDER BY a
5239 } {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}
5240 do_test boundary1-2.45.le.2 {
5242 SELECT a FROM t1 WHERE rowid <= 268435455 ORDER BY a DESC
5244 } {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}
5245 do_test boundary1-2.45.le.3 {
5247 SELECT a FROM t1 WHERE rowid <= 268435455 ORDER BY rowid
5249 } {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}
5250 do_test boundary1-2.45.le.4 {
5252 SELECT a FROM t1 WHERE rowid <= 268435455 ORDER BY rowid DESC
5254 } {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}
5255 do_test boundary1-2.45.le.5 {
5257 SELECT a FROM t1 WHERE rowid <= 268435455 ORDER BY x
5259 } {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}
5260 do_test boundary1-2.46.1 {
5262 SELECT * FROM t1 WHERE rowid=-9223372036854775808
5264 } {55 8000000000000000}
5265 do_test boundary1-2.46.2 {
5267 SELECT rowid, a FROM t1 WHERE x='8000000000000000'
5269 } {-9223372036854775808 55}
5270 do_test boundary1-2.46.3 {
5272 SELECT rowid, x FROM t1 WHERE a=55
5274 } {-9223372036854775808 8000000000000000}
5275 do_test boundary1-2.46.gt.1 {
5277 SELECT a FROM t1 WHERE rowid > -9223372036854775808 ORDER BY a
5279 } {1 2 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 64}
5280 do_test boundary1-2.46.gt.2 {
5282 SELECT a FROM t1 WHERE rowid > -9223372036854775808 ORDER BY a DESC
5284 } {64 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 2 1}
5285 do_test boundary1-2.46.gt.3 {
5287 SELECT a FROM t1 WHERE rowid > -9223372036854775808 ORDER BY rowid
5289 } {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 28 3}
5290 do_test boundary1-2.46.gt.4 {
5292 SELECT a FROM t1 WHERE rowid > -9223372036854775808 ORDER BY rowid DESC
5294 } {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 64 2}
5295 do_test boundary1-2.46.gt.5 {
5297 SELECT a FROM t1 WHERE rowid > -9223372036854775808 ORDER BY x
5299 } {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 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
5300 do_test boundary1-2.46.ge.1 {
5302 SELECT a FROM t1 WHERE rowid >= -9223372036854775808 ORDER BY a
5304 } {1 2 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 55 56 57 58 59 60 61 62 63 64}
5305 do_test boundary1-2.46.ge.2 {
5307 SELECT a FROM t1 WHERE rowid >= -9223372036854775808 ORDER BY a DESC
5309 } {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 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 2 1}
5310 do_test boundary1-2.46.ge.3 {
5312 SELECT a FROM t1 WHERE rowid >= -9223372036854775808 ORDER BY rowid
5314 } {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 28 3}
5315 do_test boundary1-2.46.ge.4 {
5317 SELECT a FROM t1 WHERE rowid >= -9223372036854775808 ORDER BY rowid DESC
5319 } {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 64 2 55}
5320 do_test boundary1-2.46.ge.5 {
5322 SELECT a FROM t1 WHERE rowid >= -9223372036854775808 ORDER BY x
5324 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
5325 do_test boundary1-2.46.lt.1 {
5327 SELECT a FROM t1 WHERE rowid < -9223372036854775808 ORDER BY a
5330 do_test boundary1-2.46.lt.2 {
5332 SELECT a FROM t1 WHERE rowid < -9223372036854775808 ORDER BY a DESC
5335 do_test boundary1-2.46.lt.3 {
5337 SELECT a FROM t1 WHERE rowid < -9223372036854775808 ORDER BY rowid
5340 do_test boundary1-2.46.lt.4 {
5342 SELECT a FROM t1 WHERE rowid < -9223372036854775808 ORDER BY rowid DESC
5345 do_test boundary1-2.46.lt.5 {
5347 SELECT a FROM t1 WHERE rowid < -9223372036854775808 ORDER BY x
5350 do_test boundary1-2.46.le.1 {
5352 SELECT a FROM t1 WHERE rowid <= -9223372036854775808 ORDER BY a
5355 do_test boundary1-2.46.le.2 {
5357 SELECT a FROM t1 WHERE rowid <= -9223372036854775808 ORDER BY a DESC
5360 do_test boundary1-2.46.le.3 {
5362 SELECT a FROM t1 WHERE rowid <= -9223372036854775808 ORDER BY rowid
5365 do_test boundary1-2.46.le.4 {
5367 SELECT a FROM t1 WHERE rowid <= -9223372036854775808 ORDER BY rowid DESC
5370 do_test boundary1-2.46.le.5 {
5372 SELECT a FROM t1 WHERE rowid <= -9223372036854775808 ORDER BY x
5375 do_test boundary1-2.47.1 {
5377 SELECT * FROM t1 WHERE rowid=562949953421312
5379 } {43 0002000000000000}
5380 do_test boundary1-2.47.2 {
5382 SELECT rowid, a FROM t1 WHERE x='0002000000000000'
5384 } {562949953421312 43}
5385 do_test boundary1-2.47.3 {
5387 SELECT rowid, x FROM t1 WHERE a=43
5389 } {562949953421312 0002000000000000}
5390 do_test boundary1-2.47.gt.1 {
5392 SELECT a FROM t1 WHERE rowid > 562949953421312 ORDER BY a
5395 do_test boundary1-2.47.gt.2 {
5397 SELECT a FROM t1 WHERE rowid > 562949953421312 ORDER BY a DESC
5400 do_test boundary1-2.47.gt.3 {
5402 SELECT a FROM t1 WHERE rowid > 562949953421312 ORDER BY rowid
5405 do_test boundary1-2.47.gt.4 {
5407 SELECT a FROM t1 WHERE rowid > 562949953421312 ORDER BY rowid DESC
5410 do_test boundary1-2.47.gt.5 {
5412 SELECT a FROM t1 WHERE rowid > 562949953421312 ORDER BY x
5415 do_test boundary1-2.47.ge.1 {
5417 SELECT a FROM t1 WHERE rowid >= 562949953421312 ORDER BY a
5419 } {3 17 27 28 43 45}
5420 do_test boundary1-2.47.ge.2 {
5422 SELECT a FROM t1 WHERE rowid >= 562949953421312 ORDER BY a DESC
5424 } {45 43 28 27 17 3}
5425 do_test boundary1-2.47.ge.3 {
5427 SELECT a FROM t1 WHERE rowid >= 562949953421312 ORDER BY rowid
5429 } {43 27 45 17 28 3}
5430 do_test boundary1-2.47.ge.4 {
5432 SELECT a FROM t1 WHERE rowid >= 562949953421312 ORDER BY rowid DESC
5434 } {3 28 17 45 27 43}
5435 do_test boundary1-2.47.ge.5 {
5437 SELECT a FROM t1 WHERE rowid >= 562949953421312 ORDER BY x
5439 } {43 27 45 17 28 3}
5440 do_test boundary1-2.47.lt.1 {
5442 SELECT a FROM t1 WHERE rowid < 562949953421312 ORDER BY a
5444 } {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}
5445 do_test boundary1-2.47.lt.2 {
5447 SELECT a FROM t1 WHERE rowid < 562949953421312 ORDER BY a DESC
5449 } {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}
5450 do_test boundary1-2.47.lt.3 {
5452 SELECT a FROM t1 WHERE rowid < 562949953421312 ORDER BY rowid
5454 } {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}
5455 do_test boundary1-2.47.lt.4 {
5457 SELECT a FROM t1 WHERE rowid < 562949953421312 ORDER BY rowid DESC
5459 } {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}
5460 do_test boundary1-2.47.lt.5 {
5462 SELECT a FROM t1 WHERE rowid < 562949953421312 ORDER BY x
5464 } {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}
5465 do_test boundary1-2.47.le.1 {
5467 SELECT a FROM t1 WHERE rowid <= 562949953421312 ORDER BY a
5469 } {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 43 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
5470 do_test boundary1-2.47.le.2 {
5472 SELECT a FROM t1 WHERE rowid <= 562949953421312 ORDER BY a DESC
5474 } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 43 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}
5475 do_test boundary1-2.47.le.3 {
5477 SELECT a FROM t1 WHERE rowid <= 562949953421312 ORDER BY rowid
5479 } {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}
5480 do_test boundary1-2.47.le.4 {
5482 SELECT a FROM t1 WHERE rowid <= 562949953421312 ORDER BY rowid DESC
5484 } {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}
5485 do_test boundary1-2.47.le.5 {
5487 SELECT a FROM t1 WHERE rowid <= 562949953421312 ORDER BY x
5489 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
5490 do_test boundary1-2.48.1 {
5492 SELECT * FROM t1 WHERE rowid=-8388609
5494 } {1 ffffffffff7fffff}
5495 do_test boundary1-2.48.2 {
5497 SELECT rowid, a FROM t1 WHERE x='ffffffffff7fffff'
5500 do_test boundary1-2.48.3 {
5502 SELECT rowid, x FROM t1 WHERE a=1
5504 } {-8388609 ffffffffff7fffff}
5505 do_test boundary1-2.48.gt.1 {
5507 SELECT a FROM t1 WHERE rowid > -8388609 ORDER BY a
5509 } {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 37 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
5510 do_test boundary1-2.48.gt.2 {
5512 SELECT a FROM t1 WHERE rowid > -8388609 ORDER BY a DESC
5514 } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 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 10 9 8 7 6 5 4 3}
5515 do_test boundary1-2.48.gt.3 {
5517 SELECT a FROM t1 WHERE rowid > -8388609 ORDER BY rowid
5519 } {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}
5520 do_test boundary1-2.48.gt.4 {
5522 SELECT a FROM t1 WHERE rowid > -8388609 ORDER BY rowid DESC
5524 } {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}
5525 do_test boundary1-2.48.gt.5 {
5527 SELECT a FROM t1 WHERE rowid > -8388609 ORDER BY x
5529 } {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 37 29 32 54 53 52 33 38}
5530 do_test boundary1-2.48.ge.1 {
5532 SELECT a FROM t1 WHERE rowid >= -8388609 ORDER BY a
5534 } {1 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 37 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
5535 do_test boundary1-2.48.ge.2 {
5537 SELECT a FROM t1 WHERE rowid >= -8388609 ORDER BY a DESC
5539 } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 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 10 9 8 7 6 5 4 3 1}
5540 do_test boundary1-2.48.ge.3 {
5542 SELECT a FROM t1 WHERE rowid >= -8388609 ORDER BY rowid
5544 } {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}
5545 do_test boundary1-2.48.ge.4 {
5547 SELECT a FROM t1 WHERE rowid >= -8388609 ORDER BY rowid DESC
5549 } {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}
5550 do_test boundary1-2.48.ge.5 {
5552 SELECT a FROM t1 WHERE rowid >= -8388609 ORDER BY x
5554 } {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 1 37 29 32 54 53 52 33 38}
5555 do_test boundary1-2.48.lt.1 {
5557 SELECT a FROM t1 WHERE rowid < -8388609 ORDER BY a
5559 } {2 11 21 44 47 55 58 63 64}
5560 do_test boundary1-2.48.lt.2 {
5562 SELECT a FROM t1 WHERE rowid < -8388609 ORDER BY a DESC
5564 } {64 63 58 55 47 44 21 11 2}
5565 do_test boundary1-2.48.lt.3 {
5567 SELECT a FROM t1 WHERE rowid < -8388609 ORDER BY rowid
5569 } {55 2 64 21 44 58 63 47 11}
5570 do_test boundary1-2.48.lt.4 {
5572 SELECT a FROM t1 WHERE rowid < -8388609 ORDER BY rowid DESC
5574 } {11 47 63 58 44 21 64 2 55}
5575 do_test boundary1-2.48.lt.5 {
5577 SELECT a FROM t1 WHERE rowid < -8388609 ORDER BY x
5579 } {55 2 64 21 44 58 63 47 11}
5580 do_test boundary1-2.48.le.1 {
5582 SELECT a FROM t1 WHERE rowid <= -8388609 ORDER BY a
5584 } {1 2 11 21 44 47 55 58 63 64}
5585 do_test boundary1-2.48.le.2 {
5587 SELECT a FROM t1 WHERE rowid <= -8388609 ORDER BY a DESC
5589 } {64 63 58 55 47 44 21 11 2 1}
5590 do_test boundary1-2.48.le.3 {
5592 SELECT a FROM t1 WHERE rowid <= -8388609 ORDER BY rowid
5594 } {55 2 64 21 44 58 63 47 11 1}
5595 do_test boundary1-2.48.le.4 {
5597 SELECT a FROM t1 WHERE rowid <= -8388609 ORDER BY rowid DESC
5599 } {1 11 47 63 58 44 21 64 2 55}
5600 do_test boundary1-2.48.le.5 {
5602 SELECT a FROM t1 WHERE rowid <= -8388609 ORDER BY x
5604 } {55 2 64 21 44 58 63 47 11 1}
5605 do_test boundary1-2.49.1 {
5607 SELECT * FROM t1 WHERE rowid=16777215
5609 } {9 0000000000ffffff}
5610 do_test boundary1-2.49.2 {
5612 SELECT rowid, a FROM t1 WHERE x='0000000000ffffff'
5615 do_test boundary1-2.49.3 {
5617 SELECT rowid, x FROM t1 WHERE a=9
5619 } {16777215 0000000000ffffff}
5620 do_test boundary1-2.49.gt.1 {
5622 SELECT a FROM t1 WHERE rowid > 16777215 ORDER BY a
5624 } {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}
5625 do_test boundary1-2.49.gt.2 {
5627 SELECT a FROM t1 WHERE rowid > 16777215 ORDER BY a DESC
5629 } {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}
5630 do_test boundary1-2.49.gt.3 {
5632 SELECT a FROM t1 WHERE rowid > 16777215 ORDER BY rowid
5634 } {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}
5635 do_test boundary1-2.49.gt.4 {
5637 SELECT a FROM t1 WHERE rowid > 16777215 ORDER BY rowid DESC
5639 } {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}
5640 do_test boundary1-2.49.gt.5 {
5642 SELECT a FROM t1 WHERE rowid > 16777215 ORDER BY x
5644 } {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}
5645 do_test boundary1-2.49.ge.1 {
5647 SELECT a FROM t1 WHERE rowid >= 16777215 ORDER BY a
5649 } {3 6 7 9 10 12 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
5650 do_test boundary1-2.49.ge.2 {
5652 SELECT a FROM t1 WHERE rowid >= 16777215 ORDER BY a DESC
5654 } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 12 10 9 7 6 3}
5655 do_test boundary1-2.49.ge.3 {
5657 SELECT a FROM t1 WHERE rowid >= 16777215 ORDER BY rowid
5659 } {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}
5660 do_test boundary1-2.49.ge.4 {
5662 SELECT a FROM t1 WHERE rowid >= 16777215 ORDER BY rowid DESC
5664 } {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}
5665 do_test boundary1-2.49.ge.5 {
5667 SELECT a FROM t1 WHERE rowid >= 16777215 ORDER BY x
5669 } {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}
5670 do_test boundary1-2.49.lt.1 {
5672 SELECT a FROM t1 WHERE rowid < 16777215 ORDER BY a
5674 } {1 2 4 5 8 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}
5675 do_test boundary1-2.49.lt.2 {
5677 SELECT a FROM t1 WHERE rowid < 16777215 ORDER BY a DESC
5679 } {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 8 5 4 2 1}
5680 do_test boundary1-2.49.lt.3 {
5682 SELECT a FROM t1 WHERE rowid < 16777215 ORDER BY rowid
5684 } {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}
5685 do_test boundary1-2.49.lt.4 {
5687 SELECT a FROM t1 WHERE rowid < 16777215 ORDER BY rowid DESC
5689 } {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}
5690 do_test boundary1-2.49.lt.5 {
5692 SELECT a FROM t1 WHERE rowid < 16777215 ORDER BY x
5694 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
5695 do_test boundary1-2.49.le.1 {
5697 SELECT a FROM t1 WHERE rowid <= 16777215 ORDER BY a
5699 } {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}
5700 do_test boundary1-2.49.le.2 {
5702 SELECT a FROM t1 WHERE rowid <= 16777215 ORDER BY a DESC
5704 } {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}
5705 do_test boundary1-2.49.le.3 {
5707 SELECT a FROM t1 WHERE rowid <= 16777215 ORDER BY rowid
5709 } {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}
5710 do_test boundary1-2.49.le.4 {
5712 SELECT a FROM t1 WHERE rowid <= 16777215 ORDER BY rowid DESC
5714 } {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}
5715 do_test boundary1-2.49.le.5 {
5717 SELECT a FROM t1 WHERE rowid <= 16777215 ORDER BY x
5719 } {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}
5720 do_test boundary1-2.50.1 {
5722 SELECT * FROM t1 WHERE rowid=8388608
5724 } {24 0000000000800000}
5725 do_test boundary1-2.50.2 {
5727 SELECT rowid, a FROM t1 WHERE x='0000000000800000'
5730 do_test boundary1-2.50.3 {
5732 SELECT rowid, x FROM t1 WHERE a=24
5734 } {8388608 0000000000800000}
5735 do_test boundary1-2.50.gt.1 {
5737 SELECT a FROM t1 WHERE rowid > 8388608 ORDER BY a
5739 } {3 6 7 9 10 12 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
5740 do_test boundary1-2.50.gt.2 {
5742 SELECT a FROM t1 WHERE rowid > 8388608 ORDER BY a DESC
5744 } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 12 10 9 7 6 3}
5745 do_test boundary1-2.50.gt.3 {
5747 SELECT a FROM t1 WHERE rowid > 8388608 ORDER BY rowid
5749 } {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}
5750 do_test boundary1-2.50.gt.4 {
5752 SELECT a FROM t1 WHERE rowid > 8388608 ORDER BY rowid DESC
5754 } {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}
5755 do_test boundary1-2.50.gt.5 {
5757 SELECT a FROM t1 WHERE rowid > 8388608 ORDER BY x
5759 } {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}
5760 do_test boundary1-2.50.ge.1 {
5762 SELECT a FROM t1 WHERE rowid >= 8388608 ORDER BY a
5764 } {3 6 7 9 10 12 13 14 17 19 20 22 24 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
5765 do_test boundary1-2.50.ge.2 {
5767 SELECT a FROM t1 WHERE rowid >= 8388608 ORDER BY a DESC
5769 } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 24 22 20 19 17 14 13 12 10 9 7 6 3}
5770 do_test boundary1-2.50.ge.3 {
5772 SELECT a FROM t1 WHERE rowid >= 8388608 ORDER BY rowid
5774 } {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}
5775 do_test boundary1-2.50.ge.4 {
5777 SELECT a FROM t1 WHERE rowid >= 8388608 ORDER BY rowid DESC
5779 } {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}
5780 do_test boundary1-2.50.ge.5 {
5782 SELECT a FROM t1 WHERE rowid >= 8388608 ORDER BY x
5784 } {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}
5785 do_test boundary1-2.50.lt.1 {
5787 SELECT a FROM t1 WHERE rowid < 8388608 ORDER BY a
5789 } {1 2 4 5 8 11 15 16 18 21 23 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}
5790 do_test boundary1-2.50.lt.2 {
5792 SELECT a FROM t1 WHERE rowid < 8388608 ORDER BY a DESC
5794 } {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 23 21 18 16 15 11 8 5 4 2 1}
5795 do_test boundary1-2.50.lt.3 {
5797 SELECT a FROM t1 WHERE rowid < 8388608 ORDER BY rowid
5799 } {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}
5800 do_test boundary1-2.50.lt.4 {
5802 SELECT a FROM t1 WHERE rowid < 8388608 ORDER BY rowid DESC
5804 } {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}
5805 do_test boundary1-2.50.lt.5 {
5807 SELECT a FROM t1 WHERE rowid < 8388608 ORDER BY x
5809 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
5810 do_test boundary1-2.50.le.1 {
5812 SELECT a FROM t1 WHERE rowid <= 8388608 ORDER BY a
5814 } {1 2 4 5 8 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}
5815 do_test boundary1-2.50.le.2 {
5817 SELECT a FROM t1 WHERE rowid <= 8388608 ORDER BY a DESC
5819 } {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 8 5 4 2 1}
5820 do_test boundary1-2.50.le.3 {
5822 SELECT a FROM t1 WHERE rowid <= 8388608 ORDER BY rowid
5824 } {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}
5825 do_test boundary1-2.50.le.4 {
5827 SELECT a FROM t1 WHERE rowid <= 8388608 ORDER BY rowid DESC
5829 } {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}
5830 do_test boundary1-2.50.le.5 {
5832 SELECT a FROM t1 WHERE rowid <= 8388608 ORDER BY x
5834 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
5835 do_test boundary1-2.51.1 {
5837 SELECT * FROM t1 WHERE rowid=16383
5839 } {8 0000000000003fff}
5840 do_test boundary1-2.51.2 {
5842 SELECT rowid, a FROM t1 WHERE x='0000000000003fff'
5845 do_test boundary1-2.51.3 {
5847 SELECT rowid, x FROM t1 WHERE a=8
5849 } {16383 0000000000003fff}
5850 do_test boundary1-2.51.gt.1 {
5852 SELECT a FROM t1 WHERE rowid > 16383 ORDER BY a
5854 } {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}
5855 do_test boundary1-2.51.gt.2 {
5857 SELECT a FROM t1 WHERE rowid > 16383 ORDER BY a DESC
5859 } {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}
5860 do_test boundary1-2.51.gt.3 {
5862 SELECT a FROM t1 WHERE rowid > 16383 ORDER BY rowid
5864 } {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}
5865 do_test boundary1-2.51.gt.4 {
5867 SELECT a FROM t1 WHERE rowid > 16383 ORDER BY rowid DESC
5869 } {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}
5870 do_test boundary1-2.51.gt.5 {
5872 SELECT a FROM t1 WHERE rowid > 16383 ORDER BY x
5874 } {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}
5875 do_test boundary1-2.51.ge.1 {
5877 SELECT a FROM t1 WHERE rowid >= 16383 ORDER BY a
5879 } {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}
5880 do_test boundary1-2.51.ge.2 {
5882 SELECT a FROM t1 WHERE rowid >= 16383 ORDER BY a DESC
5884 } {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}
5885 do_test boundary1-2.51.ge.3 {
5887 SELECT a FROM t1 WHERE rowid >= 16383 ORDER BY rowid
5889 } {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}
5890 do_test boundary1-2.51.ge.4 {
5892 SELECT a FROM t1 WHERE rowid >= 16383 ORDER BY rowid DESC
5894 } {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}
5895 do_test boundary1-2.51.ge.5 {
5897 SELECT a FROM t1 WHERE rowid >= 16383 ORDER BY x
5899 } {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}
5900 do_test boundary1-2.51.lt.1 {
5902 SELECT a FROM t1 WHERE rowid < 16383 ORDER BY a
5904 } {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}
5905 do_test boundary1-2.51.lt.2 {
5907 SELECT a FROM t1 WHERE rowid < 16383 ORDER BY a DESC
5909 } {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}
5910 do_test boundary1-2.51.lt.3 {
5912 SELECT a FROM t1 WHERE rowid < 16383 ORDER BY rowid
5914 } {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}
5915 do_test boundary1-2.51.lt.4 {
5917 SELECT a FROM t1 WHERE rowid < 16383 ORDER BY rowid DESC
5919 } {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}
5920 do_test boundary1-2.51.lt.5 {
5922 SELECT a FROM t1 WHERE rowid < 16383 ORDER BY x
5924 } {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}
5925 do_test boundary1-2.51.le.1 {
5927 SELECT a FROM t1 WHERE rowid <= 16383 ORDER BY a
5929 } {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}
5930 do_test boundary1-2.51.le.2 {
5932 SELECT a FROM t1 WHERE rowid <= 16383 ORDER BY a DESC
5934 } {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}
5935 do_test boundary1-2.51.le.3 {
5937 SELECT a FROM t1 WHERE rowid <= 16383 ORDER BY rowid
5939 } {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}
5940 do_test boundary1-2.51.le.4 {
5942 SELECT a FROM t1 WHERE rowid <= 16383 ORDER BY rowid DESC
5944 } {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}
5945 do_test boundary1-2.51.le.5 {
5947 SELECT a FROM t1 WHERE rowid <= 16383 ORDER BY x
5949 } {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}
5950 do_test boundary1-2.52.1 {
5952 SELECT * FROM t1 WHERE rowid=140737488355328
5954 } {34 0000800000000000}
5955 do_test boundary1-2.52.2 {
5957 SELECT rowid, a FROM t1 WHERE x='0000800000000000'
5959 } {140737488355328 34}
5960 do_test boundary1-2.52.3 {
5962 SELECT rowid, x FROM t1 WHERE a=34
5964 } {140737488355328 0000800000000000}
5965 do_test boundary1-2.52.gt.1 {
5967 SELECT a FROM t1 WHERE rowid > 140737488355328 ORDER BY a
5969 } {3 10 13 17 26 27 28 43 45}
5970 do_test boundary1-2.52.gt.2 {
5972 SELECT a FROM t1 WHERE rowid > 140737488355328 ORDER BY a DESC
5974 } {45 43 28 27 26 17 13 10 3}
5975 do_test boundary1-2.52.gt.3 {
5977 SELECT a FROM t1 WHERE rowid > 140737488355328 ORDER BY rowid
5979 } {10 26 13 43 27 45 17 28 3}
5980 do_test boundary1-2.52.gt.4 {
5982 SELECT a FROM t1 WHERE rowid > 140737488355328 ORDER BY rowid DESC
5984 } {3 28 17 45 27 43 13 26 10}
5985 do_test boundary1-2.52.gt.5 {
5987 SELECT a FROM t1 WHERE rowid > 140737488355328 ORDER BY x
5989 } {10 26 13 43 27 45 17 28 3}
5990 do_test boundary1-2.52.ge.1 {
5992 SELECT a FROM t1 WHERE rowid >= 140737488355328 ORDER BY a
5994 } {3 10 13 17 26 27 28 34 43 45}
5995 do_test boundary1-2.52.ge.2 {
5997 SELECT a FROM t1 WHERE rowid >= 140737488355328 ORDER BY a DESC
5999 } {45 43 34 28 27 26 17 13 10 3}
6000 do_test boundary1-2.52.ge.3 {
6002 SELECT a FROM t1 WHERE rowid >= 140737488355328 ORDER BY rowid
6004 } {34 10 26 13 43 27 45 17 28 3}
6005 do_test boundary1-2.52.ge.4 {
6007 SELECT a FROM t1 WHERE rowid >= 140737488355328 ORDER BY rowid DESC
6009 } {3 28 17 45 27 43 13 26 10 34}
6010 do_test boundary1-2.52.ge.5 {
6012 SELECT a FROM t1 WHERE rowid >= 140737488355328 ORDER BY x
6014 } {34 10 26 13 43 27 45 17 28 3}
6015 do_test boundary1-2.52.lt.1 {
6017 SELECT a FROM t1 WHERE rowid < 140737488355328 ORDER BY a
6019 } {1 2 4 5 6 7 8 9 11 12 14 15 16 18 19 20 21 22 23 24 25 29 30 31 32 33 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}
6020 do_test boundary1-2.52.lt.2 {
6022 SELECT a FROM t1 WHERE rowid < 140737488355328 ORDER BY a DESC
6024 } {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 33 32 31 30 29 25 24 23 22 21 20 19 18 16 15 14 12 11 9 8 7 6 5 4 2 1}
6025 do_test boundary1-2.52.lt.3 {
6027 SELECT a FROM t1 WHERE rowid < 140737488355328 ORDER BY rowid
6029 } {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}
6030 do_test boundary1-2.52.lt.4 {
6032 SELECT a FROM t1 WHERE rowid < 140737488355328 ORDER BY rowid DESC
6034 } {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}
6035 do_test boundary1-2.52.lt.5 {
6037 SELECT a FROM t1 WHERE rowid < 140737488355328 ORDER BY x
6039 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
6040 do_test boundary1-2.52.le.1 {
6042 SELECT a FROM t1 WHERE rowid <= 140737488355328 ORDER BY a
6044 } {1 2 4 5 6 7 8 9 11 12 14 15 16 18 19 20 21 22 23 24 25 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}
6045 do_test boundary1-2.52.le.2 {
6047 SELECT a FROM t1 WHERE rowid <= 140737488355328 ORDER BY a DESC
6049 } {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 25 24 23 22 21 20 19 18 16 15 14 12 11 9 8 7 6 5 4 2 1}
6050 do_test boundary1-2.52.le.3 {
6052 SELECT a FROM t1 WHERE rowid <= 140737488355328 ORDER BY rowid
6054 } {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}
6055 do_test boundary1-2.52.le.4 {
6057 SELECT a FROM t1 WHERE rowid <= 140737488355328 ORDER BY rowid DESC
6059 } {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}
6060 do_test boundary1-2.52.le.5 {
6062 SELECT a FROM t1 WHERE rowid <= 140737488355328 ORDER BY x
6064 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
6065 do_test boundary1-2.53.1 {
6067 SELECT * FROM t1 WHERE rowid=2097151
6069 } {15 00000000001fffff}
6070 do_test boundary1-2.53.2 {
6072 SELECT rowid, a FROM t1 WHERE x='00000000001fffff'
6075 do_test boundary1-2.53.3 {
6077 SELECT rowid, x FROM t1 WHERE a=15
6079 } {2097151 00000000001fffff}
6080 do_test boundary1-2.53.gt.1 {
6082 SELECT a FROM t1 WHERE rowid > 2097151 ORDER BY a
6084 } {3 6 7 9 10 12 13 14 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 42 43 45 46 51 56 57}
6085 do_test boundary1-2.53.gt.2 {
6087 SELECT a FROM t1 WHERE rowid > 2097151 ORDER BY a DESC
6089 } {57 56 51 46 45 43 42 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 14 13 12 10 9 7 6 3}
6090 do_test boundary1-2.53.gt.3 {
6092 SELECT a FROM t1 WHERE rowid > 2097151 ORDER BY rowid
6094 } {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}
6095 do_test boundary1-2.53.gt.4 {
6097 SELECT a FROM t1 WHERE rowid > 2097151 ORDER BY rowid DESC
6099 } {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}
6100 do_test boundary1-2.53.gt.5 {
6102 SELECT a FROM t1 WHERE rowid > 2097151 ORDER BY x
6104 } {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}
6105 do_test boundary1-2.53.ge.1 {
6107 SELECT a FROM t1 WHERE rowid >= 2097151 ORDER BY a
6109 } {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}
6110 do_test boundary1-2.53.ge.2 {
6112 SELECT a FROM t1 WHERE rowid >= 2097151 ORDER BY a DESC
6114 } {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}
6115 do_test boundary1-2.53.ge.3 {
6117 SELECT a FROM t1 WHERE rowid >= 2097151 ORDER BY rowid
6119 } {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}
6120 do_test boundary1-2.53.ge.4 {
6122 SELECT a FROM t1 WHERE rowid >= 2097151 ORDER BY rowid DESC
6124 } {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}
6125 do_test boundary1-2.53.ge.5 {
6127 SELECT a FROM t1 WHERE rowid >= 2097151 ORDER BY x
6129 } {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}
6130 do_test boundary1-2.53.lt.1 {
6132 SELECT a FROM t1 WHERE rowid < 2097151 ORDER BY a
6134 } {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}
6135 do_test boundary1-2.53.lt.2 {
6137 SELECT a FROM t1 WHERE rowid < 2097151 ORDER BY a DESC
6139 } {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}
6140 do_test boundary1-2.53.lt.3 {
6142 SELECT a FROM t1 WHERE rowid < 2097151 ORDER BY rowid
6144 } {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}
6145 do_test boundary1-2.53.lt.4 {
6147 SELECT a FROM t1 WHERE rowid < 2097151 ORDER BY rowid DESC
6149 } {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}
6150 do_test boundary1-2.53.lt.5 {
6152 SELECT a FROM t1 WHERE rowid < 2097151 ORDER BY x
6154 } {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}
6155 do_test boundary1-2.53.le.1 {
6157 SELECT a FROM t1 WHERE rowid <= 2097151 ORDER BY a
6159 } {1 2 4 5 8 11 15 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}
6160 do_test boundary1-2.53.le.2 {
6162 SELECT a FROM t1 WHERE rowid <= 2097151 ORDER BY a DESC
6164 } {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 15 11 8 5 4 2 1}
6165 do_test boundary1-2.53.le.3 {
6167 SELECT a FROM t1 WHERE rowid <= 2097151 ORDER BY rowid
6169 } {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}
6170 do_test boundary1-2.53.le.4 {
6172 SELECT a FROM t1 WHERE rowid <= 2097151 ORDER BY rowid DESC
6174 } {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}
6175 do_test boundary1-2.53.le.5 {
6177 SELECT a FROM t1 WHERE rowid <= 2097151 ORDER BY x
6179 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
6180 do_test boundary1-2.54.1 {
6182 SELECT * FROM t1 WHERE rowid=140737488355327
6184 } {25 00007fffffffffff}
6185 do_test boundary1-2.54.2 {
6187 SELECT rowid, a FROM t1 WHERE x='00007fffffffffff'
6189 } {140737488355327 25}
6190 do_test boundary1-2.54.3 {
6192 SELECT rowid, x FROM t1 WHERE a=25
6194 } {140737488355327 00007fffffffffff}
6195 do_test boundary1-2.54.gt.1 {
6197 SELECT a FROM t1 WHERE rowid > 140737488355327 ORDER BY a
6199 } {3 10 13 17 26 27 28 34 43 45}
6200 do_test boundary1-2.54.gt.2 {
6202 SELECT a FROM t1 WHERE rowid > 140737488355327 ORDER BY a DESC
6204 } {45 43 34 28 27 26 17 13 10 3}
6205 do_test boundary1-2.54.gt.3 {
6207 SELECT a FROM t1 WHERE rowid > 140737488355327 ORDER BY rowid
6209 } {34 10 26 13 43 27 45 17 28 3}
6210 do_test boundary1-2.54.gt.4 {
6212 SELECT a FROM t1 WHERE rowid > 140737488355327 ORDER BY rowid DESC
6214 } {3 28 17 45 27 43 13 26 10 34}
6215 do_test boundary1-2.54.gt.5 {
6217 SELECT a FROM t1 WHERE rowid > 140737488355327 ORDER BY x
6219 } {34 10 26 13 43 27 45 17 28 3}
6220 do_test boundary1-2.54.ge.1 {
6222 SELECT a FROM t1 WHERE rowid >= 140737488355327 ORDER BY a
6224 } {3 10 13 17 25 26 27 28 34 43 45}
6225 do_test boundary1-2.54.ge.2 {
6227 SELECT a FROM t1 WHERE rowid >= 140737488355327 ORDER BY a DESC
6229 } {45 43 34 28 27 26 25 17 13 10 3}
6230 do_test boundary1-2.54.ge.3 {
6232 SELECT a FROM t1 WHERE rowid >= 140737488355327 ORDER BY rowid
6234 } {25 34 10 26 13 43 27 45 17 28 3}
6235 do_test boundary1-2.54.ge.4 {
6237 SELECT a FROM t1 WHERE rowid >= 140737488355327 ORDER BY rowid DESC
6239 } {3 28 17 45 27 43 13 26 10 34 25}
6240 do_test boundary1-2.54.ge.5 {
6242 SELECT a FROM t1 WHERE rowid >= 140737488355327 ORDER BY x
6244 } {25 34 10 26 13 43 27 45 17 28 3}
6245 do_test boundary1-2.54.lt.1 {
6247 SELECT a FROM t1 WHERE rowid < 140737488355327 ORDER BY a
6249 } {1 2 4 5 6 7 8 9 11 12 14 15 16 18 19 20 21 22 23 24 29 30 31 32 33 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}
6250 do_test boundary1-2.54.lt.2 {
6252 SELECT a FROM t1 WHERE rowid < 140737488355327 ORDER BY a DESC
6254 } {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 33 32 31 30 29 24 23 22 21 20 19 18 16 15 14 12 11 9 8 7 6 5 4 2 1}
6255 do_test boundary1-2.54.lt.3 {
6257 SELECT a FROM t1 WHERE rowid < 140737488355327 ORDER BY rowid
6259 } {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}
6260 do_test boundary1-2.54.lt.4 {
6262 SELECT a FROM t1 WHERE rowid < 140737488355327 ORDER BY rowid DESC
6264 } {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}
6265 do_test boundary1-2.54.lt.5 {
6267 SELECT a FROM t1 WHERE rowid < 140737488355327 ORDER BY x
6269 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
6270 do_test boundary1-2.54.le.1 {
6272 SELECT a FROM t1 WHERE rowid <= 140737488355327 ORDER BY a
6274 } {1 2 4 5 6 7 8 9 11 12 14 15 16 18 19 20 21 22 23 24 25 29 30 31 32 33 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}
6275 do_test boundary1-2.54.le.2 {
6277 SELECT a FROM t1 WHERE rowid <= 140737488355327 ORDER BY a DESC
6279 } {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 33 32 31 30 29 25 24 23 22 21 20 19 18 16 15 14 12 11 9 8 7 6 5 4 2 1}
6280 do_test boundary1-2.54.le.3 {
6282 SELECT a FROM t1 WHERE rowid <= 140737488355327 ORDER BY rowid
6284 } {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}
6285 do_test boundary1-2.54.le.4 {
6287 SELECT a FROM t1 WHERE rowid <= 140737488355327 ORDER BY rowid DESC
6289 } {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}
6290 do_test boundary1-2.54.le.5 {
6292 SELECT a FROM t1 WHERE rowid <= 140737488355327 ORDER BY x
6294 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
6295 do_test boundary1-2.55.1 {
6297 SELECT * FROM t1 WHERE rowid=281474976710656
6299 } {26 0001000000000000}
6300 do_test boundary1-2.55.2 {
6302 SELECT rowid, a FROM t1 WHERE x='0001000000000000'
6304 } {281474976710656 26}
6305 do_test boundary1-2.55.3 {
6307 SELECT rowid, x FROM t1 WHERE a=26
6309 } {281474976710656 0001000000000000}
6310 do_test boundary1-2.55.gt.1 {
6312 SELECT a FROM t1 WHERE rowid > 281474976710656 ORDER BY a
6314 } {3 13 17 27 28 43 45}
6315 do_test boundary1-2.55.gt.2 {
6317 SELECT a FROM t1 WHERE rowid > 281474976710656 ORDER BY a DESC
6319 } {45 43 28 27 17 13 3}
6320 do_test boundary1-2.55.gt.3 {
6322 SELECT a FROM t1 WHERE rowid > 281474976710656 ORDER BY rowid
6324 } {13 43 27 45 17 28 3}
6325 do_test boundary1-2.55.gt.4 {
6327 SELECT a FROM t1 WHERE rowid > 281474976710656 ORDER BY rowid DESC
6329 } {3 28 17 45 27 43 13}
6330 do_test boundary1-2.55.gt.5 {
6332 SELECT a FROM t1 WHERE rowid > 281474976710656 ORDER BY x
6334 } {13 43 27 45 17 28 3}
6335 do_test boundary1-2.55.ge.1 {
6337 SELECT a FROM t1 WHERE rowid >= 281474976710656 ORDER BY a
6339 } {3 13 17 26 27 28 43 45}
6340 do_test boundary1-2.55.ge.2 {
6342 SELECT a FROM t1 WHERE rowid >= 281474976710656 ORDER BY a DESC
6344 } {45 43 28 27 26 17 13 3}
6345 do_test boundary1-2.55.ge.3 {
6347 SELECT a FROM t1 WHERE rowid >= 281474976710656 ORDER BY rowid
6349 } {26 13 43 27 45 17 28 3}
6350 do_test boundary1-2.55.ge.4 {
6352 SELECT a FROM t1 WHERE rowid >= 281474976710656 ORDER BY rowid DESC
6354 } {3 28 17 45 27 43 13 26}
6355 do_test boundary1-2.55.ge.5 {
6357 SELECT a FROM t1 WHERE rowid >= 281474976710656 ORDER BY x
6359 } {26 13 43 27 45 17 28 3}
6360 do_test boundary1-2.55.lt.1 {
6362 SELECT a FROM t1 WHERE rowid < 281474976710656 ORDER BY a
6364 } {1 2 4 5 6 7 8 9 10 11 12 14 15 16 18 19 20 21 22 23 24 25 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}
6365 do_test boundary1-2.55.lt.2 {
6367 SELECT a FROM t1 WHERE rowid < 281474976710656 ORDER BY a DESC
6369 } {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 25 24 23 22 21 20 19 18 16 15 14 12 11 10 9 8 7 6 5 4 2 1}
6370 do_test boundary1-2.55.lt.3 {
6372 SELECT a FROM t1 WHERE rowid < 281474976710656 ORDER BY rowid
6374 } {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}
6375 do_test boundary1-2.55.lt.4 {
6377 SELECT a FROM t1 WHERE rowid < 281474976710656 ORDER BY rowid DESC
6379 } {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}
6380 do_test boundary1-2.55.lt.5 {
6382 SELECT a FROM t1 WHERE rowid < 281474976710656 ORDER BY x
6384 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
6385 do_test boundary1-2.55.le.1 {
6387 SELECT a FROM t1 WHERE rowid <= 281474976710656 ORDER BY a
6389 } {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}
6390 do_test boundary1-2.55.le.2 {
6392 SELECT a FROM t1 WHERE rowid <= 281474976710656 ORDER BY a DESC
6394 } {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}
6395 do_test boundary1-2.55.le.3 {
6397 SELECT a FROM t1 WHERE rowid <= 281474976710656 ORDER BY rowid
6399 } {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}
6400 do_test boundary1-2.55.le.4 {
6402 SELECT a FROM t1 WHERE rowid <= 281474976710656 ORDER BY rowid DESC
6404 } {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}
6405 do_test boundary1-2.55.le.5 {
6407 SELECT a FROM t1 WHERE rowid <= 281474976710656 ORDER BY x
6409 } {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}
6410 do_test boundary1-2.56.1 {
6412 SELECT * FROM t1 WHERE rowid=32767
6414 } {23 0000000000007fff}
6415 do_test boundary1-2.56.2 {
6417 SELECT rowid, a FROM t1 WHERE x='0000000000007fff'
6420 do_test boundary1-2.56.3 {
6422 SELECT rowid, x FROM t1 WHERE a=23
6424 } {32767 0000000000007fff}
6425 do_test boundary1-2.56.gt.1 {
6427 SELECT a FROM t1 WHERE rowid > 32767 ORDER BY a
6429 } {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 48 50 51 56 57 62}
6430 do_test boundary1-2.56.gt.2 {
6432 SELECT a FROM t1 WHERE rowid > 32767 ORDER BY a DESC
6434 } {62 57 56 51 50 48 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}
6435 do_test boundary1-2.56.gt.3 {
6437 SELECT a FROM t1 WHERE rowid > 32767 ORDER BY rowid
6439 } {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}
6440 do_test boundary1-2.56.gt.4 {
6442 SELECT a FROM t1 WHERE rowid > 32767 ORDER BY rowid DESC
6444 } {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}
6445 do_test boundary1-2.56.gt.5 {
6447 SELECT a FROM t1 WHERE rowid > 32767 ORDER BY x
6449 } {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}
6450 do_test boundary1-2.56.ge.1 {
6452 SELECT a FROM t1 WHERE rowid >= 32767 ORDER BY a
6454 } {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}
6455 do_test boundary1-2.56.ge.2 {
6457 SELECT a FROM t1 WHERE rowid >= 32767 ORDER BY a DESC
6459 } {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}
6460 do_test boundary1-2.56.ge.3 {
6462 SELECT a FROM t1 WHERE rowid >= 32767 ORDER BY rowid
6464 } {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}
6465 do_test boundary1-2.56.ge.4 {
6467 SELECT a FROM t1 WHERE rowid >= 32767 ORDER BY rowid DESC
6469 } {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}
6470 do_test boundary1-2.56.ge.5 {
6472 SELECT a FROM t1 WHERE rowid >= 32767 ORDER BY x
6474 } {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}
6475 do_test boundary1-2.56.lt.1 {
6477 SELECT a FROM t1 WHERE rowid < 32767 ORDER BY a
6479 } {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}
6480 do_test boundary1-2.56.lt.2 {
6482 SELECT a FROM t1 WHERE rowid < 32767 ORDER BY a DESC
6484 } {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}
6485 do_test boundary1-2.56.lt.3 {
6487 SELECT a FROM t1 WHERE rowid < 32767 ORDER BY rowid
6489 } {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}
6490 do_test boundary1-2.56.lt.4 {
6492 SELECT a FROM t1 WHERE rowid < 32767 ORDER BY rowid DESC
6494 } {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}
6495 do_test boundary1-2.56.lt.5 {
6497 SELECT a FROM t1 WHERE rowid < 32767 ORDER BY x
6499 } {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}
6500 do_test boundary1-2.56.le.1 {
6502 SELECT a FROM t1 WHERE rowid <= 32767 ORDER BY a
6504 } {1 2 4 5 8 11 16 21 23 29 30 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 61 63 64}
6505 do_test boundary1-2.56.le.2 {
6507 SELECT a FROM t1 WHERE rowid <= 32767 ORDER BY a DESC
6509 } {64 63 61 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 30 29 23 21 16 11 8 5 4 2 1}
6510 do_test boundary1-2.56.le.3 {
6512 SELECT a FROM t1 WHERE rowid <= 32767 ORDER BY rowid
6514 } {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}
6515 do_test boundary1-2.56.le.4 {
6517 SELECT a FROM t1 WHERE rowid <= 32767 ORDER BY rowid DESC
6519 } {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}
6520 do_test boundary1-2.56.le.5 {
6522 SELECT a FROM t1 WHERE rowid <= 32767 ORDER BY x
6524 } {59 60 41 5 31 4 49 30 61 8 16 23 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
6525 do_test boundary1-2.57.1 {
6527 SELECT * FROM t1 WHERE rowid=127
6529 } {4 000000000000007f}
6530 do_test boundary1-2.57.2 {
6532 SELECT rowid, a FROM t1 WHERE x='000000000000007f'
6535 do_test boundary1-2.57.3 {
6537 SELECT rowid, x FROM t1 WHERE a=4
6539 } {127 000000000000007f}
6540 do_test boundary1-2.57.gt.1 {
6542 SELECT a FROM t1 WHERE rowid > 127 ORDER BY a
6544 } {3 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}
6545 do_test boundary1-2.57.gt.2 {
6547 SELECT a FROM t1 WHERE rowid > 127 ORDER BY a DESC
6549 } {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 3}
6550 do_test boundary1-2.57.gt.3 {
6552 SELECT a FROM t1 WHERE rowid > 127 ORDER BY rowid
6554 } {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}
6555 do_test boundary1-2.57.gt.4 {
6557 SELECT a FROM t1 WHERE rowid > 127 ORDER BY rowid DESC
6559 } {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}
6560 do_test boundary1-2.57.gt.5 {
6562 SELECT a FROM t1 WHERE rowid > 127 ORDER BY x
6564 } {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}
6565 do_test boundary1-2.57.ge.1 {
6567 SELECT a FROM t1 WHERE rowid >= 127 ORDER BY a
6569 } {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}
6570 do_test boundary1-2.57.ge.2 {
6572 SELECT a FROM t1 WHERE rowid >= 127 ORDER BY a DESC
6574 } {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}
6575 do_test boundary1-2.57.ge.3 {
6577 SELECT a FROM t1 WHERE rowid >= 127 ORDER BY rowid
6579 } {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}
6580 do_test boundary1-2.57.ge.4 {
6582 SELECT a FROM t1 WHERE rowid >= 127 ORDER BY rowid DESC
6584 } {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}
6585 do_test boundary1-2.57.ge.5 {
6587 SELECT a FROM t1 WHERE rowid >= 127 ORDER BY x
6589 } {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}
6590 do_test boundary1-2.57.lt.1 {
6592 SELECT a FROM t1 WHERE rowid < 127 ORDER BY a
6594 } {1 2 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
6595 do_test boundary1-2.57.lt.2 {
6597 SELECT a FROM t1 WHERE rowid < 127 ORDER BY a DESC
6599 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 2 1}
6600 do_test boundary1-2.57.lt.3 {
6602 SELECT a FROM t1 WHERE rowid < 127 ORDER BY rowid
6604 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31}
6605 do_test boundary1-2.57.lt.4 {
6607 SELECT a FROM t1 WHERE rowid < 127 ORDER BY rowid DESC
6609 } {31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
6610 do_test boundary1-2.57.lt.5 {
6612 SELECT a FROM t1 WHERE rowid < 127 ORDER BY x
6614 } {59 60 41 5 31 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
6615 do_test boundary1-2.57.le.1 {
6617 SELECT a FROM t1 WHERE rowid <= 127 ORDER BY a
6619 } {1 2 4 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
6620 do_test boundary1-2.57.le.2 {
6622 SELECT a FROM t1 WHERE rowid <= 127 ORDER BY a DESC
6624 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 4 2 1}
6625 do_test boundary1-2.57.le.3 {
6627 SELECT a FROM t1 WHERE rowid <= 127 ORDER BY rowid
6629 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4}
6630 do_test boundary1-2.57.le.4 {
6632 SELECT a FROM t1 WHERE rowid <= 127 ORDER BY rowid DESC
6634 } {4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
6635 do_test boundary1-2.57.le.5 {
6637 SELECT a FROM t1 WHERE rowid <= 127 ORDER BY x
6639 } {59 60 41 5 31 4 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
6640 do_test boundary1-2.58.1 {
6642 SELECT * FROM t1 WHERE rowid=36028797018963967
6644 } {27 007fffffffffffff}
6645 do_test boundary1-2.58.2 {
6647 SELECT rowid, a FROM t1 WHERE x='007fffffffffffff'
6649 } {36028797018963967 27}
6650 do_test boundary1-2.58.3 {
6652 SELECT rowid, x FROM t1 WHERE a=27
6654 } {36028797018963967 007fffffffffffff}
6655 do_test boundary1-2.58.gt.1 {
6657 SELECT a FROM t1 WHERE rowid > 36028797018963967 ORDER BY a
6660 do_test boundary1-2.58.gt.2 {
6662 SELECT a FROM t1 WHERE rowid > 36028797018963967 ORDER BY a DESC
6665 do_test boundary1-2.58.gt.3 {
6667 SELECT a FROM t1 WHERE rowid > 36028797018963967 ORDER BY rowid
6670 do_test boundary1-2.58.gt.4 {
6672 SELECT a FROM t1 WHERE rowid > 36028797018963967 ORDER BY rowid DESC
6675 do_test boundary1-2.58.gt.5 {
6677 SELECT a FROM t1 WHERE rowid > 36028797018963967 ORDER BY x
6680 do_test boundary1-2.58.ge.1 {
6682 SELECT a FROM t1 WHERE rowid >= 36028797018963967 ORDER BY a
6685 do_test boundary1-2.58.ge.2 {
6687 SELECT a FROM t1 WHERE rowid >= 36028797018963967 ORDER BY a DESC
6690 do_test boundary1-2.58.ge.3 {
6692 SELECT a FROM t1 WHERE rowid >= 36028797018963967 ORDER BY rowid
6695 do_test boundary1-2.58.ge.4 {
6697 SELECT a FROM t1 WHERE rowid >= 36028797018963967 ORDER BY rowid DESC
6700 do_test boundary1-2.58.ge.5 {
6702 SELECT a FROM t1 WHERE rowid >= 36028797018963967 ORDER BY x
6705 do_test boundary1-2.58.lt.1 {
6707 SELECT a FROM t1 WHERE rowid < 36028797018963967 ORDER BY a
6709 } {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 43 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
6710 do_test boundary1-2.58.lt.2 {
6712 SELECT a FROM t1 WHERE rowid < 36028797018963967 ORDER BY a DESC
6714 } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 43 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}
6715 do_test boundary1-2.58.lt.3 {
6717 SELECT a FROM t1 WHERE rowid < 36028797018963967 ORDER BY rowid
6719 } {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}
6720 do_test boundary1-2.58.lt.4 {
6722 SELECT a FROM t1 WHERE rowid < 36028797018963967 ORDER BY rowid DESC
6724 } {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}
6725 do_test boundary1-2.58.lt.5 {
6727 SELECT a FROM t1 WHERE rowid < 36028797018963967 ORDER BY x
6729 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
6730 do_test boundary1-2.58.le.1 {
6732 SELECT a FROM t1 WHERE rowid <= 36028797018963967 ORDER BY a
6734 } {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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
6735 do_test boundary1-2.58.le.2 {
6737 SELECT a FROM t1 WHERE rowid <= 36028797018963967 ORDER BY a DESC
6739 } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 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}
6740 do_test boundary1-2.58.le.3 {
6742 SELECT a FROM t1 WHERE rowid <= 36028797018963967 ORDER BY rowid
6744 } {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}
6745 do_test boundary1-2.58.le.4 {
6747 SELECT a FROM t1 WHERE rowid <= 36028797018963967 ORDER BY rowid DESC
6749 } {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}
6750 do_test boundary1-2.58.le.5 {
6752 SELECT a FROM t1 WHERE rowid <= 36028797018963967 ORDER BY x
6754 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
6755 do_test boundary1-2.59.1 {
6757 SELECT * FROM t1 WHERE rowid=4398046511104
6759 } {56 0000040000000000}
6760 do_test boundary1-2.59.2 {
6762 SELECT rowid, a FROM t1 WHERE x='0000040000000000'
6764 } {4398046511104 56}
6765 do_test boundary1-2.59.3 {
6767 SELECT rowid, x FROM t1 WHERE a=56
6769 } {4398046511104 0000040000000000}
6770 do_test boundary1-2.59.gt.1 {
6772 SELECT a FROM t1 WHERE rowid > 4398046511104 ORDER BY a
6774 } {3 10 13 17 25 26 27 28 34 43 45}
6775 do_test boundary1-2.59.gt.2 {
6777 SELECT a FROM t1 WHERE rowid > 4398046511104 ORDER BY a DESC
6779 } {45 43 34 28 27 26 25 17 13 10 3}
6780 do_test boundary1-2.59.gt.3 {
6782 SELECT a FROM t1 WHERE rowid > 4398046511104 ORDER BY rowid
6784 } {25 34 10 26 13 43 27 45 17 28 3}
6785 do_test boundary1-2.59.gt.4 {
6787 SELECT a FROM t1 WHERE rowid > 4398046511104 ORDER BY rowid DESC
6789 } {3 28 17 45 27 43 13 26 10 34 25}
6790 do_test boundary1-2.59.gt.5 {
6792 SELECT a FROM t1 WHERE rowid > 4398046511104 ORDER BY x
6794 } {25 34 10 26 13 43 27 45 17 28 3}
6795 do_test boundary1-2.59.ge.1 {
6797 SELECT a FROM t1 WHERE rowid >= 4398046511104 ORDER BY a
6799 } {3 10 13 17 25 26 27 28 34 43 45 56}
6800 do_test boundary1-2.59.ge.2 {
6802 SELECT a FROM t1 WHERE rowid >= 4398046511104 ORDER BY a DESC
6804 } {56 45 43 34 28 27 26 25 17 13 10 3}
6805 do_test boundary1-2.59.ge.3 {
6807 SELECT a FROM t1 WHERE rowid >= 4398046511104 ORDER BY rowid
6809 } {56 25 34 10 26 13 43 27 45 17 28 3}
6810 do_test boundary1-2.59.ge.4 {
6812 SELECT a FROM t1 WHERE rowid >= 4398046511104 ORDER BY rowid DESC
6814 } {3 28 17 45 27 43 13 26 10 34 25 56}
6815 do_test boundary1-2.59.ge.5 {
6817 SELECT a FROM t1 WHERE rowid >= 4398046511104 ORDER BY x
6819 } {56 25 34 10 26 13 43 27 45 17 28 3}
6820 do_test boundary1-2.59.lt.1 {
6822 SELECT a FROM t1 WHERE rowid < 4398046511104 ORDER BY a
6824 } {1 2 4 5 6 7 8 9 11 12 14 15 16 18 19 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64}
6825 do_test boundary1-2.59.lt.2 {
6827 SELECT a FROM t1 WHERE rowid < 4398046511104 ORDER BY a DESC
6829 } {64 63 62 61 60 59 58 57 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 19 18 16 15 14 12 11 9 8 7 6 5 4 2 1}
6830 do_test boundary1-2.59.lt.3 {
6832 SELECT a FROM t1 WHERE rowid < 4398046511104 ORDER BY rowid
6834 } {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}
6835 do_test boundary1-2.59.lt.4 {
6837 SELECT a FROM t1 WHERE rowid < 4398046511104 ORDER BY rowid DESC
6839 } {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}
6840 do_test boundary1-2.59.lt.5 {
6842 SELECT a FROM t1 WHERE rowid < 4398046511104 ORDER BY x
6844 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
6845 do_test boundary1-2.59.le.1 {
6847 SELECT a FROM t1 WHERE rowid <= 4398046511104 ORDER BY a
6849 } {1 2 4 5 6 7 8 9 11 12 14 15 16 18 19 20 21 22 23 24 29 30 31 32 33 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}
6850 do_test boundary1-2.59.le.2 {
6852 SELECT a FROM t1 WHERE rowid <= 4398046511104 ORDER BY a DESC
6854 } {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 33 32 31 30 29 24 23 22 21 20 19 18 16 15 14 12 11 9 8 7 6 5 4 2 1}
6855 do_test boundary1-2.59.le.3 {
6857 SELECT a FROM t1 WHERE rowid <= 4398046511104 ORDER BY rowid
6859 } {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}
6860 do_test boundary1-2.59.le.4 {
6862 SELECT a FROM t1 WHERE rowid <= 4398046511104 ORDER BY rowid DESC
6864 } {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}
6865 do_test boundary1-2.59.le.5 {
6867 SELECT a FROM t1 WHERE rowid <= 4398046511104 ORDER BY x
6869 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
6870 do_test boundary1-2.60.1 {
6872 SELECT * FROM t1 WHERE rowid=1
6874 } {60 0000000000000001}
6875 do_test boundary1-2.60.2 {
6877 SELECT rowid, a FROM t1 WHERE x='0000000000000001'
6880 do_test boundary1-2.60.3 {
6882 SELECT rowid, x FROM t1 WHERE a=60
6884 } {1 0000000000000001}
6885 do_test boundary1-2.60.gt.1 {
6887 SELECT a FROM t1 WHERE rowid > 1 ORDER BY a
6889 } {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}
6890 do_test boundary1-2.60.gt.2 {
6892 SELECT a FROM t1 WHERE rowid > 1 ORDER BY a DESC
6894 } {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}
6895 do_test boundary1-2.60.gt.3 {
6897 SELECT a FROM t1 WHERE rowid > 1 ORDER BY rowid
6899 } {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}
6900 do_test boundary1-2.60.gt.4 {
6902 SELECT a FROM t1 WHERE rowid > 1 ORDER BY rowid DESC
6904 } {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}
6905 do_test boundary1-2.60.gt.5 {
6907 SELECT a FROM t1 WHERE rowid > 1 ORDER BY x
6909 } {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}
6910 do_test boundary1-2.60.ge.1 {
6912 SELECT a FROM t1 WHERE rowid >= 1 ORDER BY a
6914 } {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 60 61 62}
6915 do_test boundary1-2.60.ge.2 {
6917 SELECT a FROM t1 WHERE rowid >= 1 ORDER BY a DESC
6919 } {62 61 60 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}
6920 do_test boundary1-2.60.ge.3 {
6922 SELECT a FROM t1 WHERE rowid >= 1 ORDER BY rowid
6924 } {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}
6925 do_test boundary1-2.60.ge.4 {
6927 SELECT a FROM t1 WHERE rowid >= 1 ORDER BY rowid DESC
6929 } {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}
6930 do_test boundary1-2.60.ge.5 {
6932 SELECT a FROM t1 WHERE rowid >= 1 ORDER BY x
6934 } {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}
6935 do_test boundary1-2.60.lt.1 {
6937 SELECT a FROM t1 WHERE rowid < 1 ORDER BY a
6939 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 63 64}
6940 do_test boundary1-2.60.lt.2 {
6942 SELECT a FROM t1 WHERE rowid < 1 ORDER BY a DESC
6944 } {64 63 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
6945 do_test boundary1-2.60.lt.3 {
6947 SELECT a FROM t1 WHERE rowid < 1 ORDER BY rowid
6949 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59}
6950 do_test boundary1-2.60.lt.4 {
6952 SELECT a FROM t1 WHERE rowid < 1 ORDER BY rowid DESC
6954 } {59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
6955 do_test boundary1-2.60.lt.5 {
6957 SELECT a FROM t1 WHERE rowid < 1 ORDER BY x
6959 } {59 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
6960 do_test boundary1-2.60.le.1 {
6962 SELECT a FROM t1 WHERE rowid <= 1 ORDER BY a
6964 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 60 63 64}
6965 do_test boundary1-2.60.le.2 {
6967 SELECT a FROM t1 WHERE rowid <= 1 ORDER BY a DESC
6969 } {64 63 60 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
6970 do_test boundary1-2.60.le.3 {
6972 SELECT a FROM t1 WHERE rowid <= 1 ORDER BY rowid
6974 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60}
6975 do_test boundary1-2.60.le.4 {
6977 SELECT a FROM t1 WHERE rowid <= 1 ORDER BY rowid DESC
6979 } {60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
6980 do_test boundary1-2.60.le.5 {
6982 SELECT a FROM t1 WHERE rowid <= 1 ORDER BY x
6984 } {59 60 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
6985 do_test boundary1-2.61.1 {
6987 SELECT * FROM t1 WHERE rowid=36028797018963968
6989 } {45 0080000000000000}
6990 do_test boundary1-2.61.2 {
6992 SELECT rowid, a FROM t1 WHERE x='0080000000000000'
6994 } {36028797018963968 45}
6995 do_test boundary1-2.61.3 {
6997 SELECT rowid, x FROM t1 WHERE a=45
6999 } {36028797018963968 0080000000000000}
7000 do_test boundary1-2.61.gt.1 {
7002 SELECT a FROM t1 WHERE rowid > 36028797018963968 ORDER BY a
7005 do_test boundary1-2.61.gt.2 {
7007 SELECT a FROM t1 WHERE rowid > 36028797018963968 ORDER BY a DESC
7010 do_test boundary1-2.61.gt.3 {
7012 SELECT a FROM t1 WHERE rowid > 36028797018963968 ORDER BY rowid
7015 do_test boundary1-2.61.gt.4 {
7017 SELECT a FROM t1 WHERE rowid > 36028797018963968 ORDER BY rowid DESC
7020 do_test boundary1-2.61.gt.5 {
7022 SELECT a FROM t1 WHERE rowid > 36028797018963968 ORDER BY x
7025 do_test boundary1-2.61.ge.1 {
7027 SELECT a FROM t1 WHERE rowid >= 36028797018963968 ORDER BY a
7030 do_test boundary1-2.61.ge.2 {
7032 SELECT a FROM t1 WHERE rowid >= 36028797018963968 ORDER BY a DESC
7035 do_test boundary1-2.61.ge.3 {
7037 SELECT a FROM t1 WHERE rowid >= 36028797018963968 ORDER BY rowid
7040 do_test boundary1-2.61.ge.4 {
7042 SELECT a FROM t1 WHERE rowid >= 36028797018963968 ORDER BY rowid DESC
7045 do_test boundary1-2.61.ge.5 {
7047 SELECT a FROM t1 WHERE rowid >= 36028797018963968 ORDER BY x
7050 do_test boundary1-2.61.lt.1 {
7052 SELECT a FROM t1 WHERE rowid < 36028797018963968 ORDER BY a
7054 } {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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
7055 do_test boundary1-2.61.lt.2 {
7057 SELECT a FROM t1 WHERE rowid < 36028797018963968 ORDER BY a DESC
7059 } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 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}
7060 do_test boundary1-2.61.lt.3 {
7062 SELECT a FROM t1 WHERE rowid < 36028797018963968 ORDER BY rowid
7064 } {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}
7065 do_test boundary1-2.61.lt.4 {
7067 SELECT a FROM t1 WHERE rowid < 36028797018963968 ORDER BY rowid DESC
7069 } {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}
7070 do_test boundary1-2.61.lt.5 {
7072 SELECT a FROM t1 WHERE rowid < 36028797018963968 ORDER BY x
7074 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
7075 do_test boundary1-2.61.le.1 {
7077 SELECT a FROM t1 WHERE rowid <= 36028797018963968 ORDER BY a
7079 } {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}
7080 do_test boundary1-2.61.le.2 {
7082 SELECT a FROM t1 WHERE rowid <= 36028797018963968 ORDER BY a DESC
7084 } {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}
7085 do_test boundary1-2.61.le.3 {
7087 SELECT a FROM t1 WHERE rowid <= 36028797018963968 ORDER BY rowid
7089 } {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}
7090 do_test boundary1-2.61.le.4 {
7092 SELECT a FROM t1 WHERE rowid <= 36028797018963968 ORDER BY rowid DESC
7094 } {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}
7095 do_test boundary1-2.61.le.5 {
7097 SELECT a FROM t1 WHERE rowid <= 36028797018963968 ORDER BY x
7099 } {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}
7100 do_test boundary1-2.62.1 {
7102 SELECT * FROM t1 WHERE rowid=-2147483649
7104 } {47 ffffffff7fffffff}
7105 do_test boundary1-2.62.2 {
7107 SELECT rowid, a FROM t1 WHERE x='ffffffff7fffffff'
7110 do_test boundary1-2.62.3 {
7112 SELECT rowid, x FROM t1 WHERE a=47
7114 } {-2147483649 ffffffff7fffffff}
7115 do_test boundary1-2.62.gt.1 {
7117 SELECT a FROM t1 WHERE rowid > -2147483649 ORDER BY a
7119 } {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 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
7120 do_test boundary1-2.62.gt.2 {
7122 SELECT a FROM t1 WHERE rowid > -2147483649 ORDER BY a DESC
7124 } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 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}
7125 do_test boundary1-2.62.gt.3 {
7127 SELECT a FROM t1 WHERE rowid > -2147483649 ORDER BY rowid
7129 } {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}
7130 do_test boundary1-2.62.gt.4 {
7132 SELECT a FROM t1 WHERE rowid > -2147483649 ORDER BY rowid DESC
7134 } {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}
7135 do_test boundary1-2.62.gt.5 {
7137 SELECT a FROM t1 WHERE rowid > -2147483649 ORDER BY x
7139 } {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 11 1 37 29 32 54 53 52 33 38}
7140 do_test boundary1-2.62.ge.1 {
7142 SELECT a FROM t1 WHERE rowid >= -2147483649 ORDER BY a
7144 } {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 45 46 47 48 49 50 51 52 53 54 56 57 59 60 61 62}
7145 do_test boundary1-2.62.ge.2 {
7147 SELECT a FROM t1 WHERE rowid >= -2147483649 ORDER BY a DESC
7149 } {62 61 60 59 57 56 54 53 52 51 50 49 48 47 46 45 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}
7150 do_test boundary1-2.62.ge.3 {
7152 SELECT a FROM t1 WHERE rowid >= -2147483649 ORDER BY rowid
7154 } {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}
7155 do_test boundary1-2.62.ge.4 {
7157 SELECT a FROM t1 WHERE rowid >= -2147483649 ORDER BY rowid DESC
7159 } {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}
7160 do_test boundary1-2.62.ge.5 {
7162 SELECT a FROM t1 WHERE rowid >= -2147483649 ORDER BY x
7164 } {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 47 11 1 37 29 32 54 53 52 33 38}
7165 do_test boundary1-2.62.lt.1 {
7167 SELECT a FROM t1 WHERE rowid < -2147483649 ORDER BY a
7169 } {2 21 44 55 58 63 64}
7170 do_test boundary1-2.62.lt.2 {
7172 SELECT a FROM t1 WHERE rowid < -2147483649 ORDER BY a DESC
7174 } {64 63 58 55 44 21 2}
7175 do_test boundary1-2.62.lt.3 {
7177 SELECT a FROM t1 WHERE rowid < -2147483649 ORDER BY rowid
7179 } {55 2 64 21 44 58 63}
7180 do_test boundary1-2.62.lt.4 {
7182 SELECT a FROM t1 WHERE rowid < -2147483649 ORDER BY rowid DESC
7184 } {63 58 44 21 64 2 55}
7185 do_test boundary1-2.62.lt.5 {
7187 SELECT a FROM t1 WHERE rowid < -2147483649 ORDER BY x
7189 } {55 2 64 21 44 58 63}
7190 do_test boundary1-2.62.le.1 {
7192 SELECT a FROM t1 WHERE rowid <= -2147483649 ORDER BY a
7194 } {2 21 44 47 55 58 63 64}
7195 do_test boundary1-2.62.le.2 {
7197 SELECT a FROM t1 WHERE rowid <= -2147483649 ORDER BY a DESC
7199 } {64 63 58 55 47 44 21 2}
7200 do_test boundary1-2.62.le.3 {
7202 SELECT a FROM t1 WHERE rowid <= -2147483649 ORDER BY rowid
7204 } {55 2 64 21 44 58 63 47}
7205 do_test boundary1-2.62.le.4 {
7207 SELECT a FROM t1 WHERE rowid <= -2147483649 ORDER BY rowid DESC
7209 } {47 63 58 44 21 64 2 55}
7210 do_test boundary1-2.62.le.5 {
7212 SELECT a FROM t1 WHERE rowid <= -2147483649 ORDER BY x
7214 } {55 2 64 21 44 58 63 47}
7215 do_test boundary1-2.63.1 {
7217 SELECT * FROM t1 WHERE rowid=-36028797018963969
7219 } {2 ff7fffffffffffff}
7220 do_test boundary1-2.63.2 {
7222 SELECT rowid, a FROM t1 WHERE x='ff7fffffffffffff'
7224 } {-36028797018963969 2}
7225 do_test boundary1-2.63.3 {
7227 SELECT rowid, x FROM t1 WHERE a=2
7229 } {-36028797018963969 ff7fffffffffffff}
7230 do_test boundary1-2.63.gt.1 {
7232 SELECT a FROM t1 WHERE rowid > -36028797018963969 ORDER BY a
7234 } {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 64}
7235 do_test boundary1-2.63.gt.2 {
7237 SELECT a FROM t1 WHERE rowid > -36028797018963969 ORDER BY a DESC
7239 } {64 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}
7240 do_test boundary1-2.63.gt.3 {
7242 SELECT a FROM t1 WHERE rowid > -36028797018963969 ORDER BY rowid
7244 } {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 28 3}
7245 do_test boundary1-2.63.gt.4 {
7247 SELECT a FROM t1 WHERE rowid > -36028797018963969 ORDER BY rowid DESC
7249 } {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 64}
7250 do_test boundary1-2.63.gt.5 {
7252 SELECT a FROM t1 WHERE rowid > -36028797018963969 ORDER BY x
7254 } {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 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
7255 do_test boundary1-2.63.ge.1 {
7257 SELECT a FROM t1 WHERE rowid >= -36028797018963969 ORDER BY a
7259 } {1 2 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 64}
7260 do_test boundary1-2.63.ge.2 {
7262 SELECT a FROM t1 WHERE rowid >= -36028797018963969 ORDER BY a DESC
7264 } {64 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 2 1}
7265 do_test boundary1-2.63.ge.3 {
7267 SELECT a FROM t1 WHERE rowid >= -36028797018963969 ORDER BY rowid
7269 } {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 28 3}
7270 do_test boundary1-2.63.ge.4 {
7272 SELECT a FROM t1 WHERE rowid >= -36028797018963969 ORDER BY rowid DESC
7274 } {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 64 2}
7275 do_test boundary1-2.63.ge.5 {
7277 SELECT a FROM t1 WHERE rowid >= -36028797018963969 ORDER BY x
7279 } {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 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
7280 do_test boundary1-2.63.lt.1 {
7282 SELECT a FROM t1 WHERE rowid < -36028797018963969 ORDER BY a
7285 do_test boundary1-2.63.lt.2 {
7287 SELECT a FROM t1 WHERE rowid < -36028797018963969 ORDER BY a DESC
7290 do_test boundary1-2.63.lt.3 {
7292 SELECT a FROM t1 WHERE rowid < -36028797018963969 ORDER BY rowid
7295 do_test boundary1-2.63.lt.4 {
7297 SELECT a FROM t1 WHERE rowid < -36028797018963969 ORDER BY rowid DESC
7300 do_test boundary1-2.63.lt.5 {
7302 SELECT a FROM t1 WHERE rowid < -36028797018963969 ORDER BY x
7305 do_test boundary1-2.63.le.1 {
7307 SELECT a FROM t1 WHERE rowid <= -36028797018963969 ORDER BY a
7310 do_test boundary1-2.63.le.2 {
7312 SELECT a FROM t1 WHERE rowid <= -36028797018963969 ORDER BY a DESC
7315 do_test boundary1-2.63.le.3 {
7317 SELECT a FROM t1 WHERE rowid <= -36028797018963969 ORDER BY rowid
7320 do_test boundary1-2.63.le.4 {
7322 SELECT a FROM t1 WHERE rowid <= -36028797018963969 ORDER BY rowid DESC
7325 do_test boundary1-2.63.le.5 {
7327 SELECT a FROM t1 WHERE rowid <= -36028797018963969 ORDER BY x
7330 do_test boundary1-2.64.1 {
7332 SELECT * FROM t1 WHERE rowid=3
7334 } {5 0000000000000003}
7335 do_test boundary1-2.64.2 {
7337 SELECT rowid, a FROM t1 WHERE x='0000000000000003'
7340 do_test boundary1-2.64.3 {
7342 SELECT rowid, x FROM t1 WHERE a=5
7344 } {3 0000000000000003}
7345 do_test boundary1-2.64.gt.1 {
7347 SELECT a FROM t1 WHERE rowid > 3 ORDER BY a
7349 } {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}
7350 do_test boundary1-2.64.gt.2 {
7352 SELECT a FROM t1 WHERE rowid > 3 ORDER BY a DESC
7354 } {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}
7355 do_test boundary1-2.64.gt.3 {
7357 SELECT a FROM t1 WHERE rowid > 3 ORDER BY rowid
7359 } {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}
7360 do_test boundary1-2.64.gt.4 {
7362 SELECT a FROM t1 WHERE rowid > 3 ORDER BY rowid DESC
7364 } {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}
7365 do_test boundary1-2.64.gt.5 {
7367 SELECT a FROM t1 WHERE rowid > 3 ORDER BY x
7369 } {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}
7370 do_test boundary1-2.64.ge.1 {
7372 SELECT a FROM t1 WHERE rowid >= 3 ORDER BY a
7374 } {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}
7375 do_test boundary1-2.64.ge.2 {
7377 SELECT a FROM t1 WHERE rowid >= 3 ORDER BY a DESC
7379 } {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}
7380 do_test boundary1-2.64.ge.3 {
7382 SELECT a FROM t1 WHERE rowid >= 3 ORDER BY rowid
7384 } {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}
7385 do_test boundary1-2.64.ge.4 {
7387 SELECT a FROM t1 WHERE rowid >= 3 ORDER BY rowid DESC
7389 } {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}
7390 do_test boundary1-2.64.ge.5 {
7392 SELECT a FROM t1 WHERE rowid >= 3 ORDER BY x
7394 } {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}
7395 do_test boundary1-2.64.lt.1 {
7397 SELECT a FROM t1 WHERE rowid < 3 ORDER BY a
7399 } {1 2 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
7400 do_test boundary1-2.64.lt.2 {
7402 SELECT a FROM t1 WHERE rowid < 3 ORDER BY a DESC
7404 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 2 1}
7405 do_test boundary1-2.64.lt.3 {
7407 SELECT a FROM t1 WHERE rowid < 3 ORDER BY rowid
7409 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41}
7410 do_test boundary1-2.64.lt.4 {
7412 SELECT a FROM t1 WHERE rowid < 3 ORDER BY rowid DESC
7414 } {41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
7415 do_test boundary1-2.64.lt.5 {
7417 SELECT a FROM t1 WHERE rowid < 3 ORDER BY x
7419 } {59 60 41 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
7420 do_test boundary1-2.64.le.1 {
7422 SELECT a FROM t1 WHERE rowid <= 3 ORDER BY a
7424 } {1 2 5 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
7425 do_test boundary1-2.64.le.2 {
7427 SELECT a FROM t1 WHERE rowid <= 3 ORDER BY a DESC
7429 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 5 2 1}
7430 do_test boundary1-2.64.le.3 {
7432 SELECT a FROM t1 WHERE rowid <= 3 ORDER BY rowid
7434 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5}
7435 do_test boundary1-2.64.le.4 {
7437 SELECT a FROM t1 WHERE rowid <= 3 ORDER BY rowid DESC
7439 } {5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
7440 do_test boundary1-2.64.le.5 {
7442 SELECT a FROM t1 WHERE rowid <= 3 ORDER BY x
7444 } {59 60 41 5 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
7445 do_test boundary1-2.65.gt.1 {
7447 SELECT a FROM t1 WHERE rowid > 9.22337303685477580800e+18 ORDER BY a
7450 do_test boundary1-2.65.gt.2 {
7452 SELECT a FROM t1 WHERE rowid > 9.22337303685477580800e+18 ORDER BY a DESC
7455 do_test boundary1-2.65.gt.3 {
7457 SELECT a FROM t1 WHERE rowid > 9.22337303685477580800e+18 ORDER BY rowid
7460 do_test boundary1-2.65.gt.4 {
7462 SELECT a FROM t1 WHERE rowid > 9.22337303685477580800e+18 ORDER BY rowid DESC
7465 do_test boundary1-2.65.gt.5 {
7467 SELECT a FROM t1 WHERE rowid > 9.22337303685477580800e+18 ORDER BY x
7470 do_test boundary1-2.65.ge.1 {
7472 SELECT a FROM t1 WHERE rowid >= 9.22337303685477580800e+18 ORDER BY a
7475 do_test boundary1-2.65.ge.2 {
7477 SELECT a FROM t1 WHERE rowid >= 9.22337303685477580800e+18 ORDER BY a DESC
7480 do_test boundary1-2.65.ge.3 {
7482 SELECT a FROM t1 WHERE rowid >= 9.22337303685477580800e+18 ORDER BY rowid
7485 do_test boundary1-2.65.ge.4 {
7487 SELECT a FROM t1 WHERE rowid >= 9.22337303685477580800e+18 ORDER BY rowid DESC
7490 do_test boundary1-2.65.ge.5 {
7492 SELECT a FROM t1 WHERE rowid >= 9.22337303685477580800e+18 ORDER BY x
7495 do_test boundary1-2.65.lt.1 {
7497 SELECT a FROM t1 WHERE rowid < 9.22337303685477580800e+18 ORDER BY a
7499 } {1 2 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 55 56 57 58 59 60 61 62 63 64}
7500 do_test boundary1-2.65.lt.2 {
7502 SELECT a FROM t1 WHERE rowid < 9.22337303685477580800e+18 ORDER BY a DESC
7504 } {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 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 2 1}
7505 do_test boundary1-2.65.lt.3 {
7507 SELECT a FROM t1 WHERE rowid < 9.22337303685477580800e+18 ORDER BY rowid
7509 } {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 28 3}
7510 do_test boundary1-2.65.lt.4 {
7512 SELECT a FROM t1 WHERE rowid < 9.22337303685477580800e+18 ORDER BY rowid DESC
7514 } {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 64 2 55}
7515 do_test boundary1-2.65.lt.5 {
7517 SELECT a FROM t1 WHERE rowid < 9.22337303685477580800e+18 ORDER BY x
7519 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
7520 do_test boundary1-2.65.le.1 {
7522 SELECT a FROM t1 WHERE rowid <= 9.22337303685477580800e+18 ORDER BY a
7524 } {1 2 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 55 56 57 58 59 60 61 62 63 64}
7525 do_test boundary1-2.65.le.2 {
7527 SELECT a FROM t1 WHERE rowid <= 9.22337303685477580800e+18 ORDER BY a DESC
7529 } {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 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 2 1}
7530 do_test boundary1-2.65.le.3 {
7532 SELECT a FROM t1 WHERE rowid <= 9.22337303685477580800e+18 ORDER BY rowid
7534 } {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 28 3}
7535 do_test boundary1-2.65.le.4 {
7537 SELECT a FROM t1 WHERE rowid <= 9.22337303685477580800e+18 ORDER BY rowid DESC
7539 } {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 64 2 55}
7540 do_test boundary1-2.65.le.5 {
7542 SELECT a FROM t1 WHERE rowid <= 9.22337303685477580800e+18 ORDER BY x
7544 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
7545 do_test boundary1-2.66.gt.1 {
7547 SELECT a FROM t1 WHERE rowid > -9.22337303685477580800e+18 ORDER BY a
7549 } {1 2 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 55 56 57 58 59 60 61 62 63 64}
7550 do_test boundary1-2.66.gt.2 {
7552 SELECT a FROM t1 WHERE rowid > -9.22337303685477580800e+18 ORDER BY a DESC
7554 } {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 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 2 1}
7555 do_test boundary1-2.66.gt.3 {
7557 SELECT a FROM t1 WHERE rowid > -9.22337303685477580800e+18 ORDER BY rowid
7559 } {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 28 3}
7560 do_test boundary1-2.66.gt.4 {
7562 SELECT a FROM t1 WHERE rowid > -9.22337303685477580800e+18 ORDER BY rowid DESC
7564 } {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 64 2 55}
7565 do_test boundary1-2.66.gt.5 {
7567 SELECT a FROM t1 WHERE rowid > -9.22337303685477580800e+18 ORDER BY x
7569 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
7570 do_test boundary1-2.66.ge.1 {
7572 SELECT a FROM t1 WHERE rowid >= -9.22337303685477580800e+18 ORDER BY a
7574 } {1 2 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 55 56 57 58 59 60 61 62 63 64}
7575 do_test boundary1-2.66.ge.2 {
7577 SELECT a FROM t1 WHERE rowid >= -9.22337303685477580800e+18 ORDER BY a DESC
7579 } {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 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 2 1}
7580 do_test boundary1-2.66.ge.3 {
7582 SELECT a FROM t1 WHERE rowid >= -9.22337303685477580800e+18 ORDER BY rowid
7584 } {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 28 3}
7585 do_test boundary1-2.66.ge.4 {
7587 SELECT a FROM t1 WHERE rowid >= -9.22337303685477580800e+18 ORDER BY rowid DESC
7589 } {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 64 2 55}
7590 do_test boundary1-2.66.ge.5 {
7592 SELECT a FROM t1 WHERE rowid >= -9.22337303685477580800e+18 ORDER BY x
7594 } {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 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
7595 do_test boundary1-2.66.lt.1 {
7597 SELECT a FROM t1 WHERE rowid < -9.22337303685477580800e+18 ORDER BY a
7600 do_test boundary1-2.66.lt.2 {
7602 SELECT a FROM t1 WHERE rowid < -9.22337303685477580800e+18 ORDER BY a DESC
7605 do_test boundary1-2.66.lt.3 {
7607 SELECT a FROM t1 WHERE rowid < -9.22337303685477580800e+18 ORDER BY rowid
7610 do_test boundary1-2.66.lt.4 {
7612 SELECT a FROM t1 WHERE rowid < -9.22337303685477580800e+18 ORDER BY rowid DESC
7615 do_test boundary1-2.66.lt.5 {
7617 SELECT a FROM t1 WHERE rowid < -9.22337303685477580800e+18 ORDER BY x
7620 do_test boundary1-2.66.le.1 {
7622 SELECT a FROM t1 WHERE rowid <= -9.22337303685477580800e+18 ORDER BY a
7625 do_test boundary1-2.66.le.2 {
7627 SELECT a FROM t1 WHERE rowid <= -9.22337303685477580800e+18 ORDER BY a DESC
7630 do_test boundary1-2.66.le.3 {
7632 SELECT a FROM t1 WHERE rowid <= -9.22337303685477580800e+18 ORDER BY rowid
7635 do_test boundary1-2.66.le.4 {
7637 SELECT a FROM t1 WHERE rowid <= -9.22337303685477580800e+18 ORDER BY rowid DESC
7640 do_test boundary1-2.66.le.5 {
7642 SELECT a FROM t1 WHERE rowid <= -9.22337303685477580800e+18 ORDER BY x