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: boundary3.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 boundary3-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 boundary3-1.2 {
97 SELECT count(*) FROM t1
100 do_test boundary3-1.3 {
102 CREATE TABLE t2(r,a);
103 INSERT INTO t2 SELECT rowid, a FROM t1;
104 CREATE INDEX t2i1 ON t2(r);
105 CREATE INDEX t2i2 ON t2(a);
106 INSERT INTO t2 VALUES(9.22337303685477580800e+18,65);
107 INSERT INTO t2 VALUES(-9.22337303685477580800e+18,66);
108 SELECT count(*) FROM t2;
111 do_test boundary3-2.1.1 {
113 SELECT t1.* FROM t1, t2 WHERE t1.rowid=72057594037927935 AND t2.a=t1.a
115 } {17 00ffffffffffffff}
116 do_test boundary3-2.1.2 {
118 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='00ffffffffffffff'
120 } {72057594037927935 17}
121 do_test boundary3-2.1.3 {
123 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=17
125 } {72057594037927935 00ffffffffffffff}
126 do_test boundary3-2.1.gt.1 {
128 SELECT t2.a FROM t1 JOIN t2 USING(a)
129 WHERE t1.rowid > 72057594037927935 ORDER BY t2.a
132 do_test boundary3-2.1.gt.2 {
134 SELECT t2.a FROM t2 NATURAL JOIN t1
135 WHERE t1.rowid > 72057594037927935 ORDER BY t1.a DESC
138 do_test boundary3-2.1.gt.3 {
140 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
145 do_test boundary3-2.1.gt.4 {
147 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
149 ORDER BY t1.rowid DESC
152 do_test boundary3-2.1.gt.5 {
154 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
159 do_test boundary3-2.1.ge.1 {
161 SELECT t2.a FROM t1 JOIN t2 USING(a)
162 WHERE t1.rowid >= 72057594037927935 ORDER BY t2.a
165 do_test boundary3-2.1.ge.2 {
167 SELECT t2.a FROM t2 NATURAL JOIN t1
168 WHERE t1.rowid >= 72057594037927935 ORDER BY t1.a DESC
171 do_test boundary3-2.1.ge.3 {
173 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
178 do_test boundary3-2.1.ge.4 {
180 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
182 ORDER BY t1.rowid DESC
185 do_test boundary3-2.1.ge.5 {
187 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
192 do_test boundary3-2.1.lt.1 {
194 SELECT t2.a FROM t1 JOIN t2 USING(a)
195 WHERE t1.rowid < 72057594037927935 ORDER BY t2.a
197 } {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}
198 do_test boundary3-2.1.lt.2 {
200 SELECT t2.a FROM t2 NATURAL JOIN t1
201 WHERE t1.rowid < 72057594037927935 ORDER BY t1.a DESC
203 } {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}
204 do_test boundary3-2.1.lt.3 {
206 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
210 } {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}
211 do_test boundary3-2.1.lt.4 {
213 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
215 ORDER BY t1.rowid DESC
217 } {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}
218 do_test boundary3-2.1.lt.5 {
220 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
224 } {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}
225 do_test boundary3-2.1.le.1 {
227 SELECT t2.a FROM t1 JOIN t2 USING(a)
228 WHERE t1.rowid <= 72057594037927935 ORDER BY t2.a
230 } {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}
231 do_test boundary3-2.1.le.2 {
233 SELECT t2.a FROM t2 NATURAL JOIN t1
234 WHERE t1.rowid <= 72057594037927935 ORDER BY t1.a DESC
236 } {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}
237 do_test boundary3-2.1.le.3 {
239 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
243 } {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}
244 do_test boundary3-2.1.le.4 {
246 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
248 ORDER BY t1.rowid DESC
250 } {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}
251 do_test boundary3-2.1.le.5 {
253 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
257 } {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}
258 do_test boundary3-2.2.1 {
260 SELECT t1.* FROM t1, t2 WHERE t1.rowid=16384 AND t2.a=t1.a
262 } {16 0000000000004000}
263 do_test boundary3-2.2.2 {
265 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000000004000'
268 do_test boundary3-2.2.3 {
270 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=16
272 } {16384 0000000000004000}
273 do_test boundary3-2.2.gt.1 {
275 SELECT t2.a FROM t1 JOIN t2 USING(a)
276 WHERE t1.rowid > 16384 ORDER BY t2.a
278 } {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}
279 do_test boundary3-2.2.gt.2 {
281 SELECT t2.a FROM t2 NATURAL JOIN t1
282 WHERE t1.rowid > 16384 ORDER BY t1.a DESC
284 } {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}
285 do_test boundary3-2.2.gt.3 {
287 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
291 } {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}
292 do_test boundary3-2.2.gt.4 {
294 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
296 ORDER BY t1.rowid DESC
298 } {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}
299 do_test boundary3-2.2.gt.5 {
301 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
305 } {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}
306 do_test boundary3-2.2.gt.10 {
308 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
312 } {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}
313 do_test boundary3-2.2.gt.11 {
315 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
317 ORDER BY t1.rowid DESC
319 } {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}
320 do_test boundary3-2.2.ge.1 {
322 SELECT t2.a FROM t1 JOIN t2 USING(a)
323 WHERE t1.rowid >= 16384 ORDER BY t2.a
325 } {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}
326 do_test boundary3-2.2.ge.2 {
328 SELECT t2.a FROM t2 NATURAL JOIN t1
329 WHERE t1.rowid >= 16384 ORDER BY t1.a DESC
331 } {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}
332 do_test boundary3-2.2.ge.3 {
334 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
338 } {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}
339 do_test boundary3-2.2.ge.4 {
341 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
343 ORDER BY t1.rowid DESC
345 } {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}
346 do_test boundary3-2.2.ge.5 {
348 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
352 } {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}
353 do_test boundary3-2.2.ge.10 {
355 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
359 } {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}
360 do_test boundary3-2.2.ge.11 {
362 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
364 ORDER BY t1.rowid DESC
366 } {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}
367 do_test boundary3-2.2.lt.1 {
369 SELECT t2.a FROM t1 JOIN t2 USING(a)
370 WHERE t1.rowid < 16384 ORDER BY t2.a
372 } {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}
373 do_test boundary3-2.2.lt.2 {
375 SELECT t2.a FROM t2 NATURAL JOIN t1
376 WHERE t1.rowid < 16384 ORDER BY t1.a DESC
378 } {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}
379 do_test boundary3-2.2.lt.3 {
381 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
385 } {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}
386 do_test boundary3-2.2.lt.4 {
388 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
390 ORDER BY t1.rowid DESC
392 } {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}
393 do_test boundary3-2.2.lt.5 {
395 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
399 } {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}
400 do_test boundary3-2.2.lt.10 {
402 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
406 } {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}
407 do_test boundary3-2.2.lt.11 {
409 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
411 ORDER BY t1.rowid DESC
413 } {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}
414 do_test boundary3-2.2.le.1 {
416 SELECT t2.a FROM t1 JOIN t2 USING(a)
417 WHERE t1.rowid <= 16384 ORDER BY t2.a
419 } {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}
420 do_test boundary3-2.2.le.2 {
422 SELECT t2.a FROM t2 NATURAL JOIN t1
423 WHERE t1.rowid <= 16384 ORDER BY t1.a DESC
425 } {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}
426 do_test boundary3-2.2.le.3 {
428 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
432 } {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}
433 do_test boundary3-2.2.le.4 {
435 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
437 ORDER BY t1.rowid DESC
439 } {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 boundary3-2.2.le.5 {
442 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
446 } {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}
447 do_test boundary3-2.2.le.10 {
449 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
453 } {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}
454 do_test boundary3-2.2.le.11 {
456 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
458 ORDER BY t1.rowid DESC
460 } {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}
461 do_test boundary3-2.3.1 {
463 SELECT t1.* FROM t1, t2 WHERE t1.rowid=4294967296 AND t2.a=t1.a
465 } {36 0000000100000000}
466 do_test boundary3-2.3.2 {
468 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000100000000'
471 do_test boundary3-2.3.3 {
473 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=36
475 } {4294967296 0000000100000000}
476 do_test boundary3-2.3.gt.1 {
478 SELECT t2.a FROM t1 JOIN t2 USING(a)
479 WHERE t1.rowid > 4294967296 ORDER BY t2.a
481 } {3 7 10 13 17 19 22 25 26 27 28 34 35 39 43 45 46 56 57}
482 do_test boundary3-2.3.gt.2 {
484 SELECT t2.a FROM t2 NATURAL JOIN t1
485 WHERE t1.rowid > 4294967296 ORDER BY t1.a DESC
487 } {57 56 46 45 43 39 35 34 28 27 26 25 22 19 17 13 10 7 3}
488 do_test boundary3-2.3.gt.3 {
490 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
494 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
495 do_test boundary3-2.3.gt.4 {
497 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
499 ORDER BY t1.rowid DESC
501 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39}
502 do_test boundary3-2.3.gt.5 {
504 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
508 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
509 do_test boundary3-2.3.gt.10 {
511 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
515 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
516 do_test boundary3-2.3.gt.11 {
518 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
520 ORDER BY t1.rowid DESC
522 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39}
523 do_test boundary3-2.3.ge.1 {
525 SELECT t2.a FROM t1 JOIN t2 USING(a)
526 WHERE t1.rowid >= 4294967296 ORDER BY t2.a
528 } {3 7 10 13 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
529 do_test boundary3-2.3.ge.2 {
531 SELECT t2.a FROM t2 NATURAL JOIN t1
532 WHERE t1.rowid >= 4294967296 ORDER BY t1.a DESC
534 } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 13 10 7 3}
535 do_test boundary3-2.3.ge.3 {
537 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
541 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
542 do_test boundary3-2.3.ge.4 {
544 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
546 ORDER BY t1.rowid DESC
548 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36}
549 do_test boundary3-2.3.ge.5 {
551 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
555 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
556 do_test boundary3-2.3.ge.10 {
558 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
562 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
563 do_test boundary3-2.3.ge.11 {
565 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
567 ORDER BY t1.rowid DESC
569 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36}
570 do_test boundary3-2.3.lt.1 {
572 SELECT t2.a FROM t1 JOIN t2 USING(a)
573 WHERE t1.rowid < 4294967296 ORDER BY t2.a
575 } {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}
576 do_test boundary3-2.3.lt.2 {
578 SELECT t2.a FROM t2 NATURAL JOIN t1
579 WHERE t1.rowid < 4294967296 ORDER BY t1.a DESC
581 } {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}
582 do_test boundary3-2.3.lt.3 {
584 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
588 } {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}
589 do_test boundary3-2.3.lt.4 {
591 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
593 ORDER BY t1.rowid DESC
595 } {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}
596 do_test boundary3-2.3.lt.5 {
598 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
602 } {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}
603 do_test boundary3-2.3.lt.10 {
605 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
609 } {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}
610 do_test boundary3-2.3.lt.11 {
612 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
614 ORDER BY t1.rowid DESC
616 } {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}
617 do_test boundary3-2.3.le.1 {
619 SELECT t2.a FROM t1 JOIN t2 USING(a)
620 WHERE t1.rowid <= 4294967296 ORDER BY t2.a
622 } {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}
623 do_test boundary3-2.3.le.2 {
625 SELECT t2.a FROM t2 NATURAL JOIN t1
626 WHERE t1.rowid <= 4294967296 ORDER BY t1.a DESC
628 } {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}
629 do_test boundary3-2.3.le.3 {
631 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
635 } {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}
636 do_test boundary3-2.3.le.4 {
638 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
640 ORDER BY t1.rowid DESC
642 } {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}
643 do_test boundary3-2.3.le.5 {
645 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
649 } {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}
650 do_test boundary3-2.3.le.10 {
652 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
656 } {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}
657 do_test boundary3-2.3.le.11 {
659 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
661 ORDER BY t1.rowid DESC
663 } {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}
664 do_test boundary3-2.4.1 {
666 SELECT t1.* FROM t1, t2 WHERE t1.rowid=16777216 AND t2.a=t1.a
668 } {6 0000000001000000}
669 do_test boundary3-2.4.2 {
671 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000001000000'
674 do_test boundary3-2.4.3 {
676 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=6
678 } {16777216 0000000001000000}
679 do_test boundary3-2.4.gt.1 {
681 SELECT t2.a FROM t1 JOIN t2 USING(a)
682 WHERE t1.rowid > 16777216 ORDER BY t2.a
684 } {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}
685 do_test boundary3-2.4.gt.2 {
687 SELECT t2.a FROM t2 NATURAL JOIN t1
688 WHERE t1.rowid > 16777216 ORDER BY t1.a DESC
690 } {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}
691 do_test boundary3-2.4.gt.3 {
693 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
697 } {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}
698 do_test boundary3-2.4.gt.4 {
700 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
702 ORDER BY t1.rowid DESC
704 } {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}
705 do_test boundary3-2.4.gt.5 {
707 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
711 } {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}
712 do_test boundary3-2.4.gt.10 {
714 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
718 } {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}
719 do_test boundary3-2.4.gt.11 {
721 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
723 ORDER BY t1.rowid DESC
725 } {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}
726 do_test boundary3-2.4.ge.1 {
728 SELECT t2.a FROM t1 JOIN t2 USING(a)
729 WHERE t1.rowid >= 16777216 ORDER BY t2.a
731 } {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}
732 do_test boundary3-2.4.ge.2 {
734 SELECT t2.a FROM t2 NATURAL JOIN t1
735 WHERE t1.rowid >= 16777216 ORDER BY t1.a DESC
737 } {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}
738 do_test boundary3-2.4.ge.3 {
740 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
744 } {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}
745 do_test boundary3-2.4.ge.4 {
747 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
749 ORDER BY t1.rowid DESC
751 } {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}
752 do_test boundary3-2.4.ge.5 {
754 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
758 } {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}
759 do_test boundary3-2.4.ge.10 {
761 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
765 } {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}
766 do_test boundary3-2.4.ge.11 {
768 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
770 ORDER BY t1.rowid DESC
772 } {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}
773 do_test boundary3-2.4.lt.1 {
775 SELECT t2.a FROM t1 JOIN t2 USING(a)
776 WHERE t1.rowid < 16777216 ORDER BY t2.a
778 } {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}
779 do_test boundary3-2.4.lt.2 {
781 SELECT t2.a FROM t2 NATURAL JOIN t1
782 WHERE t1.rowid < 16777216 ORDER BY t1.a DESC
784 } {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}
785 do_test boundary3-2.4.lt.3 {
787 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
791 } {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}
792 do_test boundary3-2.4.lt.4 {
794 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
796 ORDER BY t1.rowid DESC
798 } {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}
799 do_test boundary3-2.4.lt.5 {
801 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
805 } {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}
806 do_test boundary3-2.4.lt.10 {
808 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
812 } {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}
813 do_test boundary3-2.4.lt.11 {
815 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
817 ORDER BY t1.rowid DESC
819 } {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}
820 do_test boundary3-2.4.le.1 {
822 SELECT t2.a FROM t1 JOIN t2 USING(a)
823 WHERE t1.rowid <= 16777216 ORDER BY t2.a
825 } {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}
826 do_test boundary3-2.4.le.2 {
828 SELECT t2.a FROM t2 NATURAL JOIN t1
829 WHERE t1.rowid <= 16777216 ORDER BY t1.a DESC
831 } {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}
832 do_test boundary3-2.4.le.3 {
834 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
838 } {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}
839 do_test boundary3-2.4.le.4 {
841 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
843 ORDER BY t1.rowid DESC
845 } {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}
846 do_test boundary3-2.4.le.5 {
848 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
852 } {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}
853 do_test boundary3-2.4.le.10 {
855 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
859 } {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}
860 do_test boundary3-2.4.le.11 {
862 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
864 ORDER BY t1.rowid DESC
866 } {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}
867 do_test boundary3-2.5.1 {
869 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-32769 AND t2.a=t1.a
871 } {29 ffffffffffff7fff}
872 do_test boundary3-2.5.2 {
874 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='ffffffffffff7fff'
877 do_test boundary3-2.5.3 {
879 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=29
881 } {-32769 ffffffffffff7fff}
882 do_test boundary3-2.5.gt.1 {
884 SELECT t2.a FROM t1 JOIN t2 USING(a)
885 WHERE t1.rowid > -32769 ORDER BY t2.a
887 } {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}
888 do_test boundary3-2.5.gt.2 {
890 SELECT t2.a FROM t2 NATURAL JOIN t1
891 WHERE t1.rowid > -32769 ORDER BY t1.a DESC
893 } {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}
894 do_test boundary3-2.5.gt.3 {
896 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
900 } {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}
901 do_test boundary3-2.5.gt.4 {
903 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
905 ORDER BY t1.rowid DESC
907 } {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}
908 do_test boundary3-2.5.gt.5 {
910 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
914 } {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}
915 do_test boundary3-2.5.gt.10 {
917 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
921 } {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}
922 do_test boundary3-2.5.gt.11 {
924 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
926 ORDER BY t1.rowid DESC
928 } {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}
929 do_test boundary3-2.5.ge.1 {
931 SELECT t2.a FROM t1 JOIN t2 USING(a)
932 WHERE t1.rowid >= -32769 ORDER BY t2.a
934 } {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}
935 do_test boundary3-2.5.ge.2 {
937 SELECT t2.a FROM t2 NATURAL JOIN t1
938 WHERE t1.rowid >= -32769 ORDER BY t1.a DESC
940 } {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}
941 do_test boundary3-2.5.ge.3 {
943 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
947 } {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}
948 do_test boundary3-2.5.ge.4 {
950 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
952 ORDER BY t1.rowid DESC
954 } {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}
955 do_test boundary3-2.5.ge.5 {
957 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
961 } {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}
962 do_test boundary3-2.5.ge.10 {
964 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
968 } {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}
969 do_test boundary3-2.5.ge.11 {
971 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
973 ORDER BY t1.rowid DESC
975 } {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}
976 do_test boundary3-2.5.lt.1 {
978 SELECT t2.a FROM t1 JOIN t2 USING(a)
979 WHERE t1.rowid < -32769 ORDER BY t2.a
981 } {1 2 11 21 37 44 47 55 58 63 64}
982 do_test boundary3-2.5.lt.2 {
984 SELECT t2.a FROM t2 NATURAL JOIN t1
985 WHERE t1.rowid < -32769 ORDER BY t1.a DESC
987 } {64 63 58 55 47 44 37 21 11 2 1}
988 do_test boundary3-2.5.lt.3 {
990 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
994 } {55 2 64 21 44 58 63 47 11 1 37}
995 do_test boundary3-2.5.lt.4 {
997 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
999 ORDER BY t1.rowid DESC
1001 } {37 1 11 47 63 58 44 21 64 2 55}
1002 do_test boundary3-2.5.lt.5 {
1004 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
1008 } {55 2 64 21 44 58 63 47 11 1 37}
1009 do_test boundary3-2.5.lt.10 {
1011 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
1015 } {55 2 64 21 44 58 63 47 11 1 37}
1016 do_test boundary3-2.5.lt.11 {
1018 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
1020 ORDER BY t1.rowid DESC
1022 } {37 1 11 47 63 58 44 21 64 2 55}
1023 do_test boundary3-2.5.le.1 {
1025 SELECT t2.a FROM t1 JOIN t2 USING(a)
1026 WHERE t1.rowid <= -32769 ORDER BY t2.a
1028 } {1 2 11 21 29 37 44 47 55 58 63 64}
1029 do_test boundary3-2.5.le.2 {
1031 SELECT t2.a FROM t2 NATURAL JOIN t1
1032 WHERE t1.rowid <= -32769 ORDER BY t1.a DESC
1034 } {64 63 58 55 47 44 37 29 21 11 2 1}
1035 do_test boundary3-2.5.le.3 {
1037 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1041 } {55 2 64 21 44 58 63 47 11 1 37 29}
1042 do_test boundary3-2.5.le.4 {
1044 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1046 ORDER BY t1.rowid DESC
1048 } {29 37 1 11 47 63 58 44 21 64 2 55}
1049 do_test boundary3-2.5.le.5 {
1051 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1055 } {55 2 64 21 44 58 63 47 11 1 37 29}
1056 do_test boundary3-2.5.le.10 {
1058 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
1062 } {55 2 64 21 44 58 63 47 11 1 37 29}
1063 do_test boundary3-2.5.le.11 {
1065 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
1067 ORDER BY t1.rowid DESC
1069 } {29 37 1 11 47 63 58 44 21 64 2 55}
1070 do_test boundary3-2.6.1 {
1072 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-140737488355329 AND t2.a=t1.a
1074 } {21 ffff7fffffffffff}
1075 do_test boundary3-2.6.2 {
1077 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='ffff7fffffffffff'
1079 } {-140737488355329 21}
1080 do_test boundary3-2.6.3 {
1082 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=21
1084 } {-140737488355329 ffff7fffffffffff}
1085 do_test boundary3-2.6.gt.1 {
1087 SELECT t2.a FROM t1 JOIN t2 USING(a)
1088 WHERE t1.rowid > -140737488355329 ORDER BY t2.a
1090 } {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}
1091 do_test boundary3-2.6.gt.2 {
1093 SELECT t2.a FROM t2 NATURAL JOIN t1
1094 WHERE t1.rowid > -140737488355329 ORDER BY t1.a DESC
1096 } {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}
1097 do_test boundary3-2.6.gt.3 {
1099 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
1103 } {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}
1104 do_test boundary3-2.6.gt.4 {
1106 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
1108 ORDER BY t1.rowid DESC
1110 } {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}
1111 do_test boundary3-2.6.gt.5 {
1113 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
1117 } {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}
1118 do_test boundary3-2.6.ge.1 {
1120 SELECT t2.a FROM t1 JOIN t2 USING(a)
1121 WHERE t1.rowid >= -140737488355329 ORDER BY t2.a
1123 } {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}
1124 do_test boundary3-2.6.ge.2 {
1126 SELECT t2.a FROM t2 NATURAL JOIN t1
1127 WHERE t1.rowid >= -140737488355329 ORDER BY t1.a DESC
1129 } {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}
1130 do_test boundary3-2.6.ge.3 {
1132 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
1136 } {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}
1137 do_test boundary3-2.6.ge.4 {
1139 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
1141 ORDER BY t1.rowid DESC
1143 } {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}
1144 do_test boundary3-2.6.ge.5 {
1146 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
1150 } {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}
1151 do_test boundary3-2.6.lt.1 {
1153 SELECT t2.a FROM t1 JOIN t2 USING(a)
1154 WHERE t1.rowid < -140737488355329 ORDER BY t2.a
1157 do_test boundary3-2.6.lt.2 {
1159 SELECT t2.a FROM t2 NATURAL JOIN t1
1160 WHERE t1.rowid < -140737488355329 ORDER BY t1.a DESC
1163 do_test boundary3-2.6.lt.3 {
1165 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
1170 do_test boundary3-2.6.lt.4 {
1172 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
1174 ORDER BY t1.rowid DESC
1177 do_test boundary3-2.6.lt.5 {
1179 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
1184 do_test boundary3-2.6.le.1 {
1186 SELECT t2.a FROM t1 JOIN t2 USING(a)
1187 WHERE t1.rowid <= -140737488355329 ORDER BY t2.a
1190 do_test boundary3-2.6.le.2 {
1192 SELECT t2.a FROM t2 NATURAL JOIN t1
1193 WHERE t1.rowid <= -140737488355329 ORDER BY t1.a DESC
1196 do_test boundary3-2.6.le.3 {
1198 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1203 do_test boundary3-2.6.le.4 {
1205 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1207 ORDER BY t1.rowid DESC
1210 do_test boundary3-2.6.le.5 {
1212 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1217 do_test boundary3-2.7.1 {
1219 SELECT t1.* FROM t1, t2 WHERE t1.rowid=2 AND t2.a=t1.a
1221 } {41 0000000000000002}
1222 do_test boundary3-2.7.2 {
1224 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000000000002'
1227 do_test boundary3-2.7.3 {
1229 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=41
1231 } {2 0000000000000002}
1232 do_test boundary3-2.7.gt.1 {
1234 SELECT t2.a FROM t1 JOIN t2 USING(a)
1235 WHERE t1.rowid > 2 ORDER BY t2.a
1237 } {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}
1238 do_test boundary3-2.7.gt.2 {
1240 SELECT t2.a FROM t2 NATURAL JOIN t1
1241 WHERE t1.rowid > 2 ORDER BY t1.a DESC
1243 } {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}
1244 do_test boundary3-2.7.gt.3 {
1246 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
1250 } {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}
1251 do_test boundary3-2.7.gt.4 {
1253 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
1255 ORDER BY t1.rowid DESC
1257 } {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}
1258 do_test boundary3-2.7.gt.5 {
1260 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
1264 } {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}
1265 do_test boundary3-2.7.gt.10 {
1267 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
1271 } {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}
1272 do_test boundary3-2.7.gt.11 {
1274 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
1276 ORDER BY t1.rowid DESC
1278 } {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}
1279 do_test boundary3-2.7.ge.1 {
1281 SELECT t2.a FROM t1 JOIN t2 USING(a)
1282 WHERE t1.rowid >= 2 ORDER BY t2.a
1284 } {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}
1285 do_test boundary3-2.7.ge.2 {
1287 SELECT t2.a FROM t2 NATURAL JOIN t1
1288 WHERE t1.rowid >= 2 ORDER BY t1.a DESC
1290 } {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}
1291 do_test boundary3-2.7.ge.3 {
1293 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
1297 } {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}
1298 do_test boundary3-2.7.ge.4 {
1300 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
1302 ORDER BY t1.rowid DESC
1304 } {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}
1305 do_test boundary3-2.7.ge.5 {
1307 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
1311 } {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}
1312 do_test boundary3-2.7.ge.10 {
1314 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
1318 } {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}
1319 do_test boundary3-2.7.ge.11 {
1321 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
1323 ORDER BY t1.rowid DESC
1325 } {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}
1326 do_test boundary3-2.7.lt.1 {
1328 SELECT t2.a FROM t1 JOIN t2 USING(a)
1329 WHERE t1.rowid < 2 ORDER BY t2.a
1331 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 60 63 64}
1332 do_test boundary3-2.7.lt.2 {
1334 SELECT t2.a FROM t2 NATURAL JOIN t1
1335 WHERE t1.rowid < 2 ORDER BY t1.a DESC
1337 } {64 63 60 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
1338 do_test boundary3-2.7.lt.3 {
1340 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
1344 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60}
1345 do_test boundary3-2.7.lt.4 {
1347 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
1349 ORDER BY t1.rowid DESC
1351 } {60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
1352 do_test boundary3-2.7.lt.5 {
1354 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
1358 } {59 60 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
1359 do_test boundary3-2.7.lt.10 {
1361 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
1365 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60}
1366 do_test boundary3-2.7.lt.11 {
1368 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
1370 ORDER BY t1.rowid DESC
1372 } {60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
1373 do_test boundary3-2.7.le.1 {
1375 SELECT t2.a FROM t1 JOIN t2 USING(a)
1376 WHERE t1.rowid <= 2 ORDER BY t2.a
1378 } {1 2 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
1379 do_test boundary3-2.7.le.2 {
1381 SELECT t2.a FROM t2 NATURAL JOIN t1
1382 WHERE t1.rowid <= 2 ORDER BY t1.a DESC
1384 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 2 1}
1385 do_test boundary3-2.7.le.3 {
1387 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1391 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41}
1392 do_test boundary3-2.7.le.4 {
1394 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1396 ORDER BY t1.rowid DESC
1398 } {41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
1399 do_test boundary3-2.7.le.5 {
1401 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1405 } {59 60 41 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
1406 do_test boundary3-2.7.le.10 {
1408 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
1412 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41}
1413 do_test boundary3-2.7.le.11 {
1415 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
1417 ORDER BY t1.rowid DESC
1419 } {41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
1420 do_test boundary3-2.8.1 {
1422 SELECT t1.* FROM t1, t2 WHERE t1.rowid=4 AND t2.a=t1.a
1424 } {31 0000000000000004}
1425 do_test boundary3-2.8.2 {
1427 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000000000004'
1430 do_test boundary3-2.8.3 {
1432 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=31
1434 } {4 0000000000000004}
1435 do_test boundary3-2.8.gt.1 {
1437 SELECT t2.a FROM t1 JOIN t2 USING(a)
1438 WHERE t1.rowid > 4 ORDER BY t2.a
1440 } {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}
1441 do_test boundary3-2.8.gt.2 {
1443 SELECT t2.a FROM t2 NATURAL JOIN t1
1444 WHERE t1.rowid > 4 ORDER BY t1.a DESC
1446 } {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}
1447 do_test boundary3-2.8.gt.3 {
1449 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
1453 } {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}
1454 do_test boundary3-2.8.gt.4 {
1456 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
1458 ORDER BY t1.rowid DESC
1460 } {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}
1461 do_test boundary3-2.8.gt.5 {
1463 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
1467 } {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}
1468 do_test boundary3-2.8.gt.10 {
1470 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
1474 } {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}
1475 do_test boundary3-2.8.gt.11 {
1477 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
1479 ORDER BY t1.rowid DESC
1481 } {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}
1482 do_test boundary3-2.8.ge.1 {
1484 SELECT t2.a FROM t1 JOIN t2 USING(a)
1485 WHERE t1.rowid >= 4 ORDER BY t2.a
1487 } {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}
1488 do_test boundary3-2.8.ge.2 {
1490 SELECT t2.a FROM t2 NATURAL JOIN t1
1491 WHERE t1.rowid >= 4 ORDER BY t1.a DESC
1493 } {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}
1494 do_test boundary3-2.8.ge.3 {
1496 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
1500 } {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}
1501 do_test boundary3-2.8.ge.4 {
1503 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
1505 ORDER BY t1.rowid DESC
1507 } {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}
1508 do_test boundary3-2.8.ge.5 {
1510 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
1514 } {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}
1515 do_test boundary3-2.8.ge.10 {
1517 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
1521 } {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}
1522 do_test boundary3-2.8.ge.11 {
1524 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
1526 ORDER BY t1.rowid DESC
1528 } {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}
1529 do_test boundary3-2.8.lt.1 {
1531 SELECT t2.a FROM t1 JOIN t2 USING(a)
1532 WHERE t1.rowid < 4 ORDER BY t2.a
1534 } {1 2 5 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
1535 do_test boundary3-2.8.lt.2 {
1537 SELECT t2.a FROM t2 NATURAL JOIN t1
1538 WHERE t1.rowid < 4 ORDER BY t1.a DESC
1540 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 5 2 1}
1541 do_test boundary3-2.8.lt.3 {
1543 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
1547 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5}
1548 do_test boundary3-2.8.lt.4 {
1550 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
1552 ORDER BY t1.rowid DESC
1554 } {5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
1555 do_test boundary3-2.8.lt.5 {
1557 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
1561 } {59 60 41 5 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
1562 do_test boundary3-2.8.lt.10 {
1564 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
1568 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5}
1569 do_test boundary3-2.8.lt.11 {
1571 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
1573 ORDER BY t1.rowid DESC
1575 } {5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
1576 do_test boundary3-2.8.le.1 {
1578 SELECT t2.a FROM t1 JOIN t2 USING(a)
1579 WHERE t1.rowid <= 4 ORDER BY t2.a
1581 } {1 2 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
1582 do_test boundary3-2.8.le.2 {
1584 SELECT t2.a FROM t2 NATURAL JOIN t1
1585 WHERE t1.rowid <= 4 ORDER BY t1.a DESC
1587 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 2 1}
1588 do_test boundary3-2.8.le.3 {
1590 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1594 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31}
1595 do_test boundary3-2.8.le.4 {
1597 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1599 ORDER BY t1.rowid DESC
1601 } {31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
1602 do_test boundary3-2.8.le.5 {
1604 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1608 } {59 60 41 5 31 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
1609 do_test boundary3-2.8.le.10 {
1611 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
1615 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31}
1616 do_test boundary3-2.8.le.11 {
1618 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
1620 ORDER BY t1.rowid DESC
1622 } {31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
1623 do_test boundary3-2.9.1 {
1625 SELECT t1.* FROM t1, t2 WHERE t1.rowid=562949953421311 AND t2.a=t1.a
1627 } {13 0001ffffffffffff}
1628 do_test boundary3-2.9.2 {
1630 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0001ffffffffffff'
1632 } {562949953421311 13}
1633 do_test boundary3-2.9.3 {
1635 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=13
1637 } {562949953421311 0001ffffffffffff}
1638 do_test boundary3-2.9.gt.1 {
1640 SELECT t2.a FROM t1 JOIN t2 USING(a)
1641 WHERE t1.rowid > 562949953421311 ORDER BY t2.a
1643 } {3 17 27 28 43 45}
1644 do_test boundary3-2.9.gt.2 {
1646 SELECT t2.a FROM t2 NATURAL JOIN t1
1647 WHERE t1.rowid > 562949953421311 ORDER BY t1.a DESC
1649 } {45 43 28 27 17 3}
1650 do_test boundary3-2.9.gt.3 {
1652 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
1656 } {43 27 45 17 28 3}
1657 do_test boundary3-2.9.gt.4 {
1659 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
1661 ORDER BY t1.rowid DESC
1663 } {3 28 17 45 27 43}
1664 do_test boundary3-2.9.gt.5 {
1666 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
1670 } {43 27 45 17 28 3}
1671 do_test boundary3-2.9.ge.1 {
1673 SELECT t2.a FROM t1 JOIN t2 USING(a)
1674 WHERE t1.rowid >= 562949953421311 ORDER BY t2.a
1676 } {3 13 17 27 28 43 45}
1677 do_test boundary3-2.9.ge.2 {
1679 SELECT t2.a FROM t2 NATURAL JOIN t1
1680 WHERE t1.rowid >= 562949953421311 ORDER BY t1.a DESC
1682 } {45 43 28 27 17 13 3}
1683 do_test boundary3-2.9.ge.3 {
1685 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
1689 } {13 43 27 45 17 28 3}
1690 do_test boundary3-2.9.ge.4 {
1692 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
1694 ORDER BY t1.rowid DESC
1696 } {3 28 17 45 27 43 13}
1697 do_test boundary3-2.9.ge.5 {
1699 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
1703 } {13 43 27 45 17 28 3}
1704 do_test boundary3-2.9.lt.1 {
1706 SELECT t2.a FROM t1 JOIN t2 USING(a)
1707 WHERE t1.rowid < 562949953421311 ORDER BY t2.a
1709 } {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}
1710 do_test boundary3-2.9.lt.2 {
1712 SELECT t2.a FROM t2 NATURAL JOIN t1
1713 WHERE t1.rowid < 562949953421311 ORDER BY t1.a DESC
1715 } {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}
1716 do_test boundary3-2.9.lt.3 {
1718 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
1722 } {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}
1723 do_test boundary3-2.9.lt.4 {
1725 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
1727 ORDER BY t1.rowid DESC
1729 } {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}
1730 do_test boundary3-2.9.lt.5 {
1732 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
1736 } {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}
1737 do_test boundary3-2.9.le.1 {
1739 SELECT t2.a FROM t1 JOIN t2 USING(a)
1740 WHERE t1.rowid <= 562949953421311 ORDER BY t2.a
1742 } {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}
1743 do_test boundary3-2.9.le.2 {
1745 SELECT t2.a FROM t2 NATURAL JOIN t1
1746 WHERE t1.rowid <= 562949953421311 ORDER BY t1.a DESC
1748 } {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}
1749 do_test boundary3-2.9.le.3 {
1751 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1755 } {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}
1756 do_test boundary3-2.9.le.4 {
1758 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1760 ORDER BY t1.rowid DESC
1762 } {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}
1763 do_test boundary3-2.9.le.5 {
1765 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1769 } {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}
1770 do_test boundary3-2.10.1 {
1772 SELECT t1.* FROM t1, t2 WHERE t1.rowid=256 AND t2.a=t1.a
1774 } {61 0000000000000100}
1775 do_test boundary3-2.10.2 {
1777 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000000000100'
1780 do_test boundary3-2.10.3 {
1782 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=61
1784 } {256 0000000000000100}
1785 do_test boundary3-2.10.gt.1 {
1787 SELECT t2.a FROM t1 JOIN t2 USING(a)
1788 WHERE t1.rowid > 256 ORDER BY t2.a
1790 } {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}
1791 do_test boundary3-2.10.gt.2 {
1793 SELECT t2.a FROM t2 NATURAL JOIN t1
1794 WHERE t1.rowid > 256 ORDER BY t1.a DESC
1796 } {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}
1797 do_test boundary3-2.10.gt.3 {
1799 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
1803 } {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}
1804 do_test boundary3-2.10.gt.4 {
1806 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
1808 ORDER BY t1.rowid DESC
1810 } {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}
1811 do_test boundary3-2.10.gt.5 {
1813 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
1817 } {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}
1818 do_test boundary3-2.10.gt.10 {
1820 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
1824 } {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}
1825 do_test boundary3-2.10.gt.11 {
1827 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
1829 ORDER BY t1.rowid DESC
1831 } {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}
1832 do_test boundary3-2.10.ge.1 {
1834 SELECT t2.a FROM t1 JOIN t2 USING(a)
1835 WHERE t1.rowid >= 256 ORDER BY t2.a
1837 } {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}
1838 do_test boundary3-2.10.ge.2 {
1840 SELECT t2.a FROM t2 NATURAL JOIN t1
1841 WHERE t1.rowid >= 256 ORDER BY t1.a DESC
1843 } {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}
1844 do_test boundary3-2.10.ge.3 {
1846 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
1850 } {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}
1851 do_test boundary3-2.10.ge.4 {
1853 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
1855 ORDER BY t1.rowid DESC
1857 } {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}
1858 do_test boundary3-2.10.ge.5 {
1860 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
1864 } {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}
1865 do_test boundary3-2.10.ge.10 {
1867 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
1871 } {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}
1872 do_test boundary3-2.10.ge.11 {
1874 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
1876 ORDER BY t1.rowid DESC
1878 } {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}
1879 do_test boundary3-2.10.lt.1 {
1881 SELECT t2.a FROM t1 JOIN t2 USING(a)
1882 WHERE t1.rowid < 256 ORDER BY t2.a
1884 } {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}
1885 do_test boundary3-2.10.lt.2 {
1887 SELECT t2.a FROM t2 NATURAL JOIN t1
1888 WHERE t1.rowid < 256 ORDER BY t1.a DESC
1890 } {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}
1891 do_test boundary3-2.10.lt.3 {
1893 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
1897 } {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}
1898 do_test boundary3-2.10.lt.4 {
1900 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
1902 ORDER BY t1.rowid DESC
1904 } {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}
1905 do_test boundary3-2.10.lt.5 {
1907 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
1911 } {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}
1912 do_test boundary3-2.10.lt.10 {
1914 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
1918 } {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}
1919 do_test boundary3-2.10.lt.11 {
1921 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
1923 ORDER BY t1.rowid DESC
1925 } {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}
1926 do_test boundary3-2.10.le.1 {
1928 SELECT t2.a FROM t1 JOIN t2 USING(a)
1929 WHERE t1.rowid <= 256 ORDER BY t2.a
1931 } {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}
1932 do_test boundary3-2.10.le.2 {
1934 SELECT t2.a FROM t2 NATURAL JOIN t1
1935 WHERE t1.rowid <= 256 ORDER BY t1.a DESC
1937 } {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}
1938 do_test boundary3-2.10.le.3 {
1940 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1944 } {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}
1945 do_test boundary3-2.10.le.4 {
1947 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1949 ORDER BY t1.rowid DESC
1951 } {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}
1952 do_test boundary3-2.10.le.5 {
1954 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
1958 } {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}
1959 do_test boundary3-2.10.le.10 {
1961 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
1965 } {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}
1966 do_test boundary3-2.10.le.11 {
1968 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
1970 ORDER BY t1.rowid DESC
1972 } {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}
1973 do_test boundary3-2.11.1 {
1975 SELECT t1.* FROM t1, t2 WHERE t1.rowid=34359738368 AND t2.a=t1.a
1977 } {22 0000000800000000}
1978 do_test boundary3-2.11.2 {
1980 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000800000000'
1983 do_test boundary3-2.11.3 {
1985 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=22
1987 } {34359738368 0000000800000000}
1988 do_test boundary3-2.11.gt.1 {
1990 SELECT t2.a FROM t1 JOIN t2 USING(a)
1991 WHERE t1.rowid > 34359738368 ORDER BY t2.a
1993 } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 46 56 57}
1994 do_test boundary3-2.11.gt.2 {
1996 SELECT t2.a FROM t2 NATURAL JOIN t1
1997 WHERE t1.rowid > 34359738368 ORDER BY t1.a DESC
1999 } {57 56 46 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
2000 do_test boundary3-2.11.gt.3 {
2002 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2006 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2007 do_test boundary3-2.11.gt.4 {
2009 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2011 ORDER BY t1.rowid DESC
2013 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46}
2014 do_test boundary3-2.11.gt.5 {
2016 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2020 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2021 do_test boundary3-2.11.gt.10 {
2023 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
2027 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2028 do_test boundary3-2.11.gt.11 {
2030 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
2032 ORDER BY t1.rowid DESC
2034 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46}
2035 do_test boundary3-2.11.ge.1 {
2037 SELECT t2.a FROM t1 JOIN t2 USING(a)
2038 WHERE t1.rowid >= 34359738368 ORDER BY t2.a
2040 } {3 7 10 13 17 19 22 25 26 27 28 34 35 43 45 46 56 57}
2041 do_test boundary3-2.11.ge.2 {
2043 SELECT t2.a FROM t2 NATURAL JOIN t1
2044 WHERE t1.rowid >= 34359738368 ORDER BY t1.a DESC
2046 } {57 56 46 45 43 35 34 28 27 26 25 22 19 17 13 10 7 3}
2047 do_test boundary3-2.11.ge.3 {
2049 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2053 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2054 do_test boundary3-2.11.ge.4 {
2056 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2058 ORDER BY t1.rowid DESC
2060 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22}
2061 do_test boundary3-2.11.ge.5 {
2063 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2067 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2068 do_test boundary3-2.11.ge.10 {
2070 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
2074 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2075 do_test boundary3-2.11.ge.11 {
2077 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
2079 ORDER BY t1.rowid DESC
2081 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22}
2082 do_test boundary3-2.11.lt.1 {
2084 SELECT t2.a FROM t1 JOIN t2 USING(a)
2085 WHERE t1.rowid < 34359738368 ORDER BY t2.a
2087 } {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}
2088 do_test boundary3-2.11.lt.2 {
2090 SELECT t2.a FROM t2 NATURAL JOIN t1
2091 WHERE t1.rowid < 34359738368 ORDER BY t1.a DESC
2093 } {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}
2094 do_test boundary3-2.11.lt.3 {
2096 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
2100 } {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}
2101 do_test boundary3-2.11.lt.4 {
2103 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
2105 ORDER BY t1.rowid DESC
2107 } {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}
2108 do_test boundary3-2.11.lt.5 {
2110 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
2114 } {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}
2115 do_test boundary3-2.11.lt.10 {
2117 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
2121 } {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}
2122 do_test boundary3-2.11.lt.11 {
2124 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
2126 ORDER BY t1.rowid DESC
2128 } {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}
2129 do_test boundary3-2.11.le.1 {
2131 SELECT t2.a FROM t1 JOIN t2 USING(a)
2132 WHERE t1.rowid <= 34359738368 ORDER BY t2.a
2134 } {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}
2135 do_test boundary3-2.11.le.2 {
2137 SELECT t2.a FROM t2 NATURAL JOIN t1
2138 WHERE t1.rowid <= 34359738368 ORDER BY t1.a DESC
2140 } {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}
2141 do_test boundary3-2.11.le.3 {
2143 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
2147 } {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}
2148 do_test boundary3-2.11.le.4 {
2150 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
2152 ORDER BY t1.rowid DESC
2154 } {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}
2155 do_test boundary3-2.11.le.5 {
2157 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
2161 } {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}
2162 do_test boundary3-2.11.le.10 {
2164 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
2168 } {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}
2169 do_test boundary3-2.11.le.11 {
2171 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
2173 ORDER BY t1.rowid DESC
2175 } {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}
2176 do_test boundary3-2.12.1 {
2178 SELECT t1.* FROM t1, t2 WHERE t1.rowid=65536 AND t2.a=t1.a
2180 } {62 0000000000010000}
2181 do_test boundary3-2.12.2 {
2183 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000000010000'
2186 do_test boundary3-2.12.3 {
2188 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=62
2190 } {65536 0000000000010000}
2191 do_test boundary3-2.12.gt.1 {
2193 SELECT t2.a FROM t1 JOIN t2 USING(a)
2194 WHERE t1.rowid > 65536 ORDER BY t2.a
2196 } {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}
2197 do_test boundary3-2.12.gt.2 {
2199 SELECT t2.a FROM t2 NATURAL JOIN t1
2200 WHERE t1.rowid > 65536 ORDER BY t1.a DESC
2202 } {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}
2203 do_test boundary3-2.12.gt.3 {
2205 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2209 } {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 boundary3-2.12.gt.4 {
2212 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2214 ORDER BY t1.rowid DESC
2216 } {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}
2217 do_test boundary3-2.12.gt.5 {
2219 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2223 } {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}
2224 do_test boundary3-2.12.gt.10 {
2226 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
2230 } {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}
2231 do_test boundary3-2.12.gt.11 {
2233 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
2235 ORDER BY t1.rowid DESC
2237 } {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}
2238 do_test boundary3-2.12.ge.1 {
2240 SELECT t2.a FROM t1 JOIN t2 USING(a)
2241 WHERE t1.rowid >= 65536 ORDER BY t2.a
2243 } {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}
2244 do_test boundary3-2.12.ge.2 {
2246 SELECT t2.a FROM t2 NATURAL JOIN t1
2247 WHERE t1.rowid >= 65536 ORDER BY t1.a DESC
2249 } {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}
2250 do_test boundary3-2.12.ge.3 {
2252 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2256 } {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}
2257 do_test boundary3-2.12.ge.4 {
2259 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2261 ORDER BY t1.rowid DESC
2263 } {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}
2264 do_test boundary3-2.12.ge.5 {
2266 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2270 } {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}
2271 do_test boundary3-2.12.ge.10 {
2273 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
2277 } {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}
2278 do_test boundary3-2.12.ge.11 {
2280 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
2282 ORDER BY t1.rowid DESC
2284 } {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}
2285 do_test boundary3-2.12.lt.1 {
2287 SELECT t2.a FROM t1 JOIN t2 USING(a)
2288 WHERE t1.rowid < 65536 ORDER BY t2.a
2290 } {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}
2291 do_test boundary3-2.12.lt.2 {
2293 SELECT t2.a FROM t2 NATURAL JOIN t1
2294 WHERE t1.rowid < 65536 ORDER BY t1.a DESC
2296 } {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}
2297 do_test boundary3-2.12.lt.3 {
2299 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
2303 } {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}
2304 do_test boundary3-2.12.lt.4 {
2306 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
2308 ORDER BY t1.rowid DESC
2310 } {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}
2311 do_test boundary3-2.12.lt.5 {
2313 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
2317 } {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}
2318 do_test boundary3-2.12.lt.10 {
2320 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
2324 } {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}
2325 do_test boundary3-2.12.lt.11 {
2327 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
2329 ORDER BY t1.rowid DESC
2331 } {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}
2332 do_test boundary3-2.12.le.1 {
2334 SELECT t2.a FROM t1 JOIN t2 USING(a)
2335 WHERE t1.rowid <= 65536 ORDER BY t2.a
2337 } {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}
2338 do_test boundary3-2.12.le.2 {
2340 SELECT t2.a FROM t2 NATURAL JOIN t1
2341 WHERE t1.rowid <= 65536 ORDER BY t1.a DESC
2343 } {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}
2344 do_test boundary3-2.12.le.3 {
2346 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
2350 } {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}
2351 do_test boundary3-2.12.le.4 {
2353 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
2355 ORDER BY t1.rowid DESC
2357 } {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}
2358 do_test boundary3-2.12.le.5 {
2360 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
2364 } {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}
2365 do_test boundary3-2.12.le.10 {
2367 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
2371 } {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}
2372 do_test boundary3-2.12.le.11 {
2374 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
2376 ORDER BY t1.rowid DESC
2378 } {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}
2379 do_test boundary3-2.13.1 {
2381 SELECT t1.* FROM t1, t2 WHERE t1.rowid=268435456 AND t2.a=t1.a
2383 } {40 0000000010000000}
2384 do_test boundary3-2.13.2 {
2386 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000010000000'
2389 do_test boundary3-2.13.3 {
2391 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=40
2393 } {268435456 0000000010000000}
2394 do_test boundary3-2.13.gt.1 {
2396 SELECT t2.a FROM t1 JOIN t2 USING(a)
2397 WHERE t1.rowid > 268435456 ORDER BY t2.a
2399 } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
2400 do_test boundary3-2.13.gt.2 {
2402 SELECT t2.a FROM t2 NATURAL JOIN t1
2403 WHERE t1.rowid > 268435456 ORDER BY t1.a DESC
2405 } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
2406 do_test boundary3-2.13.gt.3 {
2408 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2412 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2413 do_test boundary3-2.13.gt.4 {
2415 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2417 ORDER BY t1.rowid DESC
2419 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20}
2420 do_test boundary3-2.13.gt.5 {
2422 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2426 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2427 do_test boundary3-2.13.gt.10 {
2429 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
2433 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2434 do_test boundary3-2.13.gt.11 {
2436 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
2438 ORDER BY t1.rowid DESC
2440 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20}
2441 do_test boundary3-2.13.ge.1 {
2443 SELECT t2.a FROM t1 JOIN t2 USING(a)
2444 WHERE t1.rowid >= 268435456 ORDER BY t2.a
2446 } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
2447 do_test boundary3-2.13.ge.2 {
2449 SELECT t2.a FROM t2 NATURAL JOIN t1
2450 WHERE t1.rowid >= 268435456 ORDER BY t1.a DESC
2452 } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
2453 do_test boundary3-2.13.ge.3 {
2455 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2459 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2460 do_test boundary3-2.13.ge.4 {
2462 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2464 ORDER BY t1.rowid DESC
2466 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40}
2467 do_test boundary3-2.13.ge.5 {
2469 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2473 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2474 do_test boundary3-2.13.ge.10 {
2476 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
2480 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2481 do_test boundary3-2.13.ge.11 {
2483 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
2485 ORDER BY t1.rowid DESC
2487 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40}
2488 do_test boundary3-2.13.lt.1 {
2490 SELECT t2.a FROM t1 JOIN t2 USING(a)
2491 WHERE t1.rowid < 268435456 ORDER BY t2.a
2493 } {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}
2494 do_test boundary3-2.13.lt.2 {
2496 SELECT t2.a FROM t2 NATURAL JOIN t1
2497 WHERE t1.rowid < 268435456 ORDER BY t1.a DESC
2499 } {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}
2500 do_test boundary3-2.13.lt.3 {
2502 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
2506 } {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}
2507 do_test boundary3-2.13.lt.4 {
2509 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
2511 ORDER BY t1.rowid DESC
2513 } {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}
2514 do_test boundary3-2.13.lt.5 {
2516 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
2520 } {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}
2521 do_test boundary3-2.13.lt.10 {
2523 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
2527 } {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}
2528 do_test boundary3-2.13.lt.11 {
2530 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
2532 ORDER BY t1.rowid DESC
2534 } {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}
2535 do_test boundary3-2.13.le.1 {
2537 SELECT t2.a FROM t1 JOIN t2 USING(a)
2538 WHERE t1.rowid <= 268435456 ORDER BY t2.a
2540 } {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}
2541 do_test boundary3-2.13.le.2 {
2543 SELECT t2.a FROM t2 NATURAL JOIN t1
2544 WHERE t1.rowid <= 268435456 ORDER BY t1.a DESC
2546 } {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}
2547 do_test boundary3-2.13.le.3 {
2549 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
2553 } {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}
2554 do_test boundary3-2.13.le.4 {
2556 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
2558 ORDER BY t1.rowid DESC
2560 } {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}
2561 do_test boundary3-2.13.le.5 {
2563 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
2567 } {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}
2568 do_test boundary3-2.13.le.10 {
2570 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
2574 } {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}
2575 do_test boundary3-2.13.le.11 {
2577 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
2579 ORDER BY t1.rowid DESC
2581 } {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}
2582 do_test boundary3-2.14.1 {
2584 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-140737488355328 AND t2.a=t1.a
2586 } {44 ffff800000000000}
2587 do_test boundary3-2.14.2 {
2589 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='ffff800000000000'
2591 } {-140737488355328 44}
2592 do_test boundary3-2.14.3 {
2594 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=44
2596 } {-140737488355328 ffff800000000000}
2597 do_test boundary3-2.14.gt.1 {
2599 SELECT t2.a FROM t1 JOIN t2 USING(a)
2600 WHERE t1.rowid > -140737488355328 ORDER BY t2.a
2602 } {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}
2603 do_test boundary3-2.14.gt.2 {
2605 SELECT t2.a FROM t2 NATURAL JOIN t1
2606 WHERE t1.rowid > -140737488355328 ORDER BY t1.a DESC
2608 } {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}
2609 do_test boundary3-2.14.gt.3 {
2611 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2615 } {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}
2616 do_test boundary3-2.14.gt.4 {
2618 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2620 ORDER BY t1.rowid DESC
2622 } {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}
2623 do_test boundary3-2.14.gt.5 {
2625 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2629 } {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}
2630 do_test boundary3-2.14.ge.1 {
2632 SELECT t2.a FROM t1 JOIN t2 USING(a)
2633 WHERE t1.rowid >= -140737488355328 ORDER BY t2.a
2635 } {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}
2636 do_test boundary3-2.14.ge.2 {
2638 SELECT t2.a FROM t2 NATURAL JOIN t1
2639 WHERE t1.rowid >= -140737488355328 ORDER BY t1.a DESC
2641 } {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}
2642 do_test boundary3-2.14.ge.3 {
2644 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2648 } {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}
2649 do_test boundary3-2.14.ge.4 {
2651 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2653 ORDER BY t1.rowid DESC
2655 } {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}
2656 do_test boundary3-2.14.ge.5 {
2658 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2662 } {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}
2663 do_test boundary3-2.14.lt.1 {
2665 SELECT t2.a FROM t1 JOIN t2 USING(a)
2666 WHERE t1.rowid < -140737488355328 ORDER BY t2.a
2669 do_test boundary3-2.14.lt.2 {
2671 SELECT t2.a FROM t2 NATURAL JOIN t1
2672 WHERE t1.rowid < -140737488355328 ORDER BY t1.a DESC
2675 do_test boundary3-2.14.lt.3 {
2677 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
2682 do_test boundary3-2.14.lt.4 {
2684 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
2686 ORDER BY t1.rowid DESC
2689 do_test boundary3-2.14.lt.5 {
2691 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
2696 do_test boundary3-2.14.le.1 {
2698 SELECT t2.a FROM t1 JOIN t2 USING(a)
2699 WHERE t1.rowid <= -140737488355328 ORDER BY t2.a
2702 do_test boundary3-2.14.le.2 {
2704 SELECT t2.a FROM t2 NATURAL JOIN t1
2705 WHERE t1.rowid <= -140737488355328 ORDER BY t1.a DESC
2708 do_test boundary3-2.14.le.3 {
2710 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
2715 do_test boundary3-2.14.le.4 {
2717 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
2719 ORDER BY t1.rowid DESC
2722 do_test boundary3-2.14.le.5 {
2724 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
2729 do_test boundary3-2.15.1 {
2731 SELECT t1.* FROM t1, t2 WHERE t1.rowid=1099511627776 AND t2.a=t1.a
2733 } {19 0000010000000000}
2734 do_test boundary3-2.15.2 {
2736 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000010000000000'
2738 } {1099511627776 19}
2739 do_test boundary3-2.15.3 {
2741 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=19
2743 } {1099511627776 0000010000000000}
2744 do_test boundary3-2.15.gt.1 {
2746 SELECT t2.a FROM t1 JOIN t2 USING(a)
2747 WHERE t1.rowid > 1099511627776 ORDER BY t2.a
2749 } {3 7 10 13 17 25 26 27 28 34 43 45 56}
2750 do_test boundary3-2.15.gt.2 {
2752 SELECT t2.a FROM t2 NATURAL JOIN t1
2753 WHERE t1.rowid > 1099511627776 ORDER BY t1.a DESC
2755 } {56 45 43 34 28 27 26 25 17 13 10 7 3}
2756 do_test boundary3-2.15.gt.3 {
2758 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2762 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
2763 do_test boundary3-2.15.gt.4 {
2765 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2767 ORDER BY t1.rowid DESC
2769 } {3 28 17 45 27 43 13 26 10 34 25 56 7}
2770 do_test boundary3-2.15.gt.5 {
2772 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2776 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
2777 do_test boundary3-2.15.gt.10 {
2779 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
2783 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
2784 do_test boundary3-2.15.gt.11 {
2786 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
2788 ORDER BY t1.rowid DESC
2790 } {3 28 17 45 27 43 13 26 10 34 25 56 7}
2791 do_test boundary3-2.15.ge.1 {
2793 SELECT t2.a FROM t1 JOIN t2 USING(a)
2794 WHERE t1.rowid >= 1099511627776 ORDER BY t2.a
2796 } {3 7 10 13 17 19 25 26 27 28 34 43 45 56}
2797 do_test boundary3-2.15.ge.2 {
2799 SELECT t2.a FROM t2 NATURAL JOIN t1
2800 WHERE t1.rowid >= 1099511627776 ORDER BY t1.a DESC
2802 } {56 45 43 34 28 27 26 25 19 17 13 10 7 3}
2803 do_test boundary3-2.15.ge.3 {
2805 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2809 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2810 do_test boundary3-2.15.ge.4 {
2812 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2814 ORDER BY t1.rowid DESC
2816 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19}
2817 do_test boundary3-2.15.ge.5 {
2819 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2823 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2824 do_test boundary3-2.15.ge.10 {
2826 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
2830 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
2831 do_test boundary3-2.15.ge.11 {
2833 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
2835 ORDER BY t1.rowid DESC
2837 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19}
2838 do_test boundary3-2.15.lt.1 {
2840 SELECT t2.a FROM t1 JOIN t2 USING(a)
2841 WHERE t1.rowid < 1099511627776 ORDER BY t2.a
2843 } {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}
2844 do_test boundary3-2.15.lt.2 {
2846 SELECT t2.a FROM t2 NATURAL JOIN t1
2847 WHERE t1.rowid < 1099511627776 ORDER BY t1.a DESC
2849 } {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}
2850 do_test boundary3-2.15.lt.3 {
2852 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
2856 } {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}
2857 do_test boundary3-2.15.lt.4 {
2859 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
2861 ORDER BY t1.rowid DESC
2863 } {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}
2864 do_test boundary3-2.15.lt.5 {
2866 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
2870 } {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}
2871 do_test boundary3-2.15.lt.10 {
2873 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
2877 } {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}
2878 do_test boundary3-2.15.lt.11 {
2880 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
2882 ORDER BY t1.rowid DESC
2884 } {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}
2885 do_test boundary3-2.15.le.1 {
2887 SELECT t2.a FROM t1 JOIN t2 USING(a)
2888 WHERE t1.rowid <= 1099511627776 ORDER BY t2.a
2890 } {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}
2891 do_test boundary3-2.15.le.2 {
2893 SELECT t2.a FROM t2 NATURAL JOIN t1
2894 WHERE t1.rowid <= 1099511627776 ORDER BY t1.a DESC
2896 } {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}
2897 do_test boundary3-2.15.le.3 {
2899 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
2903 } {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}
2904 do_test boundary3-2.15.le.4 {
2906 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
2908 ORDER BY t1.rowid DESC
2910 } {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}
2911 do_test boundary3-2.15.le.5 {
2913 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
2917 } {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}
2918 do_test boundary3-2.15.le.10 {
2920 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
2924 } {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}
2925 do_test boundary3-2.15.le.11 {
2927 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
2929 ORDER BY t1.rowid DESC
2931 } {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}
2932 do_test boundary3-2.16.gt.1 {
2934 SELECT t2.a FROM t1 JOIN t2 USING(a)
2935 WHERE t1.rowid > 9223372036854775807 ORDER BY t2.a
2938 do_test boundary3-2.16.gt.2 {
2940 SELECT t2.a FROM t2 NATURAL JOIN t1
2941 WHERE t1.rowid > 9223372036854775807 ORDER BY t1.a DESC
2944 do_test boundary3-2.16.gt.3 {
2946 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2951 do_test boundary3-2.16.gt.4 {
2953 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2955 ORDER BY t1.rowid DESC
2958 do_test boundary3-2.16.gt.5 {
2960 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
2965 do_test boundary3-2.16.ge.1 {
2967 SELECT t2.a FROM t1 JOIN t2 USING(a)
2968 WHERE t1.rowid >= 9223372036854775807 ORDER BY t2.a
2971 do_test boundary3-2.16.ge.2 {
2973 SELECT t2.a FROM t2 NATURAL JOIN t1
2974 WHERE t1.rowid >= 9223372036854775807 ORDER BY t1.a DESC
2977 do_test boundary3-2.16.ge.3 {
2979 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2984 do_test boundary3-2.16.ge.4 {
2986 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2988 ORDER BY t1.rowid DESC
2991 do_test boundary3-2.16.ge.5 {
2993 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
2998 do_test boundary3-2.16.lt.1 {
3000 SELECT t2.a FROM t1 JOIN t2 USING(a)
3001 WHERE t1.rowid < 9223372036854775807 ORDER BY t2.a
3003 } {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}
3004 do_test boundary3-2.16.lt.2 {
3006 SELECT t2.a FROM t2 NATURAL JOIN t1
3007 WHERE t1.rowid < 9223372036854775807 ORDER BY t1.a DESC
3009 } {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}
3010 do_test boundary3-2.16.lt.3 {
3012 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3016 } {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}
3017 do_test boundary3-2.16.lt.4 {
3019 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3021 ORDER BY t1.rowid DESC
3023 } {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}
3024 do_test boundary3-2.16.lt.5 {
3026 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3030 } {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}
3031 do_test boundary3-2.16.le.1 {
3033 SELECT t2.a FROM t1 JOIN t2 USING(a)
3034 WHERE t1.rowid <= 9223372036854775807 ORDER BY t2.a
3036 } {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}
3037 do_test boundary3-2.16.le.2 {
3039 SELECT t2.a FROM t2 NATURAL JOIN t1
3040 WHERE t1.rowid <= 9223372036854775807 ORDER BY t1.a DESC
3042 } {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}
3043 do_test boundary3-2.16.le.3 {
3045 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
3049 } {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}
3050 do_test boundary3-2.16.le.4 {
3052 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
3054 ORDER BY t1.rowid DESC
3056 } {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}
3057 do_test boundary3-2.16.le.5 {
3059 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
3063 } {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}
3064 do_test boundary3-2.17.1 {
3066 SELECT t1.* FROM t1, t2 WHERE t1.rowid=32768 AND t2.a=t1.a
3068 } {50 0000000000008000}
3069 do_test boundary3-2.17.2 {
3071 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000000008000'
3074 do_test boundary3-2.17.3 {
3076 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=50
3078 } {32768 0000000000008000}
3079 do_test boundary3-2.17.gt.1 {
3081 SELECT t2.a FROM t1 JOIN t2 USING(a)
3082 WHERE t1.rowid > 32768 ORDER BY t2.a
3084 } {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}
3085 do_test boundary3-2.17.gt.2 {
3087 SELECT t2.a FROM t2 NATURAL JOIN t1
3088 WHERE t1.rowid > 32768 ORDER BY t1.a DESC
3090 } {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}
3091 do_test boundary3-2.17.gt.3 {
3093 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
3097 } {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}
3098 do_test boundary3-2.17.gt.4 {
3100 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
3102 ORDER BY t1.rowid DESC
3104 } {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}
3105 do_test boundary3-2.17.gt.5 {
3107 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
3111 } {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}
3112 do_test boundary3-2.17.gt.10 {
3114 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
3118 } {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}
3119 do_test boundary3-2.17.gt.11 {
3121 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
3123 ORDER BY t1.rowid DESC
3125 } {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}
3126 do_test boundary3-2.17.ge.1 {
3128 SELECT t2.a FROM t1 JOIN t2 USING(a)
3129 WHERE t1.rowid >= 32768 ORDER BY t2.a
3131 } {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}
3132 do_test boundary3-2.17.ge.2 {
3134 SELECT t2.a FROM t2 NATURAL JOIN t1
3135 WHERE t1.rowid >= 32768 ORDER BY t1.a DESC
3137 } {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}
3138 do_test boundary3-2.17.ge.3 {
3140 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
3144 } {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}
3145 do_test boundary3-2.17.ge.4 {
3147 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
3149 ORDER BY t1.rowid DESC
3151 } {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}
3152 do_test boundary3-2.17.ge.5 {
3154 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
3158 } {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}
3159 do_test boundary3-2.17.ge.10 {
3161 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
3165 } {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}
3166 do_test boundary3-2.17.ge.11 {
3168 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
3170 ORDER BY t1.rowid DESC
3172 } {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}
3173 do_test boundary3-2.17.lt.1 {
3175 SELECT t2.a FROM t1 JOIN t2 USING(a)
3176 WHERE t1.rowid < 32768 ORDER BY t2.a
3178 } {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}
3179 do_test boundary3-2.17.lt.2 {
3181 SELECT t2.a FROM t2 NATURAL JOIN t1
3182 WHERE t1.rowid < 32768 ORDER BY t1.a DESC
3184 } {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}
3185 do_test boundary3-2.17.lt.3 {
3187 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3191 } {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}
3192 do_test boundary3-2.17.lt.4 {
3194 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3196 ORDER BY t1.rowid DESC
3198 } {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}
3199 do_test boundary3-2.17.lt.5 {
3201 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3205 } {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}
3206 do_test boundary3-2.17.lt.10 {
3208 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
3212 } {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}
3213 do_test boundary3-2.17.lt.11 {
3215 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
3217 ORDER BY t1.rowid DESC
3219 } {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}
3220 do_test boundary3-2.17.le.1 {
3222 SELECT t2.a FROM t1 JOIN t2 USING(a)
3223 WHERE t1.rowid <= 32768 ORDER BY t2.a
3225 } {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}
3226 do_test boundary3-2.17.le.2 {
3228 SELECT t2.a FROM t2 NATURAL JOIN t1
3229 WHERE t1.rowid <= 32768 ORDER BY t1.a DESC
3231 } {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}
3232 do_test boundary3-2.17.le.3 {
3234 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
3238 } {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}
3239 do_test boundary3-2.17.le.4 {
3241 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
3243 ORDER BY t1.rowid DESC
3245 } {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}
3246 do_test boundary3-2.17.le.5 {
3248 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
3252 } {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}
3253 do_test boundary3-2.17.le.10 {
3255 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
3259 } {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}
3260 do_test boundary3-2.17.le.11 {
3262 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
3264 ORDER BY t1.rowid DESC
3266 } {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}
3267 do_test boundary3-2.18.1 {
3269 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-36028797018963968 AND t2.a=t1.a
3271 } {64 ff80000000000000}
3272 do_test boundary3-2.18.2 {
3274 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='ff80000000000000'
3276 } {-36028797018963968 64}
3277 do_test boundary3-2.18.3 {
3279 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=64
3281 } {-36028797018963968 ff80000000000000}
3282 do_test boundary3-2.18.gt.1 {
3284 SELECT t2.a FROM t1 JOIN t2 USING(a)
3285 WHERE t1.rowid > -36028797018963968 ORDER BY t2.a
3287 } {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}
3288 do_test boundary3-2.18.gt.2 {
3290 SELECT t2.a FROM t2 NATURAL JOIN t1
3291 WHERE t1.rowid > -36028797018963968 ORDER BY t1.a DESC
3293 } {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}
3294 do_test boundary3-2.18.gt.3 {
3296 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
3300 } {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}
3301 do_test boundary3-2.18.gt.4 {
3303 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
3305 ORDER BY t1.rowid DESC
3307 } {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}
3308 do_test boundary3-2.18.gt.5 {
3310 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
3314 } {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}
3315 do_test boundary3-2.18.ge.1 {
3317 SELECT t2.a FROM t1 JOIN t2 USING(a)
3318 WHERE t1.rowid >= -36028797018963968 ORDER BY t2.a
3320 } {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}
3321 do_test boundary3-2.18.ge.2 {
3323 SELECT t2.a FROM t2 NATURAL JOIN t1
3324 WHERE t1.rowid >= -36028797018963968 ORDER BY t1.a DESC
3326 } {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}
3327 do_test boundary3-2.18.ge.3 {
3329 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
3333 } {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}
3334 do_test boundary3-2.18.ge.4 {
3336 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
3338 ORDER BY t1.rowid DESC
3340 } {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}
3341 do_test boundary3-2.18.ge.5 {
3343 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
3347 } {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}
3348 do_test boundary3-2.18.lt.1 {
3350 SELECT t2.a FROM t1 JOIN t2 USING(a)
3351 WHERE t1.rowid < -36028797018963968 ORDER BY t2.a
3354 do_test boundary3-2.18.lt.2 {
3356 SELECT t2.a FROM t2 NATURAL JOIN t1
3357 WHERE t1.rowid < -36028797018963968 ORDER BY t1.a DESC
3360 do_test boundary3-2.18.lt.3 {
3362 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3367 do_test boundary3-2.18.lt.4 {
3369 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3371 ORDER BY t1.rowid DESC
3374 do_test boundary3-2.18.lt.5 {
3376 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3381 do_test boundary3-2.18.le.1 {
3383 SELECT t2.a FROM t1 JOIN t2 USING(a)
3384 WHERE t1.rowid <= -36028797018963968 ORDER BY t2.a
3387 do_test boundary3-2.18.le.2 {
3389 SELECT t2.a FROM t2 NATURAL JOIN t1
3390 WHERE t1.rowid <= -36028797018963968 ORDER BY t1.a DESC
3393 do_test boundary3-2.18.le.3 {
3395 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
3400 do_test boundary3-2.18.le.4 {
3402 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
3404 ORDER BY t1.rowid DESC
3407 do_test boundary3-2.18.le.5 {
3409 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
3414 do_test boundary3-2.19.1 {
3416 SELECT t1.* FROM t1, t2 WHERE t1.rowid=65535 AND t2.a=t1.a
3418 } {48 000000000000ffff}
3419 do_test boundary3-2.19.2 {
3421 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='000000000000ffff'
3424 do_test boundary3-2.19.3 {
3426 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=48
3428 } {65535 000000000000ffff}
3429 do_test boundary3-2.19.gt.1 {
3431 SELECT t2.a FROM t1 JOIN t2 USING(a)
3432 WHERE t1.rowid > 65535 ORDER BY t2.a
3434 } {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}
3435 do_test boundary3-2.19.gt.2 {
3437 SELECT t2.a FROM t2 NATURAL JOIN t1
3438 WHERE t1.rowid > 65535 ORDER BY t1.a DESC
3440 } {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}
3441 do_test boundary3-2.19.gt.3 {
3443 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
3447 } {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}
3448 do_test boundary3-2.19.gt.4 {
3450 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
3452 ORDER BY t1.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}
3455 do_test boundary3-2.19.gt.5 {
3457 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
3461 } {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}
3462 do_test boundary3-2.19.gt.10 {
3464 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
3468 } {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}
3469 do_test boundary3-2.19.gt.11 {
3471 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
3473 ORDER BY t1.rowid DESC
3475 } {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}
3476 do_test boundary3-2.19.ge.1 {
3478 SELECT t2.a FROM t1 JOIN t2 USING(a)
3479 WHERE t1.rowid >= 65535 ORDER BY t2.a
3481 } {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}
3482 do_test boundary3-2.19.ge.2 {
3484 SELECT t2.a FROM t2 NATURAL JOIN t1
3485 WHERE t1.rowid >= 65535 ORDER BY t1.a DESC
3487 } {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}
3488 do_test boundary3-2.19.ge.3 {
3490 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
3494 } {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}
3495 do_test boundary3-2.19.ge.4 {
3497 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
3499 ORDER BY t1.rowid DESC
3501 } {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}
3502 do_test boundary3-2.19.ge.5 {
3504 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
3508 } {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}
3509 do_test boundary3-2.19.ge.10 {
3511 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
3515 } {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}
3516 do_test boundary3-2.19.ge.11 {
3518 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
3520 ORDER BY t1.rowid DESC
3522 } {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}
3523 do_test boundary3-2.19.lt.1 {
3525 SELECT t2.a FROM t1 JOIN t2 USING(a)
3526 WHERE t1.rowid < 65535 ORDER BY t2.a
3528 } {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}
3529 do_test boundary3-2.19.lt.2 {
3531 SELECT t2.a FROM t2 NATURAL JOIN t1
3532 WHERE t1.rowid < 65535 ORDER BY t1.a DESC
3534 } {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}
3535 do_test boundary3-2.19.lt.3 {
3537 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3541 } {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}
3542 do_test boundary3-2.19.lt.4 {
3544 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3546 ORDER BY t1.rowid DESC
3548 } {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}
3549 do_test boundary3-2.19.lt.5 {
3551 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3555 } {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}
3556 do_test boundary3-2.19.lt.10 {
3558 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
3562 } {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}
3563 do_test boundary3-2.19.lt.11 {
3565 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
3567 ORDER BY t1.rowid DESC
3569 } {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}
3570 do_test boundary3-2.19.le.1 {
3572 SELECT t2.a FROM t1 JOIN t2 USING(a)
3573 WHERE t1.rowid <= 65535 ORDER BY t2.a
3575 } {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}
3576 do_test boundary3-2.19.le.2 {
3578 SELECT t2.a FROM t2 NATURAL JOIN t1
3579 WHERE t1.rowid <= 65535 ORDER BY t1.a DESC
3581 } {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}
3582 do_test boundary3-2.19.le.3 {
3584 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
3588 } {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}
3589 do_test boundary3-2.19.le.4 {
3591 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
3593 ORDER BY t1.rowid DESC
3595 } {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}
3596 do_test boundary3-2.19.le.5 {
3598 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
3602 } {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}
3603 do_test boundary3-2.19.le.10 {
3605 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
3609 } {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}
3610 do_test boundary3-2.19.le.11 {
3612 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
3614 ORDER BY t1.rowid DESC
3616 } {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}
3617 do_test boundary3-2.20.1 {
3619 SELECT t1.* FROM t1, t2 WHERE t1.rowid=4294967295 AND t2.a=t1.a
3621 } {14 00000000ffffffff}
3622 do_test boundary3-2.20.2 {
3624 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='00000000ffffffff'
3627 do_test boundary3-2.20.3 {
3629 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=14
3631 } {4294967295 00000000ffffffff}
3632 do_test boundary3-2.20.gt.1 {
3634 SELECT t2.a FROM t1 JOIN t2 USING(a)
3635 WHERE t1.rowid > 4294967295 ORDER BY t2.a
3637 } {3 7 10 13 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
3638 do_test boundary3-2.20.gt.2 {
3640 SELECT t2.a FROM t2 NATURAL JOIN t1
3641 WHERE t1.rowid > 4294967295 ORDER BY t1.a DESC
3643 } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 13 10 7 3}
3644 do_test boundary3-2.20.gt.3 {
3646 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
3650 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
3651 do_test boundary3-2.20.gt.4 {
3653 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
3655 ORDER BY t1.rowid DESC
3657 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36}
3658 do_test boundary3-2.20.gt.5 {
3660 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
3664 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
3665 do_test boundary3-2.20.gt.10 {
3667 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
3671 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
3672 do_test boundary3-2.20.gt.11 {
3674 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
3676 ORDER BY t1.rowid DESC
3678 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36}
3679 do_test boundary3-2.20.ge.1 {
3681 SELECT t2.a FROM t1 JOIN t2 USING(a)
3682 WHERE t1.rowid >= 4294967295 ORDER BY t2.a
3684 } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
3685 do_test boundary3-2.20.ge.2 {
3687 SELECT t2.a FROM t2 NATURAL JOIN t1
3688 WHERE t1.rowid >= 4294967295 ORDER BY t1.a DESC
3690 } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
3691 do_test boundary3-2.20.ge.3 {
3693 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
3697 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
3698 do_test boundary3-2.20.ge.4 {
3700 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
3702 ORDER BY t1.rowid DESC
3704 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14}
3705 do_test boundary3-2.20.ge.5 {
3707 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
3711 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
3712 do_test boundary3-2.20.ge.10 {
3714 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
3718 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
3719 do_test boundary3-2.20.ge.11 {
3721 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
3723 ORDER BY t1.rowid DESC
3725 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14}
3726 do_test boundary3-2.20.lt.1 {
3728 SELECT t2.a FROM t1 JOIN t2 USING(a)
3729 WHERE t1.rowid < 4294967295 ORDER BY t2.a
3731 } {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}
3732 do_test boundary3-2.20.lt.2 {
3734 SELECT t2.a FROM t2 NATURAL JOIN t1
3735 WHERE t1.rowid < 4294967295 ORDER BY t1.a DESC
3737 } {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}
3738 do_test boundary3-2.20.lt.3 {
3740 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3744 } {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}
3745 do_test boundary3-2.20.lt.4 {
3747 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3749 ORDER BY t1.rowid DESC
3751 } {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}
3752 do_test boundary3-2.20.lt.5 {
3754 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3758 } {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}
3759 do_test boundary3-2.20.lt.10 {
3761 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
3765 } {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}
3766 do_test boundary3-2.20.lt.11 {
3768 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
3770 ORDER BY t1.rowid DESC
3772 } {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}
3773 do_test boundary3-2.20.le.1 {
3775 SELECT t2.a FROM t1 JOIN t2 USING(a)
3776 WHERE t1.rowid <= 4294967295 ORDER BY t2.a
3778 } {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}
3779 do_test boundary3-2.20.le.2 {
3781 SELECT t2.a FROM t2 NATURAL JOIN t1
3782 WHERE t1.rowid <= 4294967295 ORDER BY t1.a DESC
3784 } {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}
3785 do_test boundary3-2.20.le.3 {
3787 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
3791 } {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}
3792 do_test boundary3-2.20.le.4 {
3794 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
3796 ORDER BY t1.rowid DESC
3798 } {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}
3799 do_test boundary3-2.20.le.5 {
3801 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
3805 } {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}
3806 do_test boundary3-2.20.le.10 {
3808 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
3812 } {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}
3813 do_test boundary3-2.20.le.11 {
3815 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
3817 ORDER BY t1.rowid DESC
3819 } {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}
3820 do_test boundary3-2.21.1 {
3822 SELECT t1.* FROM t1, t2 WHERE t1.rowid=1099511627775 AND t2.a=t1.a
3824 } {57 000000ffffffffff}
3825 do_test boundary3-2.21.2 {
3827 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='000000ffffffffff'
3829 } {1099511627775 57}
3830 do_test boundary3-2.21.3 {
3832 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=57
3834 } {1099511627775 000000ffffffffff}
3835 do_test boundary3-2.21.gt.1 {
3837 SELECT t2.a FROM t1 JOIN t2 USING(a)
3838 WHERE t1.rowid > 1099511627775 ORDER BY t2.a
3840 } {3 7 10 13 17 19 25 26 27 28 34 43 45 56}
3841 do_test boundary3-2.21.gt.2 {
3843 SELECT t2.a FROM t2 NATURAL JOIN t1
3844 WHERE t1.rowid > 1099511627775 ORDER BY t1.a DESC
3846 } {56 45 43 34 28 27 26 25 19 17 13 10 7 3}
3847 do_test boundary3-2.21.gt.3 {
3849 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
3853 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
3854 do_test boundary3-2.21.gt.4 {
3856 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
3858 ORDER BY t1.rowid DESC
3860 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19}
3861 do_test boundary3-2.21.gt.5 {
3863 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
3867 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
3868 do_test boundary3-2.21.gt.10 {
3870 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
3874 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
3875 do_test boundary3-2.21.gt.11 {
3877 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
3879 ORDER BY t1.rowid DESC
3881 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19}
3882 do_test boundary3-2.21.ge.1 {
3884 SELECT t2.a FROM t1 JOIN t2 USING(a)
3885 WHERE t1.rowid >= 1099511627775 ORDER BY t2.a
3887 } {3 7 10 13 17 19 25 26 27 28 34 43 45 56 57}
3888 do_test boundary3-2.21.ge.2 {
3890 SELECT t2.a FROM t2 NATURAL JOIN t1
3891 WHERE t1.rowid >= 1099511627775 ORDER BY t1.a DESC
3893 } {57 56 45 43 34 28 27 26 25 19 17 13 10 7 3}
3894 do_test boundary3-2.21.ge.3 {
3896 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
3900 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
3901 do_test boundary3-2.21.ge.4 {
3903 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
3905 ORDER BY t1.rowid DESC
3907 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57}
3908 do_test boundary3-2.21.ge.5 {
3910 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
3914 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
3915 do_test boundary3-2.21.ge.10 {
3917 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
3921 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
3922 do_test boundary3-2.21.ge.11 {
3924 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
3926 ORDER BY t1.rowid DESC
3928 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57}
3929 do_test boundary3-2.21.lt.1 {
3931 SELECT t2.a FROM t1 JOIN t2 USING(a)
3932 WHERE t1.rowid < 1099511627775 ORDER BY t2.a
3934 } {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}
3935 do_test boundary3-2.21.lt.2 {
3937 SELECT t2.a FROM t2 NATURAL JOIN t1
3938 WHERE t1.rowid < 1099511627775 ORDER BY t1.a DESC
3940 } {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}
3941 do_test boundary3-2.21.lt.3 {
3943 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3947 } {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}
3948 do_test boundary3-2.21.lt.4 {
3950 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3952 ORDER BY t1.rowid DESC
3954 } {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}
3955 do_test boundary3-2.21.lt.5 {
3957 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
3961 } {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}
3962 do_test boundary3-2.21.lt.10 {
3964 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
3968 } {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}
3969 do_test boundary3-2.21.lt.11 {
3971 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
3973 ORDER BY t1.rowid DESC
3975 } {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}
3976 do_test boundary3-2.21.le.1 {
3978 SELECT t2.a FROM t1 JOIN t2 USING(a)
3979 WHERE t1.rowid <= 1099511627775 ORDER BY t2.a
3981 } {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}
3982 do_test boundary3-2.21.le.2 {
3984 SELECT t2.a FROM t2 NATURAL JOIN t1
3985 WHERE t1.rowid <= 1099511627775 ORDER BY t1.a DESC
3987 } {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}
3988 do_test boundary3-2.21.le.3 {
3990 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
3994 } {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}
3995 do_test boundary3-2.21.le.4 {
3997 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
3999 ORDER BY t1.rowid DESC
4001 } {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}
4002 do_test boundary3-2.21.le.5 {
4004 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
4008 } {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}
4009 do_test boundary3-2.21.le.10 {
4011 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
4015 } {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}
4016 do_test boundary3-2.21.le.11 {
4018 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
4020 ORDER BY t1.rowid DESC
4022 } {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}
4023 do_test boundary3-2.22.1 {
4025 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-8388608 AND t2.a=t1.a
4027 } {37 ffffffffff800000}
4028 do_test boundary3-2.22.2 {
4030 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='ffffffffff800000'
4033 do_test boundary3-2.22.3 {
4035 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=37
4037 } {-8388608 ffffffffff800000}
4038 do_test boundary3-2.22.gt.1 {
4040 SELECT t2.a FROM t1 JOIN t2 USING(a)
4041 WHERE t1.rowid > -8388608 ORDER BY t2.a
4043 } {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}
4044 do_test boundary3-2.22.gt.2 {
4046 SELECT t2.a FROM t2 NATURAL JOIN t1
4047 WHERE t1.rowid > -8388608 ORDER BY t1.a DESC
4049 } {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}
4050 do_test boundary3-2.22.gt.3 {
4052 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
4056 } {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}
4057 do_test boundary3-2.22.gt.4 {
4059 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
4061 ORDER BY t1.rowid DESC
4063 } {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}
4064 do_test boundary3-2.22.gt.5 {
4066 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
4070 } {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}
4071 do_test boundary3-2.22.gt.10 {
4073 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
4077 } {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}
4078 do_test boundary3-2.22.gt.11 {
4080 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
4082 ORDER BY t1.rowid DESC
4084 } {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}
4085 do_test boundary3-2.22.ge.1 {
4087 SELECT t2.a FROM t1 JOIN t2 USING(a)
4088 WHERE t1.rowid >= -8388608 ORDER BY t2.a
4090 } {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}
4091 do_test boundary3-2.22.ge.2 {
4093 SELECT t2.a FROM t2 NATURAL JOIN t1
4094 WHERE t1.rowid >= -8388608 ORDER BY t1.a DESC
4096 } {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}
4097 do_test boundary3-2.22.ge.3 {
4099 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
4103 } {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}
4104 do_test boundary3-2.22.ge.4 {
4106 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
4108 ORDER BY t1.rowid DESC
4110 } {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}
4111 do_test boundary3-2.22.ge.5 {
4113 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
4117 } {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}
4118 do_test boundary3-2.22.ge.10 {
4120 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
4124 } {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}
4125 do_test boundary3-2.22.ge.11 {
4127 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
4129 ORDER BY t1.rowid DESC
4131 } {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}
4132 do_test boundary3-2.22.lt.1 {
4134 SELECT t2.a FROM t1 JOIN t2 USING(a)
4135 WHERE t1.rowid < -8388608 ORDER BY t2.a
4137 } {1 2 11 21 44 47 55 58 63 64}
4138 do_test boundary3-2.22.lt.2 {
4140 SELECT t2.a FROM t2 NATURAL JOIN t1
4141 WHERE t1.rowid < -8388608 ORDER BY t1.a DESC
4143 } {64 63 58 55 47 44 21 11 2 1}
4144 do_test boundary3-2.22.lt.3 {
4146 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
4150 } {55 2 64 21 44 58 63 47 11 1}
4151 do_test boundary3-2.22.lt.4 {
4153 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
4155 ORDER BY t1.rowid DESC
4157 } {1 11 47 63 58 44 21 64 2 55}
4158 do_test boundary3-2.22.lt.5 {
4160 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
4164 } {55 2 64 21 44 58 63 47 11 1}
4165 do_test boundary3-2.22.lt.10 {
4167 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
4171 } {55 2 64 21 44 58 63 47 11 1}
4172 do_test boundary3-2.22.lt.11 {
4174 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
4176 ORDER BY t1.rowid DESC
4178 } {1 11 47 63 58 44 21 64 2 55}
4179 do_test boundary3-2.22.le.1 {
4181 SELECT t2.a FROM t1 JOIN t2 USING(a)
4182 WHERE t1.rowid <= -8388608 ORDER BY t2.a
4184 } {1 2 11 21 37 44 47 55 58 63 64}
4185 do_test boundary3-2.22.le.2 {
4187 SELECT t2.a FROM t2 NATURAL JOIN t1
4188 WHERE t1.rowid <= -8388608 ORDER BY t1.a DESC
4190 } {64 63 58 55 47 44 37 21 11 2 1}
4191 do_test boundary3-2.22.le.3 {
4193 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
4197 } {55 2 64 21 44 58 63 47 11 1 37}
4198 do_test boundary3-2.22.le.4 {
4200 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
4202 ORDER BY t1.rowid DESC
4204 } {37 1 11 47 63 58 44 21 64 2 55}
4205 do_test boundary3-2.22.le.5 {
4207 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
4211 } {55 2 64 21 44 58 63 47 11 1 37}
4212 do_test boundary3-2.22.le.10 {
4214 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
4218 } {55 2 64 21 44 58 63 47 11 1 37}
4219 do_test boundary3-2.22.le.11 {
4221 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
4223 ORDER BY t1.rowid DESC
4225 } {37 1 11 47 63 58 44 21 64 2 55}
4226 do_test boundary3-2.23.1 {
4228 SELECT t1.* FROM t1, t2 WHERE t1.rowid=549755813888 AND t2.a=t1.a
4230 } {35 0000008000000000}
4231 do_test boundary3-2.23.2 {
4233 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000008000000000'
4236 do_test boundary3-2.23.3 {
4238 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=35
4240 } {549755813888 0000008000000000}
4241 do_test boundary3-2.23.gt.1 {
4243 SELECT t2.a FROM t1 JOIN t2 USING(a)
4244 WHERE t1.rowid > 549755813888 ORDER BY t2.a
4246 } {3 7 10 13 17 19 25 26 27 28 34 43 45 56 57}
4247 do_test boundary3-2.23.gt.2 {
4249 SELECT t2.a FROM t2 NATURAL JOIN t1
4250 WHERE t1.rowid > 549755813888 ORDER BY t1.a DESC
4252 } {57 56 45 43 34 28 27 26 25 19 17 13 10 7 3}
4253 do_test boundary3-2.23.gt.3 {
4255 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
4259 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4260 do_test boundary3-2.23.gt.4 {
4262 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
4264 ORDER BY t1.rowid DESC
4266 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57}
4267 do_test boundary3-2.23.gt.5 {
4269 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
4273 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4274 do_test boundary3-2.23.gt.10 {
4276 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
4280 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4281 do_test boundary3-2.23.gt.11 {
4283 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
4285 ORDER BY t1.rowid DESC
4287 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57}
4288 do_test boundary3-2.23.ge.1 {
4290 SELECT t2.a FROM t1 JOIN t2 USING(a)
4291 WHERE t1.rowid >= 549755813888 ORDER BY t2.a
4293 } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 56 57}
4294 do_test boundary3-2.23.ge.2 {
4296 SELECT t2.a FROM t2 NATURAL JOIN t1
4297 WHERE t1.rowid >= 549755813888 ORDER BY t1.a DESC
4299 } {57 56 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
4300 do_test boundary3-2.23.ge.3 {
4302 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
4306 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4307 do_test boundary3-2.23.ge.4 {
4309 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
4311 ORDER BY t1.rowid DESC
4313 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35}
4314 do_test boundary3-2.23.ge.5 {
4316 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
4320 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4321 do_test boundary3-2.23.ge.10 {
4323 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
4327 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
4328 do_test boundary3-2.23.ge.11 {
4330 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
4332 ORDER BY t1.rowid DESC
4334 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35}
4335 do_test boundary3-2.23.lt.1 {
4337 SELECT t2.a FROM t1 JOIN t2 USING(a)
4338 WHERE t1.rowid < 549755813888 ORDER BY t2.a
4340 } {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}
4341 do_test boundary3-2.23.lt.2 {
4343 SELECT t2.a FROM t2 NATURAL JOIN t1
4344 WHERE t1.rowid < 549755813888 ORDER BY t1.a DESC
4346 } {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}
4347 do_test boundary3-2.23.lt.3 {
4349 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
4353 } {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}
4354 do_test boundary3-2.23.lt.4 {
4356 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
4358 ORDER BY t1.rowid DESC
4360 } {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}
4361 do_test boundary3-2.23.lt.5 {
4363 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
4367 } {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}
4368 do_test boundary3-2.23.lt.10 {
4370 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
4374 } {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}
4375 do_test boundary3-2.23.lt.11 {
4377 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
4379 ORDER BY t1.rowid DESC
4381 } {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}
4382 do_test boundary3-2.23.le.1 {
4384 SELECT t2.a FROM t1 JOIN t2 USING(a)
4385 WHERE t1.rowid <= 549755813888 ORDER BY t2.a
4387 } {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}
4388 do_test boundary3-2.23.le.2 {
4390 SELECT t2.a FROM t2 NATURAL JOIN t1
4391 WHERE t1.rowid <= 549755813888 ORDER BY t1.a DESC
4393 } {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}
4394 do_test boundary3-2.23.le.3 {
4396 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
4400 } {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}
4401 do_test boundary3-2.23.le.4 {
4403 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
4405 ORDER BY t1.rowid DESC
4407 } {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}
4408 do_test boundary3-2.23.le.5 {
4410 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
4414 } {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}
4415 do_test boundary3-2.23.le.10 {
4417 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
4421 } {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}
4422 do_test boundary3-2.23.le.11 {
4424 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
4426 ORDER BY t1.rowid DESC
4428 } {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}
4429 do_test boundary3-2.24.1 {
4431 SELECT t1.* FROM t1, t2 WHERE t1.rowid=8388607 AND t2.a=t1.a
4433 } {18 00000000007fffff}
4434 do_test boundary3-2.24.2 {
4436 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='00000000007fffff'
4439 do_test boundary3-2.24.3 {
4441 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=18
4443 } {8388607 00000000007fffff}
4444 do_test boundary3-2.24.gt.1 {
4446 SELECT t2.a FROM t1 JOIN t2 USING(a)
4447 WHERE t1.rowid > 8388607 ORDER BY t2.a
4449 } {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}
4450 do_test boundary3-2.24.gt.2 {
4452 SELECT t2.a FROM t2 NATURAL JOIN t1
4453 WHERE t1.rowid > 8388607 ORDER BY t1.a DESC
4455 } {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}
4456 do_test boundary3-2.24.gt.3 {
4458 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
4462 } {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}
4463 do_test boundary3-2.24.gt.4 {
4465 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
4467 ORDER BY t1.rowid DESC
4469 } {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}
4470 do_test boundary3-2.24.gt.5 {
4472 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
4476 } {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}
4477 do_test boundary3-2.24.gt.10 {
4479 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
4483 } {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}
4484 do_test boundary3-2.24.gt.11 {
4486 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
4488 ORDER BY t1.rowid DESC
4490 } {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}
4491 do_test boundary3-2.24.ge.1 {
4493 SELECT t2.a FROM t1 JOIN t2 USING(a)
4494 WHERE t1.rowid >= 8388607 ORDER BY t2.a
4496 } {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}
4497 do_test boundary3-2.24.ge.2 {
4499 SELECT t2.a FROM t2 NATURAL JOIN t1
4500 WHERE t1.rowid >= 8388607 ORDER BY t1.a DESC
4502 } {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}
4503 do_test boundary3-2.24.ge.3 {
4505 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
4509 } {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}
4510 do_test boundary3-2.24.ge.4 {
4512 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
4514 ORDER BY t1.rowid DESC
4516 } {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}
4517 do_test boundary3-2.24.ge.5 {
4519 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
4523 } {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}
4524 do_test boundary3-2.24.ge.10 {
4526 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
4530 } {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}
4531 do_test boundary3-2.24.ge.11 {
4533 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
4535 ORDER BY t1.rowid DESC
4537 } {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}
4538 do_test boundary3-2.24.lt.1 {
4540 SELECT t2.a FROM t1 JOIN t2 USING(a)
4541 WHERE t1.rowid < 8388607 ORDER BY t2.a
4543 } {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}
4544 do_test boundary3-2.24.lt.2 {
4546 SELECT t2.a FROM t2 NATURAL JOIN t1
4547 WHERE t1.rowid < 8388607 ORDER BY t1.a DESC
4549 } {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}
4550 do_test boundary3-2.24.lt.3 {
4552 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
4556 } {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}
4557 do_test boundary3-2.24.lt.4 {
4559 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
4561 ORDER BY t1.rowid DESC
4563 } {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}
4564 do_test boundary3-2.24.lt.5 {
4566 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
4570 } {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}
4571 do_test boundary3-2.24.lt.10 {
4573 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
4577 } {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}
4578 do_test boundary3-2.24.lt.11 {
4580 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
4582 ORDER BY t1.rowid DESC
4584 } {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}
4585 do_test boundary3-2.24.le.1 {
4587 SELECT t2.a FROM t1 JOIN t2 USING(a)
4588 WHERE t1.rowid <= 8388607 ORDER BY t2.a
4590 } {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}
4591 do_test boundary3-2.24.le.2 {
4593 SELECT t2.a FROM t2 NATURAL JOIN t1
4594 WHERE t1.rowid <= 8388607 ORDER BY t1.a DESC
4596 } {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}
4597 do_test boundary3-2.24.le.3 {
4599 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
4603 } {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}
4604 do_test boundary3-2.24.le.4 {
4606 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
4608 ORDER BY t1.rowid DESC
4610 } {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}
4611 do_test boundary3-2.24.le.5 {
4613 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
4617 } {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}
4618 do_test boundary3-2.24.le.10 {
4620 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
4624 } {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}
4625 do_test boundary3-2.24.le.11 {
4627 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
4629 ORDER BY t1.rowid DESC
4631 } {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}
4632 do_test boundary3-2.25.1 {
4634 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-3 AND t2.a=t1.a
4636 } {52 fffffffffffffffd}
4637 do_test boundary3-2.25.2 {
4639 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='fffffffffffffffd'
4642 do_test boundary3-2.25.3 {
4644 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=52
4646 } {-3 fffffffffffffffd}
4647 do_test boundary3-2.25.gt.1 {
4649 SELECT t2.a FROM t1 JOIN t2 USING(a)
4650 WHERE t1.rowid > -3 ORDER BY t2.a
4652 } {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}
4653 do_test boundary3-2.25.gt.2 {
4655 SELECT t2.a FROM t2 NATURAL JOIN t1
4656 WHERE t1.rowid > -3 ORDER BY t1.a DESC
4658 } {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}
4659 do_test boundary3-2.25.gt.3 {
4661 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
4665 } {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}
4666 do_test boundary3-2.25.gt.4 {
4668 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
4670 ORDER BY t1.rowid DESC
4672 } {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}
4673 do_test boundary3-2.25.gt.5 {
4675 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
4679 } {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}
4680 do_test boundary3-2.25.gt.10 {
4682 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
4686 } {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}
4687 do_test boundary3-2.25.gt.11 {
4689 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
4691 ORDER BY t1.rowid DESC
4693 } {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}
4694 do_test boundary3-2.25.ge.1 {
4696 SELECT t2.a FROM t1 JOIN t2 USING(a)
4697 WHERE t1.rowid >= -3 ORDER BY t2.a
4699 } {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}
4700 do_test boundary3-2.25.ge.2 {
4702 SELECT t2.a FROM t2 NATURAL JOIN t1
4703 WHERE t1.rowid >= -3 ORDER BY t1.a DESC
4705 } {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}
4706 do_test boundary3-2.25.ge.3 {
4708 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
4712 } {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}
4713 do_test boundary3-2.25.ge.4 {
4715 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
4717 ORDER BY t1.rowid DESC
4719 } {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}
4720 do_test boundary3-2.25.ge.5 {
4722 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
4726 } {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}
4727 do_test boundary3-2.25.ge.10 {
4729 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
4733 } {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}
4734 do_test boundary3-2.25.ge.11 {
4736 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
4738 ORDER BY t1.rowid DESC
4740 } {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}
4741 do_test boundary3-2.25.lt.1 {
4743 SELECT t2.a FROM t1 JOIN t2 USING(a)
4744 WHERE t1.rowid < -3 ORDER BY t2.a
4746 } {1 2 11 21 29 32 37 44 47 53 54 55 58 63 64}
4747 do_test boundary3-2.25.lt.2 {
4749 SELECT t2.a FROM t2 NATURAL JOIN t1
4750 WHERE t1.rowid < -3 ORDER BY t1.a DESC
4752 } {64 63 58 55 54 53 47 44 37 32 29 21 11 2 1}
4753 do_test boundary3-2.25.lt.3 {
4755 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
4759 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
4760 do_test boundary3-2.25.lt.4 {
4762 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
4764 ORDER BY t1.rowid DESC
4766 } {53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
4767 do_test boundary3-2.25.lt.5 {
4769 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
4773 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
4774 do_test boundary3-2.25.lt.10 {
4776 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
4780 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
4781 do_test boundary3-2.25.lt.11 {
4783 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
4785 ORDER BY t1.rowid DESC
4787 } {53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
4788 do_test boundary3-2.25.le.1 {
4790 SELECT t2.a FROM t1 JOIN t2 USING(a)
4791 WHERE t1.rowid <= -3 ORDER BY t2.a
4793 } {1 2 11 21 29 32 37 44 47 52 53 54 55 58 63 64}
4794 do_test boundary3-2.25.le.2 {
4796 SELECT t2.a FROM t2 NATURAL JOIN t1
4797 WHERE t1.rowid <= -3 ORDER BY t1.a DESC
4799 } {64 63 58 55 54 53 52 47 44 37 32 29 21 11 2 1}
4800 do_test boundary3-2.25.le.3 {
4802 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
4806 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
4807 do_test boundary3-2.25.le.4 {
4809 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
4811 ORDER BY t1.rowid DESC
4813 } {52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
4814 do_test boundary3-2.25.le.5 {
4816 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
4820 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
4821 do_test boundary3-2.25.le.10 {
4823 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
4827 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
4828 do_test boundary3-2.25.le.11 {
4830 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
4832 ORDER BY t1.rowid DESC
4834 } {52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
4835 do_test boundary3-2.26.1 {
4837 SELECT t1.* FROM t1, t2 WHERE t1.rowid=0 AND t2.a=t1.a
4839 } {59 0000000000000000}
4840 do_test boundary3-2.26.2 {
4842 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000000000000'
4845 do_test boundary3-2.26.3 {
4847 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=59
4849 } {0 0000000000000000}
4850 do_test boundary3-2.26.gt.1 {
4852 SELECT t2.a FROM t1 JOIN t2 USING(a)
4853 WHERE t1.rowid > 0 ORDER BY t2.a
4855 } {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}
4856 do_test boundary3-2.26.gt.2 {
4858 SELECT t2.a FROM t2 NATURAL JOIN t1
4859 WHERE t1.rowid > 0 ORDER BY t1.a DESC
4861 } {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}
4862 do_test boundary3-2.26.gt.3 {
4864 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
4868 } {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}
4869 do_test boundary3-2.26.gt.4 {
4871 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
4873 ORDER BY t1.rowid DESC
4875 } {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}
4876 do_test boundary3-2.26.gt.5 {
4878 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
4882 } {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}
4883 do_test boundary3-2.26.gt.10 {
4885 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
4889 } {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}
4890 do_test boundary3-2.26.gt.11 {
4892 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
4894 ORDER BY t1.rowid DESC
4896 } {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}
4897 do_test boundary3-2.26.ge.1 {
4899 SELECT t2.a FROM t1 JOIN t2 USING(a)
4900 WHERE t1.rowid >= 0 ORDER BY t2.a
4902 } {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}
4903 do_test boundary3-2.26.ge.2 {
4905 SELECT t2.a FROM t2 NATURAL JOIN t1
4906 WHERE t1.rowid >= 0 ORDER BY t1.a DESC
4908 } {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}
4909 do_test boundary3-2.26.ge.3 {
4911 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
4915 } {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}
4916 do_test boundary3-2.26.ge.4 {
4918 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
4920 ORDER BY t1.rowid DESC
4922 } {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}
4923 do_test boundary3-2.26.ge.5 {
4925 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
4929 } {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}
4930 do_test boundary3-2.26.ge.10 {
4932 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
4936 } {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}
4937 do_test boundary3-2.26.ge.11 {
4939 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
4941 ORDER BY t1.rowid DESC
4943 } {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}
4944 do_test boundary3-2.26.lt.1 {
4946 SELECT t2.a FROM t1 JOIN t2 USING(a)
4947 WHERE t1.rowid < 0 ORDER BY t2.a
4949 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 63 64}
4950 do_test boundary3-2.26.lt.2 {
4952 SELECT t2.a FROM t2 NATURAL JOIN t1
4953 WHERE t1.rowid < 0 ORDER BY t1.a DESC
4955 } {64 63 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
4956 do_test boundary3-2.26.lt.3 {
4958 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
4962 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
4963 do_test boundary3-2.26.lt.4 {
4965 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
4967 ORDER BY t1.rowid DESC
4969 } {38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
4970 do_test boundary3-2.26.lt.5 {
4972 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
4976 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
4977 do_test boundary3-2.26.lt.10 {
4979 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
4983 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
4984 do_test boundary3-2.26.lt.11 {
4986 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
4988 ORDER BY t1.rowid DESC
4990 } {38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
4991 do_test boundary3-2.26.le.1 {
4993 SELECT t2.a FROM t1 JOIN t2 USING(a)
4994 WHERE t1.rowid <= 0 ORDER BY t2.a
4996 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 63 64}
4997 do_test boundary3-2.26.le.2 {
4999 SELECT t2.a FROM t2 NATURAL JOIN t1
5000 WHERE t1.rowid <= 0 ORDER BY t1.a DESC
5002 } {64 63 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
5003 do_test boundary3-2.26.le.3 {
5005 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
5009 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59}
5010 do_test boundary3-2.26.le.4 {
5012 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
5014 ORDER BY t1.rowid DESC
5016 } {59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
5017 do_test boundary3-2.26.le.5 {
5019 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
5023 } {59 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
5024 do_test boundary3-2.26.le.10 {
5026 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
5030 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59}
5031 do_test boundary3-2.26.le.11 {
5033 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
5035 ORDER BY t1.rowid DESC
5037 } {59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
5038 do_test boundary3-2.27.1 {
5040 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-1 AND t2.a=t1.a
5042 } {38 ffffffffffffffff}
5043 do_test boundary3-2.27.2 {
5045 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='ffffffffffffffff'
5048 do_test boundary3-2.27.3 {
5050 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=38
5052 } {-1 ffffffffffffffff}
5053 do_test boundary3-2.27.gt.1 {
5055 SELECT t2.a FROM t1 JOIN t2 USING(a)
5056 WHERE t1.rowid > -1 ORDER BY t2.a
5058 } {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}
5059 do_test boundary3-2.27.gt.2 {
5061 SELECT t2.a FROM t2 NATURAL JOIN t1
5062 WHERE t1.rowid > -1 ORDER BY t1.a DESC
5064 } {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}
5065 do_test boundary3-2.27.gt.3 {
5067 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
5071 } {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}
5072 do_test boundary3-2.27.gt.4 {
5074 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
5076 ORDER BY t1.rowid DESC
5078 } {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}
5079 do_test boundary3-2.27.gt.5 {
5081 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
5085 } {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}
5086 do_test boundary3-2.27.gt.10 {
5088 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
5092 } {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}
5093 do_test boundary3-2.27.gt.11 {
5095 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
5097 ORDER BY t1.rowid DESC
5099 } {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}
5100 do_test boundary3-2.27.ge.1 {
5102 SELECT t2.a FROM t1 JOIN t2 USING(a)
5103 WHERE t1.rowid >= -1 ORDER BY t2.a
5105 } {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}
5106 do_test boundary3-2.27.ge.2 {
5108 SELECT t2.a FROM t2 NATURAL JOIN t1
5109 WHERE t1.rowid >= -1 ORDER BY t1.a DESC
5111 } {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}
5112 do_test boundary3-2.27.ge.3 {
5114 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
5118 } {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}
5119 do_test boundary3-2.27.ge.4 {
5121 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
5123 ORDER BY t1.rowid DESC
5125 } {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}
5126 do_test boundary3-2.27.ge.5 {
5128 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
5132 } {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}
5133 do_test boundary3-2.27.ge.10 {
5135 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
5139 } {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}
5140 do_test boundary3-2.27.ge.11 {
5142 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
5144 ORDER BY t1.rowid DESC
5146 } {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}
5147 do_test boundary3-2.27.lt.1 {
5149 SELECT t2.a FROM t1 JOIN t2 USING(a)
5150 WHERE t1.rowid < -1 ORDER BY t2.a
5152 } {1 2 11 21 29 32 33 37 44 47 52 53 54 55 58 63 64}
5153 do_test boundary3-2.27.lt.2 {
5155 SELECT t2.a FROM t2 NATURAL JOIN t1
5156 WHERE t1.rowid < -1 ORDER BY t1.a DESC
5158 } {64 63 58 55 54 53 52 47 44 37 33 32 29 21 11 2 1}
5159 do_test boundary3-2.27.lt.3 {
5161 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
5165 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
5166 do_test boundary3-2.27.lt.4 {
5168 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
5170 ORDER BY t1.rowid DESC
5172 } {33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
5173 do_test boundary3-2.27.lt.5 {
5175 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
5179 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
5180 do_test boundary3-2.27.lt.10 {
5182 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
5186 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
5187 do_test boundary3-2.27.lt.11 {
5189 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
5191 ORDER BY t1.rowid DESC
5193 } {33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
5194 do_test boundary3-2.27.le.1 {
5196 SELECT t2.a FROM t1 JOIN t2 USING(a)
5197 WHERE t1.rowid <= -1 ORDER BY t2.a
5199 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 63 64}
5200 do_test boundary3-2.27.le.2 {
5202 SELECT t2.a FROM t2 NATURAL JOIN t1
5203 WHERE t1.rowid <= -1 ORDER BY t1.a DESC
5205 } {64 63 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
5206 do_test boundary3-2.27.le.3 {
5208 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
5212 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
5213 do_test boundary3-2.27.le.4 {
5215 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
5217 ORDER BY t1.rowid DESC
5219 } {38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
5220 do_test boundary3-2.27.le.5 {
5222 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
5226 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
5227 do_test boundary3-2.27.le.10 {
5229 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
5233 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
5234 do_test boundary3-2.27.le.11 {
5236 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
5238 ORDER BY t1.rowid DESC
5240 } {38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
5241 do_test boundary3-2.28.1 {
5243 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-2 AND t2.a=t1.a
5245 } {33 fffffffffffffffe}
5246 do_test boundary3-2.28.2 {
5248 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='fffffffffffffffe'
5251 do_test boundary3-2.28.3 {
5253 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=33
5255 } {-2 fffffffffffffffe}
5256 do_test boundary3-2.28.gt.1 {
5258 SELECT t2.a FROM t1 JOIN t2 USING(a)
5259 WHERE t1.rowid > -2 ORDER BY t2.a
5261 } {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}
5262 do_test boundary3-2.28.gt.2 {
5264 SELECT t2.a FROM t2 NATURAL JOIN t1
5265 WHERE t1.rowid > -2 ORDER BY t1.a DESC
5267 } {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}
5268 do_test boundary3-2.28.gt.3 {
5270 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
5274 } {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}
5275 do_test boundary3-2.28.gt.4 {
5277 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
5279 ORDER BY t1.rowid DESC
5281 } {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}
5282 do_test boundary3-2.28.gt.5 {
5284 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
5288 } {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}
5289 do_test boundary3-2.28.gt.10 {
5291 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
5295 } {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}
5296 do_test boundary3-2.28.gt.11 {
5298 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
5300 ORDER BY t1.rowid DESC
5302 } {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}
5303 do_test boundary3-2.28.ge.1 {
5305 SELECT t2.a FROM t1 JOIN t2 USING(a)
5306 WHERE t1.rowid >= -2 ORDER BY t2.a
5308 } {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}
5309 do_test boundary3-2.28.ge.2 {
5311 SELECT t2.a FROM t2 NATURAL JOIN t1
5312 WHERE t1.rowid >= -2 ORDER BY t1.a DESC
5314 } {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}
5315 do_test boundary3-2.28.ge.3 {
5317 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
5321 } {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}
5322 do_test boundary3-2.28.ge.4 {
5324 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
5326 ORDER BY t1.rowid DESC
5328 } {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}
5329 do_test boundary3-2.28.ge.5 {
5331 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
5335 } {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}
5336 do_test boundary3-2.28.ge.10 {
5338 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
5342 } {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}
5343 do_test boundary3-2.28.ge.11 {
5345 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
5347 ORDER BY t1.rowid DESC
5349 } {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}
5350 do_test boundary3-2.28.lt.1 {
5352 SELECT t2.a FROM t1 JOIN t2 USING(a)
5353 WHERE t1.rowid < -2 ORDER BY t2.a
5355 } {1 2 11 21 29 32 37 44 47 52 53 54 55 58 63 64}
5356 do_test boundary3-2.28.lt.2 {
5358 SELECT t2.a FROM t2 NATURAL JOIN t1
5359 WHERE t1.rowid < -2 ORDER BY t1.a DESC
5361 } {64 63 58 55 54 53 52 47 44 37 32 29 21 11 2 1}
5362 do_test boundary3-2.28.lt.3 {
5364 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
5368 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
5369 do_test boundary3-2.28.lt.4 {
5371 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
5373 ORDER BY t1.rowid DESC
5375 } {52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
5376 do_test boundary3-2.28.lt.5 {
5378 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
5382 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
5383 do_test boundary3-2.28.lt.10 {
5385 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
5389 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
5390 do_test boundary3-2.28.lt.11 {
5392 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
5394 ORDER BY t1.rowid DESC
5396 } {52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
5397 do_test boundary3-2.28.le.1 {
5399 SELECT t2.a FROM t1 JOIN t2 USING(a)
5400 WHERE t1.rowid <= -2 ORDER BY t2.a
5402 } {1 2 11 21 29 32 33 37 44 47 52 53 54 55 58 63 64}
5403 do_test boundary3-2.28.le.2 {
5405 SELECT t2.a FROM t2 NATURAL JOIN t1
5406 WHERE t1.rowid <= -2 ORDER BY t1.a DESC
5408 } {64 63 58 55 54 53 52 47 44 37 33 32 29 21 11 2 1}
5409 do_test boundary3-2.28.le.3 {
5411 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
5415 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
5416 do_test boundary3-2.28.le.4 {
5418 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
5420 ORDER BY t1.rowid DESC
5422 } {33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
5423 do_test boundary3-2.28.le.5 {
5425 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
5429 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
5430 do_test boundary3-2.28.le.10 {
5432 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
5436 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
5437 do_test boundary3-2.28.le.11 {
5439 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
5441 ORDER BY t1.rowid DESC
5443 } {33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
5444 do_test boundary3-2.29.1 {
5446 SELECT t1.* FROM t1, t2 WHERE t1.rowid=2097152 AND t2.a=t1.a
5448 } {42 0000000000200000}
5449 do_test boundary3-2.29.2 {
5451 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000000200000'
5454 do_test boundary3-2.29.3 {
5456 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=42
5458 } {2097152 0000000000200000}
5459 do_test boundary3-2.29.gt.1 {
5461 SELECT t2.a FROM t1 JOIN t2 USING(a)
5462 WHERE t1.rowid > 2097152 ORDER BY t2.a
5464 } {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}
5465 do_test boundary3-2.29.gt.2 {
5467 SELECT t2.a FROM t2 NATURAL JOIN t1
5468 WHERE t1.rowid > 2097152 ORDER BY t1.a DESC
5470 } {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}
5471 do_test boundary3-2.29.gt.3 {
5473 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
5477 } {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}
5478 do_test boundary3-2.29.gt.4 {
5480 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
5482 ORDER BY t1.rowid DESC
5484 } {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}
5485 do_test boundary3-2.29.gt.5 {
5487 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
5491 } {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}
5492 do_test boundary3-2.29.gt.10 {
5494 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
5498 } {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}
5499 do_test boundary3-2.29.gt.11 {
5501 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
5503 ORDER BY t1.rowid DESC
5505 } {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}
5506 do_test boundary3-2.29.ge.1 {
5508 SELECT t2.a FROM t1 JOIN t2 USING(a)
5509 WHERE t1.rowid >= 2097152 ORDER BY t2.a
5511 } {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}
5512 do_test boundary3-2.29.ge.2 {
5514 SELECT t2.a FROM t2 NATURAL JOIN t1
5515 WHERE t1.rowid >= 2097152 ORDER BY t1.a DESC
5517 } {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}
5518 do_test boundary3-2.29.ge.3 {
5520 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
5524 } {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}
5525 do_test boundary3-2.29.ge.4 {
5527 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
5529 ORDER BY t1.rowid DESC
5531 } {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}
5532 do_test boundary3-2.29.ge.5 {
5534 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
5538 } {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}
5539 do_test boundary3-2.29.ge.10 {
5541 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
5545 } {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}
5546 do_test boundary3-2.29.ge.11 {
5548 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
5550 ORDER BY t1.rowid DESC
5552 } {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}
5553 do_test boundary3-2.29.lt.1 {
5555 SELECT t2.a FROM t1 JOIN t2 USING(a)
5556 WHERE t1.rowid < 2097152 ORDER BY t2.a
5558 } {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}
5559 do_test boundary3-2.29.lt.2 {
5561 SELECT t2.a FROM t2 NATURAL JOIN t1
5562 WHERE t1.rowid < 2097152 ORDER BY t1.a DESC
5564 } {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}
5565 do_test boundary3-2.29.lt.3 {
5567 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
5571 } {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}
5572 do_test boundary3-2.29.lt.4 {
5574 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
5576 ORDER BY t1.rowid DESC
5578 } {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}
5579 do_test boundary3-2.29.lt.5 {
5581 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
5585 } {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}
5586 do_test boundary3-2.29.lt.10 {
5588 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
5592 } {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}
5593 do_test boundary3-2.29.lt.11 {
5595 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
5597 ORDER BY t1.rowid DESC
5599 } {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}
5600 do_test boundary3-2.29.le.1 {
5602 SELECT t2.a FROM t1 JOIN t2 USING(a)
5603 WHERE t1.rowid <= 2097152 ORDER BY t2.a
5605 } {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}
5606 do_test boundary3-2.29.le.2 {
5608 SELECT t2.a FROM t2 NATURAL JOIN t1
5609 WHERE t1.rowid <= 2097152 ORDER BY t1.a DESC
5611 } {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}
5612 do_test boundary3-2.29.le.3 {
5614 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
5618 } {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}
5619 do_test boundary3-2.29.le.4 {
5621 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
5623 ORDER BY t1.rowid DESC
5625 } {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}
5626 do_test boundary3-2.29.le.5 {
5628 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
5632 } {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}
5633 do_test boundary3-2.29.le.10 {
5635 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
5639 } {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}
5640 do_test boundary3-2.29.le.11 {
5642 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
5644 ORDER BY t1.rowid DESC
5646 } {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}
5647 do_test boundary3-2.30.1 {
5649 SELECT t1.* FROM t1, t2 WHERE t1.rowid=128 AND t2.a=t1.a
5651 } {49 0000000000000080}
5652 do_test boundary3-2.30.2 {
5654 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000000000080'
5657 do_test boundary3-2.30.3 {
5659 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=49
5661 } {128 0000000000000080}
5662 do_test boundary3-2.30.gt.1 {
5664 SELECT t2.a FROM t1 JOIN t2 USING(a)
5665 WHERE t1.rowid > 128 ORDER BY t2.a
5667 } {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}
5668 do_test boundary3-2.30.gt.2 {
5670 SELECT t2.a FROM t2 NATURAL JOIN t1
5671 WHERE t1.rowid > 128 ORDER BY t1.a DESC
5673 } {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}
5674 do_test boundary3-2.30.gt.3 {
5676 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
5680 } {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}
5681 do_test boundary3-2.30.gt.4 {
5683 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
5685 ORDER BY t1.rowid DESC
5687 } {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}
5688 do_test boundary3-2.30.gt.5 {
5690 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
5694 } {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}
5695 do_test boundary3-2.30.gt.10 {
5697 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
5701 } {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}
5702 do_test boundary3-2.30.gt.11 {
5704 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
5706 ORDER BY t1.rowid DESC
5708 } {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}
5709 do_test boundary3-2.30.ge.1 {
5711 SELECT t2.a FROM t1 JOIN t2 USING(a)
5712 WHERE t1.rowid >= 128 ORDER BY t2.a
5714 } {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}
5715 do_test boundary3-2.30.ge.2 {
5717 SELECT t2.a FROM t2 NATURAL JOIN t1
5718 WHERE t1.rowid >= 128 ORDER BY t1.a DESC
5720 } {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}
5721 do_test boundary3-2.30.ge.3 {
5723 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
5727 } {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}
5728 do_test boundary3-2.30.ge.4 {
5730 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
5732 ORDER BY t1.rowid DESC
5734 } {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}
5735 do_test boundary3-2.30.ge.5 {
5737 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
5741 } {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}
5742 do_test boundary3-2.30.ge.10 {
5744 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
5748 } {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}
5749 do_test boundary3-2.30.ge.11 {
5751 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
5753 ORDER BY t1.rowid DESC
5755 } {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}
5756 do_test boundary3-2.30.lt.1 {
5758 SELECT t2.a FROM t1 JOIN t2 USING(a)
5759 WHERE t1.rowid < 128 ORDER BY t2.a
5761 } {1 2 4 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
5762 do_test boundary3-2.30.lt.2 {
5764 SELECT t2.a FROM t2 NATURAL JOIN t1
5765 WHERE t1.rowid < 128 ORDER BY t1.a DESC
5767 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 4 2 1}
5768 do_test boundary3-2.30.lt.3 {
5770 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
5774 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4}
5775 do_test boundary3-2.30.lt.4 {
5777 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
5779 ORDER BY t1.rowid DESC
5781 } {4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
5782 do_test boundary3-2.30.lt.5 {
5784 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
5788 } {59 60 41 5 31 4 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
5789 do_test boundary3-2.30.lt.10 {
5791 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
5795 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4}
5796 do_test boundary3-2.30.lt.11 {
5798 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
5800 ORDER BY t1.rowid DESC
5802 } {4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
5803 do_test boundary3-2.30.le.1 {
5805 SELECT t2.a FROM t1 JOIN t2 USING(a)
5806 WHERE t1.rowid <= 128 ORDER BY t2.a
5808 } {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}
5809 do_test boundary3-2.30.le.2 {
5811 SELECT t2.a FROM t2 NATURAL JOIN t1
5812 WHERE t1.rowid <= 128 ORDER BY t1.a DESC
5814 } {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}
5815 do_test boundary3-2.30.le.3 {
5817 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
5821 } {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}
5822 do_test boundary3-2.30.le.4 {
5824 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
5826 ORDER BY t1.rowid DESC
5828 } {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}
5829 do_test boundary3-2.30.le.5 {
5831 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
5835 } {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}
5836 do_test boundary3-2.30.le.10 {
5838 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
5842 } {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}
5843 do_test boundary3-2.30.le.11 {
5845 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
5847 ORDER BY t1.rowid DESC
5849 } {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}
5850 do_test boundary3-2.31.1 {
5852 SELECT t1.* FROM t1, t2 WHERE t1.rowid=255 AND t2.a=t1.a
5854 } {30 00000000000000ff}
5855 do_test boundary3-2.31.2 {
5857 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='00000000000000ff'
5860 do_test boundary3-2.31.3 {
5862 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=30
5864 } {255 00000000000000ff}
5865 do_test boundary3-2.31.gt.1 {
5867 SELECT t2.a FROM t1 JOIN t2 USING(a)
5868 WHERE t1.rowid > 255 ORDER BY t2.a
5870 } {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}
5871 do_test boundary3-2.31.gt.2 {
5873 SELECT t2.a FROM t2 NATURAL JOIN t1
5874 WHERE t1.rowid > 255 ORDER BY t1.a DESC
5876 } {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}
5877 do_test boundary3-2.31.gt.3 {
5879 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
5883 } {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}
5884 do_test boundary3-2.31.gt.4 {
5886 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
5888 ORDER BY t1.rowid DESC
5890 } {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}
5891 do_test boundary3-2.31.gt.5 {
5893 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
5897 } {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}
5898 do_test boundary3-2.31.gt.10 {
5900 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
5904 } {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}
5905 do_test boundary3-2.31.gt.11 {
5907 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
5909 ORDER BY t1.rowid DESC
5911 } {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}
5912 do_test boundary3-2.31.ge.1 {
5914 SELECT t2.a FROM t1 JOIN t2 USING(a)
5915 WHERE t1.rowid >= 255 ORDER BY t2.a
5917 } {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}
5918 do_test boundary3-2.31.ge.2 {
5920 SELECT t2.a FROM t2 NATURAL JOIN t1
5921 WHERE t1.rowid >= 255 ORDER BY t1.a DESC
5923 } {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}
5924 do_test boundary3-2.31.ge.3 {
5926 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
5930 } {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}
5931 do_test boundary3-2.31.ge.4 {
5933 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
5935 ORDER BY t1.rowid DESC
5937 } {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}
5938 do_test boundary3-2.31.ge.5 {
5940 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
5944 } {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}
5945 do_test boundary3-2.31.ge.10 {
5947 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
5951 } {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}
5952 do_test boundary3-2.31.ge.11 {
5954 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
5956 ORDER BY t1.rowid DESC
5958 } {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}
5959 do_test boundary3-2.31.lt.1 {
5961 SELECT t2.a FROM t1 JOIN t2 USING(a)
5962 WHERE t1.rowid < 255 ORDER BY t2.a
5964 } {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}
5965 do_test boundary3-2.31.lt.2 {
5967 SELECT t2.a FROM t2 NATURAL JOIN t1
5968 WHERE t1.rowid < 255 ORDER BY t1.a DESC
5970 } {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}
5971 do_test boundary3-2.31.lt.3 {
5973 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
5977 } {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}
5978 do_test boundary3-2.31.lt.4 {
5980 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
5982 ORDER BY t1.rowid DESC
5984 } {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}
5985 do_test boundary3-2.31.lt.5 {
5987 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
5991 } {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}
5992 do_test boundary3-2.31.lt.10 {
5994 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
5998 } {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}
5999 do_test boundary3-2.31.lt.11 {
6001 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
6003 ORDER BY t1.rowid DESC
6005 } {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}
6006 do_test boundary3-2.31.le.1 {
6008 SELECT t2.a FROM t1 JOIN t2 USING(a)
6009 WHERE t1.rowid <= 255 ORDER BY t2.a
6011 } {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}
6012 do_test boundary3-2.31.le.2 {
6014 SELECT t2.a FROM t2 NATURAL JOIN t1
6015 WHERE t1.rowid <= 255 ORDER BY t1.a DESC
6017 } {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}
6018 do_test boundary3-2.31.le.3 {
6020 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
6024 } {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}
6025 do_test boundary3-2.31.le.4 {
6027 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
6029 ORDER BY t1.rowid DESC
6031 } {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}
6032 do_test boundary3-2.31.le.5 {
6034 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
6038 } {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}
6039 do_test boundary3-2.31.le.10 {
6041 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
6045 } {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}
6046 do_test boundary3-2.31.le.11 {
6048 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
6050 ORDER BY t1.rowid DESC
6052 } {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}
6053 do_test boundary3-2.32.1 {
6055 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-2147483648 AND t2.a=t1.a
6057 } {11 ffffffff80000000}
6058 do_test boundary3-2.32.2 {
6060 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='ffffffff80000000'
6063 do_test boundary3-2.32.3 {
6065 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=11
6067 } {-2147483648 ffffffff80000000}
6068 do_test boundary3-2.32.gt.1 {
6070 SELECT t2.a FROM t1 JOIN t2 USING(a)
6071 WHERE t1.rowid > -2147483648 ORDER BY t2.a
6073 } {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}
6074 do_test boundary3-2.32.gt.2 {
6076 SELECT t2.a FROM t2 NATURAL JOIN t1
6077 WHERE t1.rowid > -2147483648 ORDER BY t1.a DESC
6079 } {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}
6080 do_test boundary3-2.32.gt.3 {
6082 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
6086 } {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}
6087 do_test boundary3-2.32.gt.4 {
6089 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
6091 ORDER BY t1.rowid DESC
6093 } {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}
6094 do_test boundary3-2.32.gt.5 {
6096 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
6100 } {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}
6101 do_test boundary3-2.32.gt.10 {
6103 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
6107 } {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}
6108 do_test boundary3-2.32.gt.11 {
6110 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
6112 ORDER BY t1.rowid DESC
6114 } {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}
6115 do_test boundary3-2.32.ge.1 {
6117 SELECT t2.a FROM t1 JOIN t2 USING(a)
6118 WHERE t1.rowid >= -2147483648 ORDER BY t2.a
6120 } {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}
6121 do_test boundary3-2.32.ge.2 {
6123 SELECT t2.a FROM t2 NATURAL JOIN t1
6124 WHERE t1.rowid >= -2147483648 ORDER BY t1.a DESC
6126 } {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}
6127 do_test boundary3-2.32.ge.3 {
6129 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
6133 } {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}
6134 do_test boundary3-2.32.ge.4 {
6136 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
6138 ORDER BY t1.rowid DESC
6140 } {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}
6141 do_test boundary3-2.32.ge.5 {
6143 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
6147 } {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}
6148 do_test boundary3-2.32.ge.10 {
6150 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
6154 } {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}
6155 do_test boundary3-2.32.ge.11 {
6157 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
6159 ORDER BY t1.rowid DESC
6161 } {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}
6162 do_test boundary3-2.32.lt.1 {
6164 SELECT t2.a FROM t1 JOIN t2 USING(a)
6165 WHERE t1.rowid < -2147483648 ORDER BY t2.a
6167 } {2 21 44 47 55 58 63 64}
6168 do_test boundary3-2.32.lt.2 {
6170 SELECT t2.a FROM t2 NATURAL JOIN t1
6171 WHERE t1.rowid < -2147483648 ORDER BY t1.a DESC
6173 } {64 63 58 55 47 44 21 2}
6174 do_test boundary3-2.32.lt.3 {
6176 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
6180 } {55 2 64 21 44 58 63 47}
6181 do_test boundary3-2.32.lt.4 {
6183 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
6185 ORDER BY t1.rowid DESC
6187 } {47 63 58 44 21 64 2 55}
6188 do_test boundary3-2.32.lt.5 {
6190 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
6194 } {55 2 64 21 44 58 63 47}
6195 do_test boundary3-2.32.lt.10 {
6197 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
6201 } {55 2 64 21 44 58 63 47}
6202 do_test boundary3-2.32.lt.11 {
6204 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
6206 ORDER BY t1.rowid DESC
6208 } {47 63 58 44 21 64 2 55}
6209 do_test boundary3-2.32.le.1 {
6211 SELECT t2.a FROM t1 JOIN t2 USING(a)
6212 WHERE t1.rowid <= -2147483648 ORDER BY t2.a
6214 } {2 11 21 44 47 55 58 63 64}
6215 do_test boundary3-2.32.le.2 {
6217 SELECT t2.a FROM t2 NATURAL JOIN t1
6218 WHERE t1.rowid <= -2147483648 ORDER BY t1.a DESC
6220 } {64 63 58 55 47 44 21 11 2}
6221 do_test boundary3-2.32.le.3 {
6223 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
6227 } {55 2 64 21 44 58 63 47 11}
6228 do_test boundary3-2.32.le.4 {
6230 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
6232 ORDER BY t1.rowid DESC
6234 } {11 47 63 58 44 21 64 2 55}
6235 do_test boundary3-2.32.le.5 {
6237 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
6241 } {55 2 64 21 44 58 63 47 11}
6242 do_test boundary3-2.32.le.10 {
6244 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
6248 } {55 2 64 21 44 58 63 47 11}
6249 do_test boundary3-2.32.le.11 {
6251 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
6253 ORDER BY t1.rowid DESC
6255 } {11 47 63 58 44 21 64 2 55}
6256 do_test boundary3-2.33.1 {
6258 SELECT t1.* FROM t1, t2 WHERE t1.rowid=34359738367 AND t2.a=t1.a
6260 } {39 00000007ffffffff}
6261 do_test boundary3-2.33.2 {
6263 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='00000007ffffffff'
6266 do_test boundary3-2.33.3 {
6268 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=39
6270 } {34359738367 00000007ffffffff}
6271 do_test boundary3-2.33.gt.1 {
6273 SELECT t2.a FROM t1 JOIN t2 USING(a)
6274 WHERE t1.rowid > 34359738367 ORDER BY t2.a
6276 } {3 7 10 13 17 19 22 25 26 27 28 34 35 43 45 46 56 57}
6277 do_test boundary3-2.33.gt.2 {
6279 SELECT t2.a FROM t2 NATURAL JOIN t1
6280 WHERE t1.rowid > 34359738367 ORDER BY t1.a DESC
6282 } {57 56 46 45 43 35 34 28 27 26 25 22 19 17 13 10 7 3}
6283 do_test boundary3-2.33.gt.3 {
6285 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
6289 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
6290 do_test boundary3-2.33.gt.4 {
6292 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
6294 ORDER BY t1.rowid DESC
6296 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22}
6297 do_test boundary3-2.33.gt.5 {
6299 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
6303 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
6304 do_test boundary3-2.33.gt.10 {
6306 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
6310 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
6311 do_test boundary3-2.33.gt.11 {
6313 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
6315 ORDER BY t1.rowid DESC
6317 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22}
6318 do_test boundary3-2.33.ge.1 {
6320 SELECT t2.a FROM t1 JOIN t2 USING(a)
6321 WHERE t1.rowid >= 34359738367 ORDER BY t2.a
6323 } {3 7 10 13 17 19 22 25 26 27 28 34 35 39 43 45 46 56 57}
6324 do_test boundary3-2.33.ge.2 {
6326 SELECT t2.a FROM t2 NATURAL JOIN t1
6327 WHERE t1.rowid >= 34359738367 ORDER BY t1.a DESC
6329 } {57 56 46 45 43 39 35 34 28 27 26 25 22 19 17 13 10 7 3}
6330 do_test boundary3-2.33.ge.3 {
6332 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
6336 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
6337 do_test boundary3-2.33.ge.4 {
6339 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
6341 ORDER BY t1.rowid DESC
6343 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39}
6344 do_test boundary3-2.33.ge.5 {
6346 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
6350 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
6351 do_test boundary3-2.33.ge.10 {
6353 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
6357 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
6358 do_test boundary3-2.33.ge.11 {
6360 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
6362 ORDER BY t1.rowid DESC
6364 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39}
6365 do_test boundary3-2.33.lt.1 {
6367 SELECT t2.a FROM t1 JOIN t2 USING(a)
6368 WHERE t1.rowid < 34359738367 ORDER BY t2.a
6370 } {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}
6371 do_test boundary3-2.33.lt.2 {
6373 SELECT t2.a FROM t2 NATURAL JOIN t1
6374 WHERE t1.rowid < 34359738367 ORDER BY t1.a DESC
6376 } {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}
6377 do_test boundary3-2.33.lt.3 {
6379 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
6383 } {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}
6384 do_test boundary3-2.33.lt.4 {
6386 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
6388 ORDER BY t1.rowid DESC
6390 } {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}
6391 do_test boundary3-2.33.lt.5 {
6393 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
6397 } {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}
6398 do_test boundary3-2.33.lt.10 {
6400 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
6404 } {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}
6405 do_test boundary3-2.33.lt.11 {
6407 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
6409 ORDER BY t1.rowid DESC
6411 } {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}
6412 do_test boundary3-2.33.le.1 {
6414 SELECT t2.a FROM t1 JOIN t2 USING(a)
6415 WHERE t1.rowid <= 34359738367 ORDER BY t2.a
6417 } {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}
6418 do_test boundary3-2.33.le.2 {
6420 SELECT t2.a FROM t2 NATURAL JOIN t1
6421 WHERE t1.rowid <= 34359738367 ORDER BY t1.a DESC
6423 } {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}
6424 do_test boundary3-2.33.le.3 {
6426 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
6430 } {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}
6431 do_test boundary3-2.33.le.4 {
6433 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
6435 ORDER BY t1.rowid DESC
6437 } {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}
6438 do_test boundary3-2.33.le.5 {
6440 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
6444 } {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}
6445 do_test boundary3-2.33.le.10 {
6447 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
6451 } {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}
6452 do_test boundary3-2.33.le.11 {
6454 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
6456 ORDER BY t1.rowid DESC
6458 } {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}
6459 do_test boundary3-2.34.1 {
6461 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-549755813889 AND t2.a=t1.a
6463 } {58 ffffff7fffffffff}
6464 do_test boundary3-2.34.2 {
6466 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='ffffff7fffffffff'
6468 } {-549755813889 58}
6469 do_test boundary3-2.34.3 {
6471 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=58
6473 } {-549755813889 ffffff7fffffffff}
6474 do_test boundary3-2.34.gt.1 {
6476 SELECT t2.a FROM t1 JOIN t2 USING(a)
6477 WHERE t1.rowid > -549755813889 ORDER BY t2.a
6479 } {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}
6480 do_test boundary3-2.34.gt.2 {
6482 SELECT t2.a FROM t2 NATURAL JOIN t1
6483 WHERE t1.rowid > -549755813889 ORDER BY t1.a DESC
6485 } {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}
6486 do_test boundary3-2.34.gt.3 {
6488 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
6492 } {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}
6493 do_test boundary3-2.34.gt.4 {
6495 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
6497 ORDER BY t1.rowid DESC
6499 } {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}
6500 do_test boundary3-2.34.gt.5 {
6502 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
6506 } {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}
6507 do_test boundary3-2.34.gt.10 {
6509 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
6513 } {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}
6514 do_test boundary3-2.34.gt.11 {
6516 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
6518 ORDER BY t1.rowid DESC
6520 } {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}
6521 do_test boundary3-2.34.ge.1 {
6523 SELECT t2.a FROM t1 JOIN t2 USING(a)
6524 WHERE t1.rowid >= -549755813889 ORDER BY t2.a
6526 } {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}
6527 do_test boundary3-2.34.ge.2 {
6529 SELECT t2.a FROM t2 NATURAL JOIN t1
6530 WHERE t1.rowid >= -549755813889 ORDER BY t1.a DESC
6532 } {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}
6533 do_test boundary3-2.34.ge.3 {
6535 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
6539 } {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}
6540 do_test boundary3-2.34.ge.4 {
6542 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
6544 ORDER BY t1.rowid DESC
6546 } {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}
6547 do_test boundary3-2.34.ge.5 {
6549 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
6553 } {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}
6554 do_test boundary3-2.34.ge.10 {
6556 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
6560 } {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}
6561 do_test boundary3-2.34.ge.11 {
6563 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
6565 ORDER BY t1.rowid DESC
6567 } {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}
6568 do_test boundary3-2.34.lt.1 {
6570 SELECT t2.a FROM t1 JOIN t2 USING(a)
6571 WHERE t1.rowid < -549755813889 ORDER BY t2.a
6574 do_test boundary3-2.34.lt.2 {
6576 SELECT t2.a FROM t2 NATURAL JOIN t1
6577 WHERE t1.rowid < -549755813889 ORDER BY t1.a DESC
6580 do_test boundary3-2.34.lt.3 {
6582 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
6587 do_test boundary3-2.34.lt.4 {
6589 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
6591 ORDER BY t1.rowid DESC
6594 do_test boundary3-2.34.lt.5 {
6596 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
6601 do_test boundary3-2.34.lt.10 {
6603 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
6608 do_test boundary3-2.34.lt.11 {
6610 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
6612 ORDER BY t1.rowid DESC
6615 do_test boundary3-2.34.le.1 {
6617 SELECT t2.a FROM t1 JOIN t2 USING(a)
6618 WHERE t1.rowid <= -549755813889 ORDER BY t2.a
6620 } {2 21 44 55 58 64}
6621 do_test boundary3-2.34.le.2 {
6623 SELECT t2.a FROM t2 NATURAL JOIN t1
6624 WHERE t1.rowid <= -549755813889 ORDER BY t1.a DESC
6626 } {64 58 55 44 21 2}
6627 do_test boundary3-2.34.le.3 {
6629 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
6633 } {55 2 64 21 44 58}
6634 do_test boundary3-2.34.le.4 {
6636 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
6638 ORDER BY t1.rowid DESC
6640 } {58 44 21 64 2 55}
6641 do_test boundary3-2.34.le.5 {
6643 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
6647 } {55 2 64 21 44 58}
6648 do_test boundary3-2.34.le.10 {
6650 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
6654 } {55 2 64 21 44 58}
6655 do_test boundary3-2.34.le.11 {
6657 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
6659 ORDER BY t1.rowid DESC
6661 } {58 44 21 64 2 55}
6662 do_test boundary3-2.35.1 {
6664 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-32768 AND t2.a=t1.a
6666 } {32 ffffffffffff8000}
6667 do_test boundary3-2.35.2 {
6669 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='ffffffffffff8000'
6672 do_test boundary3-2.35.3 {
6674 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=32
6676 } {-32768 ffffffffffff8000}
6677 do_test boundary3-2.35.gt.1 {
6679 SELECT t2.a FROM t1 JOIN t2 USING(a)
6680 WHERE t1.rowid > -32768 ORDER BY t2.a
6682 } {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}
6683 do_test boundary3-2.35.gt.2 {
6685 SELECT t2.a FROM t2 NATURAL JOIN t1
6686 WHERE t1.rowid > -32768 ORDER BY t1.a DESC
6688 } {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}
6689 do_test boundary3-2.35.gt.3 {
6691 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
6695 } {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}
6696 do_test boundary3-2.35.gt.4 {
6698 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
6700 ORDER BY t1.rowid DESC
6702 } {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}
6703 do_test boundary3-2.35.gt.5 {
6705 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
6709 } {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}
6710 do_test boundary3-2.35.gt.10 {
6712 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
6716 } {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}
6717 do_test boundary3-2.35.gt.11 {
6719 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
6721 ORDER BY t1.rowid DESC
6723 } {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}
6724 do_test boundary3-2.35.ge.1 {
6726 SELECT t2.a FROM t1 JOIN t2 USING(a)
6727 WHERE t1.rowid >= -32768 ORDER BY t2.a
6729 } {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}
6730 do_test boundary3-2.35.ge.2 {
6732 SELECT t2.a FROM t2 NATURAL JOIN t1
6733 WHERE t1.rowid >= -32768 ORDER BY t1.a DESC
6735 } {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}
6736 do_test boundary3-2.35.ge.3 {
6738 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
6742 } {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}
6743 do_test boundary3-2.35.ge.4 {
6745 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
6747 ORDER BY t1.rowid DESC
6749 } {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}
6750 do_test boundary3-2.35.ge.5 {
6752 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
6756 } {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}
6757 do_test boundary3-2.35.ge.10 {
6759 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
6763 } {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}
6764 do_test boundary3-2.35.ge.11 {
6766 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
6768 ORDER BY t1.rowid DESC
6770 } {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}
6771 do_test boundary3-2.35.lt.1 {
6773 SELECT t2.a FROM t1 JOIN t2 USING(a)
6774 WHERE t1.rowid < -32768 ORDER BY t2.a
6776 } {1 2 11 21 29 37 44 47 55 58 63 64}
6777 do_test boundary3-2.35.lt.2 {
6779 SELECT t2.a FROM t2 NATURAL JOIN t1
6780 WHERE t1.rowid < -32768 ORDER BY t1.a DESC
6782 } {64 63 58 55 47 44 37 29 21 11 2 1}
6783 do_test boundary3-2.35.lt.3 {
6785 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
6789 } {55 2 64 21 44 58 63 47 11 1 37 29}
6790 do_test boundary3-2.35.lt.4 {
6792 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
6794 ORDER BY t1.rowid DESC
6796 } {29 37 1 11 47 63 58 44 21 64 2 55}
6797 do_test boundary3-2.35.lt.5 {
6799 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
6803 } {55 2 64 21 44 58 63 47 11 1 37 29}
6804 do_test boundary3-2.35.lt.10 {
6806 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
6810 } {55 2 64 21 44 58 63 47 11 1 37 29}
6811 do_test boundary3-2.35.lt.11 {
6813 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
6815 ORDER BY t1.rowid DESC
6817 } {29 37 1 11 47 63 58 44 21 64 2 55}
6818 do_test boundary3-2.35.le.1 {
6820 SELECT t2.a FROM t1 JOIN t2 USING(a)
6821 WHERE t1.rowid <= -32768 ORDER BY t2.a
6823 } {1 2 11 21 29 32 37 44 47 55 58 63 64}
6824 do_test boundary3-2.35.le.2 {
6826 SELECT t2.a FROM t2 NATURAL JOIN t1
6827 WHERE t1.rowid <= -32768 ORDER BY t1.a DESC
6829 } {64 63 58 55 47 44 37 32 29 21 11 2 1}
6830 do_test boundary3-2.35.le.3 {
6832 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
6836 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
6837 do_test boundary3-2.35.le.4 {
6839 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
6841 ORDER BY t1.rowid DESC
6843 } {32 29 37 1 11 47 63 58 44 21 64 2 55}
6844 do_test boundary3-2.35.le.5 {
6846 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
6850 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
6851 do_test boundary3-2.35.le.10 {
6853 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
6857 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
6858 do_test boundary3-2.35.le.11 {
6860 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
6862 ORDER BY t1.rowid DESC
6864 } {32 29 37 1 11 47 63 58 44 21 64 2 55}
6865 do_test boundary3-2.36.1 {
6867 SELECT t1.* FROM t1, t2 WHERE t1.rowid=2147483647 AND t2.a=t1.a
6869 } {20 000000007fffffff}
6870 do_test boundary3-2.36.2 {
6872 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='000000007fffffff'
6875 do_test boundary3-2.36.3 {
6877 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=20
6879 } {2147483647 000000007fffffff}
6880 do_test boundary3-2.36.gt.1 {
6882 SELECT t2.a FROM t1 JOIN t2 USING(a)
6883 WHERE t1.rowid > 2147483647 ORDER BY t2.a
6885 } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
6886 do_test boundary3-2.36.gt.2 {
6888 SELECT t2.a FROM t2 NATURAL JOIN t1
6889 WHERE t1.rowid > 2147483647 ORDER BY t1.a DESC
6891 } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
6892 do_test boundary3-2.36.gt.3 {
6894 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
6898 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
6899 do_test boundary3-2.36.gt.4 {
6901 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
6903 ORDER BY t1.rowid DESC
6905 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51}
6906 do_test boundary3-2.36.gt.5 {
6908 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
6912 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
6913 do_test boundary3-2.36.gt.10 {
6915 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
6919 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
6920 do_test boundary3-2.36.gt.11 {
6922 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
6924 ORDER BY t1.rowid DESC
6926 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51}
6927 do_test boundary3-2.36.ge.1 {
6929 SELECT t2.a FROM t1 JOIN t2 USING(a)
6930 WHERE t1.rowid >= 2147483647 ORDER BY t2.a
6932 } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
6933 do_test boundary3-2.36.ge.2 {
6935 SELECT t2.a FROM t2 NATURAL JOIN t1
6936 WHERE t1.rowid >= 2147483647 ORDER BY t1.a DESC
6938 } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
6939 do_test boundary3-2.36.ge.3 {
6941 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
6945 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
6946 do_test boundary3-2.36.ge.4 {
6948 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
6950 ORDER BY t1.rowid DESC
6952 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20}
6953 do_test boundary3-2.36.ge.5 {
6955 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
6959 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
6960 do_test boundary3-2.36.ge.10 {
6962 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
6966 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
6967 do_test boundary3-2.36.ge.11 {
6969 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
6971 ORDER BY t1.rowid DESC
6973 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20}
6974 do_test boundary3-2.36.lt.1 {
6976 SELECT t2.a FROM t1 JOIN t2 USING(a)
6977 WHERE t1.rowid < 2147483647 ORDER BY t2.a
6979 } {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}
6980 do_test boundary3-2.36.lt.2 {
6982 SELECT t2.a FROM t2 NATURAL JOIN t1
6983 WHERE t1.rowid < 2147483647 ORDER BY t1.a DESC
6985 } {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}
6986 do_test boundary3-2.36.lt.3 {
6988 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
6992 } {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}
6993 do_test boundary3-2.36.lt.4 {
6995 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
6997 ORDER BY t1.rowid DESC
6999 } {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}
7000 do_test boundary3-2.36.lt.5 {
7002 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
7006 } {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}
7007 do_test boundary3-2.36.lt.10 {
7009 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
7013 } {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}
7014 do_test boundary3-2.36.lt.11 {
7016 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
7018 ORDER BY t1.rowid DESC
7020 } {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}
7021 do_test boundary3-2.36.le.1 {
7023 SELECT t2.a FROM t1 JOIN t2 USING(a)
7024 WHERE t1.rowid <= 2147483647 ORDER BY t2.a
7026 } {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}
7027 do_test boundary3-2.36.le.2 {
7029 SELECT t2.a FROM t2 NATURAL JOIN t1
7030 WHERE t1.rowid <= 2147483647 ORDER BY t1.a DESC
7032 } {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}
7033 do_test boundary3-2.36.le.3 {
7035 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
7039 } {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}
7040 do_test boundary3-2.36.le.4 {
7042 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
7044 ORDER BY t1.rowid DESC
7046 } {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}
7047 do_test boundary3-2.36.le.5 {
7049 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
7053 } {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}
7054 do_test boundary3-2.36.le.10 {
7056 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
7060 } {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}
7061 do_test boundary3-2.36.le.11 {
7063 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
7065 ORDER BY t1.rowid DESC
7067 } {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}
7068 do_test boundary3-2.37.1 {
7070 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-129 AND t2.a=t1.a
7072 } {54 ffffffffffffff7f}
7073 do_test boundary3-2.37.2 {
7075 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='ffffffffffffff7f'
7078 do_test boundary3-2.37.3 {
7080 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=54
7082 } {-129 ffffffffffffff7f}
7083 do_test boundary3-2.37.gt.1 {
7085 SELECT t2.a FROM t1 JOIN t2 USING(a)
7086 WHERE t1.rowid > -129 ORDER BY t2.a
7088 } {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}
7089 do_test boundary3-2.37.gt.2 {
7091 SELECT t2.a FROM t2 NATURAL JOIN t1
7092 WHERE t1.rowid > -129 ORDER BY t1.a DESC
7094 } {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}
7095 do_test boundary3-2.37.gt.3 {
7097 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
7101 } {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}
7102 do_test boundary3-2.37.gt.4 {
7104 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
7106 ORDER BY t1.rowid DESC
7108 } {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}
7109 do_test boundary3-2.37.gt.5 {
7111 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
7115 } {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}
7116 do_test boundary3-2.37.gt.10 {
7118 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
7122 } {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}
7123 do_test boundary3-2.37.gt.11 {
7125 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
7127 ORDER BY t1.rowid DESC
7129 } {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}
7130 do_test boundary3-2.37.ge.1 {
7132 SELECT t2.a FROM t1 JOIN t2 USING(a)
7133 WHERE t1.rowid >= -129 ORDER BY t2.a
7135 } {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}
7136 do_test boundary3-2.37.ge.2 {
7138 SELECT t2.a FROM t2 NATURAL JOIN t1
7139 WHERE t1.rowid >= -129 ORDER BY t1.a DESC
7141 } {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}
7142 do_test boundary3-2.37.ge.3 {
7144 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
7148 } {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}
7149 do_test boundary3-2.37.ge.4 {
7151 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
7153 ORDER BY t1.rowid DESC
7155 } {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}
7156 do_test boundary3-2.37.ge.5 {
7158 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
7162 } {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}
7163 do_test boundary3-2.37.ge.10 {
7165 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
7169 } {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}
7170 do_test boundary3-2.37.ge.11 {
7172 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
7174 ORDER BY t1.rowid DESC
7176 } {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}
7177 do_test boundary3-2.37.lt.1 {
7179 SELECT t2.a FROM t1 JOIN t2 USING(a)
7180 WHERE t1.rowid < -129 ORDER BY t2.a
7182 } {1 2 11 21 29 32 37 44 47 55 58 63 64}
7183 do_test boundary3-2.37.lt.2 {
7185 SELECT t2.a FROM t2 NATURAL JOIN t1
7186 WHERE t1.rowid < -129 ORDER BY t1.a DESC
7188 } {64 63 58 55 47 44 37 32 29 21 11 2 1}
7189 do_test boundary3-2.37.lt.3 {
7191 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
7195 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
7196 do_test boundary3-2.37.lt.4 {
7198 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
7200 ORDER BY t1.rowid DESC
7202 } {32 29 37 1 11 47 63 58 44 21 64 2 55}
7203 do_test boundary3-2.37.lt.5 {
7205 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
7209 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
7210 do_test boundary3-2.37.lt.10 {
7212 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
7216 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
7217 do_test boundary3-2.37.lt.11 {
7219 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
7221 ORDER BY t1.rowid DESC
7223 } {32 29 37 1 11 47 63 58 44 21 64 2 55}
7224 do_test boundary3-2.37.le.1 {
7226 SELECT t2.a FROM t1 JOIN t2 USING(a)
7227 WHERE t1.rowid <= -129 ORDER BY t2.a
7229 } {1 2 11 21 29 32 37 44 47 54 55 58 63 64}
7230 do_test boundary3-2.37.le.2 {
7232 SELECT t2.a FROM t2 NATURAL JOIN t1
7233 WHERE t1.rowid <= -129 ORDER BY t1.a DESC
7235 } {64 63 58 55 54 47 44 37 32 29 21 11 2 1}
7236 do_test boundary3-2.37.le.3 {
7238 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
7242 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
7243 do_test boundary3-2.37.le.4 {
7245 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
7247 ORDER BY t1.rowid DESC
7249 } {54 32 29 37 1 11 47 63 58 44 21 64 2 55}
7250 do_test boundary3-2.37.le.5 {
7252 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
7256 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
7257 do_test boundary3-2.37.le.10 {
7259 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
7263 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
7264 do_test boundary3-2.37.le.11 {
7266 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
7268 ORDER BY t1.rowid DESC
7270 } {54 32 29 37 1 11 47 63 58 44 21 64 2 55}
7271 do_test boundary3-2.38.1 {
7273 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-128 AND t2.a=t1.a
7275 } {53 ffffffffffffff80}
7276 do_test boundary3-2.38.2 {
7278 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='ffffffffffffff80'
7281 do_test boundary3-2.38.3 {
7283 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=53
7285 } {-128 ffffffffffffff80}
7286 do_test boundary3-2.38.gt.1 {
7288 SELECT t2.a FROM t1 JOIN t2 USING(a)
7289 WHERE t1.rowid > -128 ORDER BY t2.a
7291 } {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}
7292 do_test boundary3-2.38.gt.2 {
7294 SELECT t2.a FROM t2 NATURAL JOIN t1
7295 WHERE t1.rowid > -128 ORDER BY t1.a DESC
7297 } {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}
7298 do_test boundary3-2.38.gt.3 {
7300 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
7304 } {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}
7305 do_test boundary3-2.38.gt.4 {
7307 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
7309 ORDER BY t1.rowid DESC
7311 } {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}
7312 do_test boundary3-2.38.gt.5 {
7314 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
7318 } {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}
7319 do_test boundary3-2.38.gt.10 {
7321 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
7325 } {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}
7326 do_test boundary3-2.38.gt.11 {
7328 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
7330 ORDER BY t1.rowid DESC
7332 } {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}
7333 do_test boundary3-2.38.ge.1 {
7335 SELECT t2.a FROM t1 JOIN t2 USING(a)
7336 WHERE t1.rowid >= -128 ORDER BY t2.a
7338 } {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}
7339 do_test boundary3-2.38.ge.2 {
7341 SELECT t2.a FROM t2 NATURAL JOIN t1
7342 WHERE t1.rowid >= -128 ORDER BY t1.a DESC
7344 } {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}
7345 do_test boundary3-2.38.ge.3 {
7347 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
7351 } {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}
7352 do_test boundary3-2.38.ge.4 {
7354 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
7356 ORDER BY t1.rowid DESC
7358 } {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}
7359 do_test boundary3-2.38.ge.5 {
7361 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
7365 } {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}
7366 do_test boundary3-2.38.ge.10 {
7368 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
7372 } {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}
7373 do_test boundary3-2.38.ge.11 {
7375 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
7377 ORDER BY t1.rowid DESC
7379 } {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}
7380 do_test boundary3-2.38.lt.1 {
7382 SELECT t2.a FROM t1 JOIN t2 USING(a)
7383 WHERE t1.rowid < -128 ORDER BY t2.a
7385 } {1 2 11 21 29 32 37 44 47 54 55 58 63 64}
7386 do_test boundary3-2.38.lt.2 {
7388 SELECT t2.a FROM t2 NATURAL JOIN t1
7389 WHERE t1.rowid < -128 ORDER BY t1.a DESC
7391 } {64 63 58 55 54 47 44 37 32 29 21 11 2 1}
7392 do_test boundary3-2.38.lt.3 {
7394 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
7398 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
7399 do_test boundary3-2.38.lt.4 {
7401 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
7403 ORDER BY t1.rowid DESC
7405 } {54 32 29 37 1 11 47 63 58 44 21 64 2 55}
7406 do_test boundary3-2.38.lt.5 {
7408 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
7412 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
7413 do_test boundary3-2.38.lt.10 {
7415 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
7419 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
7420 do_test boundary3-2.38.lt.11 {
7422 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
7424 ORDER BY t1.rowid DESC
7426 } {54 32 29 37 1 11 47 63 58 44 21 64 2 55}
7427 do_test boundary3-2.38.le.1 {
7429 SELECT t2.a FROM t1 JOIN t2 USING(a)
7430 WHERE t1.rowid <= -128 ORDER BY t2.a
7432 } {1 2 11 21 29 32 37 44 47 53 54 55 58 63 64}
7433 do_test boundary3-2.38.le.2 {
7435 SELECT t2.a FROM t2 NATURAL JOIN t1
7436 WHERE t1.rowid <= -128 ORDER BY t1.a DESC
7438 } {64 63 58 55 54 53 47 44 37 32 29 21 11 2 1}
7439 do_test boundary3-2.38.le.3 {
7441 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
7445 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
7446 do_test boundary3-2.38.le.4 {
7448 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
7450 ORDER BY t1.rowid DESC
7452 } {53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
7453 do_test boundary3-2.38.le.5 {
7455 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
7459 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
7460 do_test boundary3-2.38.le.10 {
7462 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
7466 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
7467 do_test boundary3-2.38.le.11 {
7469 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
7471 ORDER BY t1.rowid DESC
7473 } {53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
7474 do_test boundary3-2.39.1 {
7476 SELECT t1.* FROM t1, t2 WHERE t1.rowid=72057594037927936 AND t2.a=t1.a
7478 } {28 0100000000000000}
7479 do_test boundary3-2.39.2 {
7481 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0100000000000000'
7483 } {72057594037927936 28}
7484 do_test boundary3-2.39.3 {
7486 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=28
7488 } {72057594037927936 0100000000000000}
7489 do_test boundary3-2.39.gt.1 {
7491 SELECT t2.a FROM t1 JOIN t2 USING(a)
7492 WHERE t1.rowid > 72057594037927936 ORDER BY t2.a
7495 do_test boundary3-2.39.gt.2 {
7497 SELECT t2.a FROM t2 NATURAL JOIN t1
7498 WHERE t1.rowid > 72057594037927936 ORDER BY t1.a DESC
7501 do_test boundary3-2.39.gt.3 {
7503 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
7508 do_test boundary3-2.39.gt.4 {
7510 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
7512 ORDER BY t1.rowid DESC
7515 do_test boundary3-2.39.gt.5 {
7517 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
7522 do_test boundary3-2.39.ge.1 {
7524 SELECT t2.a FROM t1 JOIN t2 USING(a)
7525 WHERE t1.rowid >= 72057594037927936 ORDER BY t2.a
7528 do_test boundary3-2.39.ge.2 {
7530 SELECT t2.a FROM t2 NATURAL JOIN t1
7531 WHERE t1.rowid >= 72057594037927936 ORDER BY t1.a DESC
7534 do_test boundary3-2.39.ge.3 {
7536 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
7541 do_test boundary3-2.39.ge.4 {
7543 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
7545 ORDER BY t1.rowid DESC
7548 do_test boundary3-2.39.ge.5 {
7550 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
7555 do_test boundary3-2.39.lt.1 {
7557 SELECT t2.a FROM t1 JOIN t2 USING(a)
7558 WHERE t1.rowid < 72057594037927936 ORDER BY t2.a
7560 } {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}
7561 do_test boundary3-2.39.lt.2 {
7563 SELECT t2.a FROM t2 NATURAL JOIN t1
7564 WHERE t1.rowid < 72057594037927936 ORDER BY t1.a DESC
7566 } {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}
7567 do_test boundary3-2.39.lt.3 {
7569 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
7573 } {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}
7574 do_test boundary3-2.39.lt.4 {
7576 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
7578 ORDER BY t1.rowid DESC
7580 } {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}
7581 do_test boundary3-2.39.lt.5 {
7583 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
7587 } {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}
7588 do_test boundary3-2.39.le.1 {
7590 SELECT t2.a FROM t1 JOIN t2 USING(a)
7591 WHERE t1.rowid <= 72057594037927936 ORDER BY t2.a
7593 } {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}
7594 do_test boundary3-2.39.le.2 {
7596 SELECT t2.a FROM t2 NATURAL JOIN t1
7597 WHERE t1.rowid <= 72057594037927936 ORDER BY t1.a DESC
7599 } {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}
7600 do_test boundary3-2.39.le.3 {
7602 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
7606 } {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}
7607 do_test boundary3-2.39.le.4 {
7609 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
7611 ORDER BY t1.rowid DESC
7613 } {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}
7614 do_test boundary3-2.39.le.5 {
7616 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
7620 } {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}
7621 do_test boundary3-2.40.1 {
7623 SELECT t1.* FROM t1, t2 WHERE t1.rowid=2147483648 AND t2.a=t1.a
7625 } {51 0000000080000000}
7626 do_test boundary3-2.40.2 {
7628 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000080000000'
7631 do_test boundary3-2.40.3 {
7633 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=51
7635 } {2147483648 0000000080000000}
7636 do_test boundary3-2.40.gt.1 {
7638 SELECT t2.a FROM t1 JOIN t2 USING(a)
7639 WHERE t1.rowid > 2147483648 ORDER BY t2.a
7641 } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
7642 do_test boundary3-2.40.gt.2 {
7644 SELECT t2.a FROM t2 NATURAL JOIN t1
7645 WHERE t1.rowid > 2147483648 ORDER BY t1.a DESC
7647 } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
7648 do_test boundary3-2.40.gt.3 {
7650 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
7654 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
7655 do_test boundary3-2.40.gt.4 {
7657 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
7659 ORDER BY t1.rowid DESC
7661 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14}
7662 do_test boundary3-2.40.gt.5 {
7664 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
7668 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
7669 do_test boundary3-2.40.gt.10 {
7671 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
7675 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
7676 do_test boundary3-2.40.gt.11 {
7678 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
7680 ORDER BY t1.rowid DESC
7682 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14}
7683 do_test boundary3-2.40.ge.1 {
7685 SELECT t2.a FROM t1 JOIN t2 USING(a)
7686 WHERE t1.rowid >= 2147483648 ORDER BY t2.a
7688 } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
7689 do_test boundary3-2.40.ge.2 {
7691 SELECT t2.a FROM t2 NATURAL JOIN t1
7692 WHERE t1.rowid >= 2147483648 ORDER BY t1.a DESC
7694 } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
7695 do_test boundary3-2.40.ge.3 {
7697 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
7701 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
7702 do_test boundary3-2.40.ge.4 {
7704 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
7706 ORDER BY t1.rowid DESC
7708 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51}
7709 do_test boundary3-2.40.ge.5 {
7711 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
7715 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
7716 do_test boundary3-2.40.ge.10 {
7718 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
7722 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
7723 do_test boundary3-2.40.ge.11 {
7725 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
7727 ORDER BY t1.rowid DESC
7729 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51}
7730 do_test boundary3-2.40.lt.1 {
7732 SELECT t2.a FROM t1 JOIN t2 USING(a)
7733 WHERE t1.rowid < 2147483648 ORDER BY t2.a
7735 } {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}
7736 do_test boundary3-2.40.lt.2 {
7738 SELECT t2.a FROM t2 NATURAL JOIN t1
7739 WHERE t1.rowid < 2147483648 ORDER BY t1.a DESC
7741 } {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}
7742 do_test boundary3-2.40.lt.3 {
7744 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
7748 } {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}
7749 do_test boundary3-2.40.lt.4 {
7751 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
7753 ORDER BY t1.rowid DESC
7755 } {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}
7756 do_test boundary3-2.40.lt.5 {
7758 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
7762 } {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}
7763 do_test boundary3-2.40.lt.10 {
7765 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
7769 } {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}
7770 do_test boundary3-2.40.lt.11 {
7772 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
7774 ORDER BY t1.rowid DESC
7776 } {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}
7777 do_test boundary3-2.40.le.1 {
7779 SELECT t2.a FROM t1 JOIN t2 USING(a)
7780 WHERE t1.rowid <= 2147483648 ORDER BY t2.a
7782 } {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}
7783 do_test boundary3-2.40.le.2 {
7785 SELECT t2.a FROM t2 NATURAL JOIN t1
7786 WHERE t1.rowid <= 2147483648 ORDER BY t1.a DESC
7788 } {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}
7789 do_test boundary3-2.40.le.3 {
7791 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
7795 } {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}
7796 do_test boundary3-2.40.le.4 {
7798 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
7800 ORDER BY t1.rowid DESC
7802 } {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}
7803 do_test boundary3-2.40.le.5 {
7805 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
7809 } {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}
7810 do_test boundary3-2.40.le.10 {
7812 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
7816 } {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}
7817 do_test boundary3-2.40.le.11 {
7819 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
7821 ORDER BY t1.rowid DESC
7823 } {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}
7824 do_test boundary3-2.41.1 {
7826 SELECT t1.* FROM t1, t2 WHERE t1.rowid=549755813887 AND t2.a=t1.a
7828 } {46 0000007fffffffff}
7829 do_test boundary3-2.41.2 {
7831 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000007fffffffff'
7834 do_test boundary3-2.41.3 {
7836 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=46
7838 } {549755813887 0000007fffffffff}
7839 do_test boundary3-2.41.gt.1 {
7841 SELECT t2.a FROM t1 JOIN t2 USING(a)
7842 WHERE t1.rowid > 549755813887 ORDER BY t2.a
7844 } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 56 57}
7845 do_test boundary3-2.41.gt.2 {
7847 SELECT t2.a FROM t2 NATURAL JOIN t1
7848 WHERE t1.rowid > 549755813887 ORDER BY t1.a DESC
7850 } {57 56 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
7851 do_test boundary3-2.41.gt.3 {
7853 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
7857 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
7858 do_test boundary3-2.41.gt.4 {
7860 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
7862 ORDER BY t1.rowid DESC
7864 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35}
7865 do_test boundary3-2.41.gt.5 {
7867 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
7871 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
7872 do_test boundary3-2.41.gt.10 {
7874 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
7878 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
7879 do_test boundary3-2.41.gt.11 {
7881 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
7883 ORDER BY t1.rowid DESC
7885 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35}
7886 do_test boundary3-2.41.ge.1 {
7888 SELECT t2.a FROM t1 JOIN t2 USING(a)
7889 WHERE t1.rowid >= 549755813887 ORDER BY t2.a
7891 } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 46 56 57}
7892 do_test boundary3-2.41.ge.2 {
7894 SELECT t2.a FROM t2 NATURAL JOIN t1
7895 WHERE t1.rowid >= 549755813887 ORDER BY t1.a DESC
7897 } {57 56 46 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
7898 do_test boundary3-2.41.ge.3 {
7900 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
7904 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
7905 do_test boundary3-2.41.ge.4 {
7907 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
7909 ORDER BY t1.rowid DESC
7911 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46}
7912 do_test boundary3-2.41.ge.5 {
7914 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
7918 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
7919 do_test boundary3-2.41.ge.10 {
7921 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
7925 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
7926 do_test boundary3-2.41.ge.11 {
7928 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
7930 ORDER BY t1.rowid DESC
7932 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46}
7933 do_test boundary3-2.41.lt.1 {
7935 SELECT t2.a FROM t1 JOIN t2 USING(a)
7936 WHERE t1.rowid < 549755813887 ORDER BY t2.a
7938 } {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}
7939 do_test boundary3-2.41.lt.2 {
7941 SELECT t2.a FROM t2 NATURAL JOIN t1
7942 WHERE t1.rowid < 549755813887 ORDER BY t1.a DESC
7944 } {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}
7945 do_test boundary3-2.41.lt.3 {
7947 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
7951 } {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}
7952 do_test boundary3-2.41.lt.4 {
7954 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
7956 ORDER BY t1.rowid DESC
7958 } {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}
7959 do_test boundary3-2.41.lt.5 {
7961 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
7965 } {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}
7966 do_test boundary3-2.41.lt.10 {
7968 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
7972 } {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}
7973 do_test boundary3-2.41.lt.11 {
7975 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
7977 ORDER BY t1.rowid DESC
7979 } {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}
7980 do_test boundary3-2.41.le.1 {
7982 SELECT t2.a FROM t1 JOIN t2 USING(a)
7983 WHERE t1.rowid <= 549755813887 ORDER BY t2.a
7985 } {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}
7986 do_test boundary3-2.41.le.2 {
7988 SELECT t2.a FROM t2 NATURAL JOIN t1
7989 WHERE t1.rowid <= 549755813887 ORDER BY t1.a DESC
7991 } {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}
7992 do_test boundary3-2.41.le.3 {
7994 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
7998 } {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}
7999 do_test boundary3-2.41.le.4 {
8001 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
8003 ORDER BY t1.rowid DESC
8005 } {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}
8006 do_test boundary3-2.41.le.5 {
8008 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
8012 } {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}
8013 do_test boundary3-2.41.le.10 {
8015 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
8019 } {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}
8020 do_test boundary3-2.41.le.11 {
8022 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
8024 ORDER BY t1.rowid DESC
8026 } {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}
8027 do_test boundary3-2.42.1 {
8029 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-549755813888 AND t2.a=t1.a
8031 } {63 ffffff8000000000}
8032 do_test boundary3-2.42.2 {
8034 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='ffffff8000000000'
8036 } {-549755813888 63}
8037 do_test boundary3-2.42.3 {
8039 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=63
8041 } {-549755813888 ffffff8000000000}
8042 do_test boundary3-2.42.gt.1 {
8044 SELECT t2.a FROM t1 JOIN t2 USING(a)
8045 WHERE t1.rowid > -549755813888 ORDER BY t2.a
8047 } {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}
8048 do_test boundary3-2.42.gt.2 {
8050 SELECT t2.a FROM t2 NATURAL JOIN t1
8051 WHERE t1.rowid > -549755813888 ORDER BY t1.a DESC
8053 } {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}
8054 do_test boundary3-2.42.gt.3 {
8056 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8060 } {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}
8061 do_test boundary3-2.42.gt.4 {
8063 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8065 ORDER BY t1.rowid DESC
8067 } {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}
8068 do_test boundary3-2.42.gt.5 {
8070 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8074 } {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}
8075 do_test boundary3-2.42.gt.10 {
8077 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
8081 } {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}
8082 do_test boundary3-2.42.gt.11 {
8084 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
8086 ORDER BY t1.rowid DESC
8088 } {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}
8089 do_test boundary3-2.42.ge.1 {
8091 SELECT t2.a FROM t1 JOIN t2 USING(a)
8092 WHERE t1.rowid >= -549755813888 ORDER BY t2.a
8094 } {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}
8095 do_test boundary3-2.42.ge.2 {
8097 SELECT t2.a FROM t2 NATURAL JOIN t1
8098 WHERE t1.rowid >= -549755813888 ORDER BY t1.a DESC
8100 } {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}
8101 do_test boundary3-2.42.ge.3 {
8103 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
8107 } {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}
8108 do_test boundary3-2.42.ge.4 {
8110 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
8112 ORDER BY t1.rowid DESC
8114 } {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}
8115 do_test boundary3-2.42.ge.5 {
8117 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
8121 } {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}
8122 do_test boundary3-2.42.ge.10 {
8124 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
8128 } {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}
8129 do_test boundary3-2.42.ge.11 {
8131 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
8133 ORDER BY t1.rowid DESC
8135 } {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}
8136 do_test boundary3-2.42.lt.1 {
8138 SELECT t2.a FROM t1 JOIN t2 USING(a)
8139 WHERE t1.rowid < -549755813888 ORDER BY t2.a
8141 } {2 21 44 55 58 64}
8142 do_test boundary3-2.42.lt.2 {
8144 SELECT t2.a FROM t2 NATURAL JOIN t1
8145 WHERE t1.rowid < -549755813888 ORDER BY t1.a DESC
8147 } {64 58 55 44 21 2}
8148 do_test boundary3-2.42.lt.3 {
8150 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
8154 } {55 2 64 21 44 58}
8155 do_test boundary3-2.42.lt.4 {
8157 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
8159 ORDER BY t1.rowid DESC
8161 } {58 44 21 64 2 55}
8162 do_test boundary3-2.42.lt.5 {
8164 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
8168 } {55 2 64 21 44 58}
8169 do_test boundary3-2.42.lt.10 {
8171 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
8175 } {55 2 64 21 44 58}
8176 do_test boundary3-2.42.lt.11 {
8178 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
8180 ORDER BY t1.rowid DESC
8182 } {58 44 21 64 2 55}
8183 do_test boundary3-2.42.le.1 {
8185 SELECT t2.a FROM t1 JOIN t2 USING(a)
8186 WHERE t1.rowid <= -549755813888 ORDER BY t2.a
8188 } {2 21 44 55 58 63 64}
8189 do_test boundary3-2.42.le.2 {
8191 SELECT t2.a FROM t2 NATURAL JOIN t1
8192 WHERE t1.rowid <= -549755813888 ORDER BY t1.a DESC
8194 } {64 63 58 55 44 21 2}
8195 do_test boundary3-2.42.le.3 {
8197 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
8201 } {55 2 64 21 44 58 63}
8202 do_test boundary3-2.42.le.4 {
8204 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
8206 ORDER BY t1.rowid DESC
8208 } {63 58 44 21 64 2 55}
8209 do_test boundary3-2.42.le.5 {
8211 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
8215 } {55 2 64 21 44 58 63}
8216 do_test boundary3-2.42.le.10 {
8218 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
8222 } {55 2 64 21 44 58 63}
8223 do_test boundary3-2.42.le.11 {
8225 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
8227 ORDER BY t1.rowid DESC
8229 } {63 58 44 21 64 2 55}
8230 do_test boundary3-2.43.1 {
8232 SELECT t1.* FROM t1, t2 WHERE t1.rowid=281474976710655 AND t2.a=t1.a
8234 } {10 0000ffffffffffff}
8235 do_test boundary3-2.43.2 {
8237 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000ffffffffffff'
8239 } {281474976710655 10}
8240 do_test boundary3-2.43.3 {
8242 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=10
8244 } {281474976710655 0000ffffffffffff}
8245 do_test boundary3-2.43.gt.1 {
8247 SELECT t2.a FROM t1 JOIN t2 USING(a)
8248 WHERE t1.rowid > 281474976710655 ORDER BY t2.a
8250 } {3 13 17 26 27 28 43 45}
8251 do_test boundary3-2.43.gt.2 {
8253 SELECT t2.a FROM t2 NATURAL JOIN t1
8254 WHERE t1.rowid > 281474976710655 ORDER BY t1.a DESC
8256 } {45 43 28 27 26 17 13 3}
8257 do_test boundary3-2.43.gt.3 {
8259 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8263 } {26 13 43 27 45 17 28 3}
8264 do_test boundary3-2.43.gt.4 {
8266 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8268 ORDER BY t1.rowid DESC
8270 } {3 28 17 45 27 43 13 26}
8271 do_test boundary3-2.43.gt.5 {
8273 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8277 } {26 13 43 27 45 17 28 3}
8278 do_test boundary3-2.43.ge.1 {
8280 SELECT t2.a FROM t1 JOIN t2 USING(a)
8281 WHERE t1.rowid >= 281474976710655 ORDER BY t2.a
8283 } {3 10 13 17 26 27 28 43 45}
8284 do_test boundary3-2.43.ge.2 {
8286 SELECT t2.a FROM t2 NATURAL JOIN t1
8287 WHERE t1.rowid >= 281474976710655 ORDER BY t1.a DESC
8289 } {45 43 28 27 26 17 13 10 3}
8290 do_test boundary3-2.43.ge.3 {
8292 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
8296 } {10 26 13 43 27 45 17 28 3}
8297 do_test boundary3-2.43.ge.4 {
8299 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
8301 ORDER BY t1.rowid DESC
8303 } {3 28 17 45 27 43 13 26 10}
8304 do_test boundary3-2.43.ge.5 {
8306 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
8310 } {10 26 13 43 27 45 17 28 3}
8311 do_test boundary3-2.43.lt.1 {
8313 SELECT t2.a FROM t1 JOIN t2 USING(a)
8314 WHERE t1.rowid < 281474976710655 ORDER BY t2.a
8316 } {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}
8317 do_test boundary3-2.43.lt.2 {
8319 SELECT t2.a FROM t2 NATURAL JOIN t1
8320 WHERE t1.rowid < 281474976710655 ORDER BY t1.a DESC
8322 } {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}
8323 do_test boundary3-2.43.lt.3 {
8325 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
8329 } {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}
8330 do_test boundary3-2.43.lt.4 {
8332 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
8334 ORDER BY t1.rowid DESC
8336 } {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}
8337 do_test boundary3-2.43.lt.5 {
8339 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
8343 } {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}
8344 do_test boundary3-2.43.le.1 {
8346 SELECT t2.a FROM t1 JOIN t2 USING(a)
8347 WHERE t1.rowid <= 281474976710655 ORDER BY t2.a
8349 } {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}
8350 do_test boundary3-2.43.le.2 {
8352 SELECT t2.a FROM t2 NATURAL JOIN t1
8353 WHERE t1.rowid <= 281474976710655 ORDER BY t1.a DESC
8355 } {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}
8356 do_test boundary3-2.43.le.3 {
8358 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
8362 } {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}
8363 do_test boundary3-2.43.le.4 {
8365 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
8367 ORDER BY t1.rowid DESC
8369 } {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}
8370 do_test boundary3-2.43.le.5 {
8372 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
8376 } {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}
8377 do_test boundary3-2.44.1 {
8379 SELECT t1.* FROM t1, t2 WHERE t1.rowid=4398046511103 AND t2.a=t1.a
8381 } {7 000003ffffffffff}
8382 do_test boundary3-2.44.2 {
8384 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='000003ffffffffff'
8387 do_test boundary3-2.44.3 {
8389 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=7
8391 } {4398046511103 000003ffffffffff}
8392 do_test boundary3-2.44.gt.1 {
8394 SELECT t2.a FROM t1 JOIN t2 USING(a)
8395 WHERE t1.rowid > 4398046511103 ORDER BY t2.a
8397 } {3 10 13 17 25 26 27 28 34 43 45 56}
8398 do_test boundary3-2.44.gt.2 {
8400 SELECT t2.a FROM t2 NATURAL JOIN t1
8401 WHERE t1.rowid > 4398046511103 ORDER BY t1.a DESC
8403 } {56 45 43 34 28 27 26 25 17 13 10 3}
8404 do_test boundary3-2.44.gt.3 {
8406 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8410 } {56 25 34 10 26 13 43 27 45 17 28 3}
8411 do_test boundary3-2.44.gt.4 {
8413 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8415 ORDER BY t1.rowid DESC
8417 } {3 28 17 45 27 43 13 26 10 34 25 56}
8418 do_test boundary3-2.44.gt.5 {
8420 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8424 } {56 25 34 10 26 13 43 27 45 17 28 3}
8425 do_test boundary3-2.44.gt.10 {
8427 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
8431 } {56 25 34 10 26 13 43 27 45 17 28 3}
8432 do_test boundary3-2.44.gt.11 {
8434 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
8436 ORDER BY t1.rowid DESC
8438 } {3 28 17 45 27 43 13 26 10 34 25 56}
8439 do_test boundary3-2.44.ge.1 {
8441 SELECT t2.a FROM t1 JOIN t2 USING(a)
8442 WHERE t1.rowid >= 4398046511103 ORDER BY t2.a
8444 } {3 7 10 13 17 25 26 27 28 34 43 45 56}
8445 do_test boundary3-2.44.ge.2 {
8447 SELECT t2.a FROM t2 NATURAL JOIN t1
8448 WHERE t1.rowid >= 4398046511103 ORDER BY t1.a DESC
8450 } {56 45 43 34 28 27 26 25 17 13 10 7 3}
8451 do_test boundary3-2.44.ge.3 {
8453 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
8457 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
8458 do_test boundary3-2.44.ge.4 {
8460 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
8462 ORDER BY t1.rowid DESC
8464 } {3 28 17 45 27 43 13 26 10 34 25 56 7}
8465 do_test boundary3-2.44.ge.5 {
8467 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
8471 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
8472 do_test boundary3-2.44.ge.10 {
8474 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
8478 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
8479 do_test boundary3-2.44.ge.11 {
8481 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
8483 ORDER BY t1.rowid DESC
8485 } {3 28 17 45 27 43 13 26 10 34 25 56 7}
8486 do_test boundary3-2.44.lt.1 {
8488 SELECT t2.a FROM t1 JOIN t2 USING(a)
8489 WHERE t1.rowid < 4398046511103 ORDER BY t2.a
8491 } {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}
8492 do_test boundary3-2.44.lt.2 {
8494 SELECT t2.a FROM t2 NATURAL JOIN t1
8495 WHERE t1.rowid < 4398046511103 ORDER BY t1.a DESC
8497 } {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}
8498 do_test boundary3-2.44.lt.3 {
8500 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
8504 } {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}
8505 do_test boundary3-2.44.lt.4 {
8507 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
8509 ORDER BY t1.rowid DESC
8511 } {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}
8512 do_test boundary3-2.44.lt.5 {
8514 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
8518 } {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}
8519 do_test boundary3-2.44.lt.10 {
8521 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
8525 } {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}
8526 do_test boundary3-2.44.lt.11 {
8528 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
8530 ORDER BY t1.rowid DESC
8532 } {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}
8533 do_test boundary3-2.44.le.1 {
8535 SELECT t2.a FROM t1 JOIN t2 USING(a)
8536 WHERE t1.rowid <= 4398046511103 ORDER BY t2.a
8538 } {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}
8539 do_test boundary3-2.44.le.2 {
8541 SELECT t2.a FROM t2 NATURAL JOIN t1
8542 WHERE t1.rowid <= 4398046511103 ORDER BY t1.a DESC
8544 } {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}
8545 do_test boundary3-2.44.le.3 {
8547 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
8551 } {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}
8552 do_test boundary3-2.44.le.4 {
8554 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
8556 ORDER BY t1.rowid DESC
8558 } {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}
8559 do_test boundary3-2.44.le.5 {
8561 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
8565 } {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}
8566 do_test boundary3-2.44.le.10 {
8568 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
8572 } {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}
8573 do_test boundary3-2.44.le.11 {
8575 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
8577 ORDER BY t1.rowid DESC
8579 } {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}
8580 do_test boundary3-2.45.1 {
8582 SELECT t1.* FROM t1, t2 WHERE t1.rowid=268435455 AND t2.a=t1.a
8584 } {12 000000000fffffff}
8585 do_test boundary3-2.45.2 {
8587 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='000000000fffffff'
8590 do_test boundary3-2.45.3 {
8592 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=12
8594 } {268435455 000000000fffffff}
8595 do_test boundary3-2.45.gt.1 {
8597 SELECT t2.a FROM t1 JOIN t2 USING(a)
8598 WHERE t1.rowid > 268435455 ORDER BY t2.a
8600 } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
8601 do_test boundary3-2.45.gt.2 {
8603 SELECT t2.a FROM t2 NATURAL JOIN t1
8604 WHERE t1.rowid > 268435455 ORDER BY t1.a DESC
8606 } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
8607 do_test boundary3-2.45.gt.3 {
8609 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8613 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
8614 do_test boundary3-2.45.gt.4 {
8616 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8618 ORDER BY t1.rowid DESC
8620 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40}
8621 do_test boundary3-2.45.gt.5 {
8623 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8627 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
8628 do_test boundary3-2.45.gt.10 {
8630 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
8634 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
8635 do_test boundary3-2.45.gt.11 {
8637 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
8639 ORDER BY t1.rowid DESC
8641 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40}
8642 do_test boundary3-2.45.ge.1 {
8644 SELECT t2.a FROM t1 JOIN t2 USING(a)
8645 WHERE t1.rowid >= 268435455 ORDER BY t2.a
8647 } {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}
8648 do_test boundary3-2.45.ge.2 {
8650 SELECT t2.a FROM t2 NATURAL JOIN t1
8651 WHERE t1.rowid >= 268435455 ORDER BY t1.a DESC
8653 } {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}
8654 do_test boundary3-2.45.ge.3 {
8656 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
8660 } {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}
8661 do_test boundary3-2.45.ge.4 {
8663 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
8665 ORDER BY t1.rowid DESC
8667 } {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}
8668 do_test boundary3-2.45.ge.5 {
8670 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
8674 } {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}
8675 do_test boundary3-2.45.ge.10 {
8677 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
8681 } {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}
8682 do_test boundary3-2.45.ge.11 {
8684 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
8686 ORDER BY t1.rowid DESC
8688 } {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}
8689 do_test boundary3-2.45.lt.1 {
8691 SELECT t2.a FROM t1 JOIN t2 USING(a)
8692 WHERE t1.rowid < 268435455 ORDER BY t2.a
8694 } {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}
8695 do_test boundary3-2.45.lt.2 {
8697 SELECT t2.a FROM t2 NATURAL JOIN t1
8698 WHERE t1.rowid < 268435455 ORDER BY t1.a DESC
8700 } {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}
8701 do_test boundary3-2.45.lt.3 {
8703 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
8707 } {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}
8708 do_test boundary3-2.45.lt.4 {
8710 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
8712 ORDER BY t1.rowid DESC
8714 } {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}
8715 do_test boundary3-2.45.lt.5 {
8717 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
8721 } {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}
8722 do_test boundary3-2.45.lt.10 {
8724 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
8728 } {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}
8729 do_test boundary3-2.45.lt.11 {
8731 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
8733 ORDER BY t1.rowid DESC
8735 } {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}
8736 do_test boundary3-2.45.le.1 {
8738 SELECT t2.a FROM t1 JOIN t2 USING(a)
8739 WHERE t1.rowid <= 268435455 ORDER BY t2.a
8741 } {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}
8742 do_test boundary3-2.45.le.2 {
8744 SELECT t2.a FROM t2 NATURAL JOIN t1
8745 WHERE t1.rowid <= 268435455 ORDER BY t1.a DESC
8747 } {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}
8748 do_test boundary3-2.45.le.3 {
8750 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
8754 } {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}
8755 do_test boundary3-2.45.le.4 {
8757 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
8759 ORDER BY t1.rowid DESC
8761 } {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}
8762 do_test boundary3-2.45.le.5 {
8764 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
8768 } {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}
8769 do_test boundary3-2.45.le.10 {
8771 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
8775 } {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}
8776 do_test boundary3-2.45.le.11 {
8778 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
8780 ORDER BY t1.rowid DESC
8782 } {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}
8783 do_test boundary3-2.46.1 {
8785 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-9223372036854775808 AND t2.a=t1.a
8787 } {55 8000000000000000}
8788 do_test boundary3-2.46.2 {
8790 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='8000000000000000'
8792 } {-9223372036854775808 55}
8793 do_test boundary3-2.46.3 {
8795 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=55
8797 } {-9223372036854775808 8000000000000000}
8798 do_test boundary3-2.46.gt.1 {
8800 SELECT t2.a FROM t1 JOIN t2 USING(a)
8801 WHERE t1.rowid > -9223372036854775808 ORDER BY t2.a
8803 } {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}
8804 do_test boundary3-2.46.gt.2 {
8806 SELECT t2.a FROM t2 NATURAL JOIN t1
8807 WHERE t1.rowid > -9223372036854775808 ORDER BY t1.a DESC
8809 } {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}
8810 do_test boundary3-2.46.gt.3 {
8812 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8816 } {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}
8817 do_test boundary3-2.46.gt.4 {
8819 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8821 ORDER BY t1.rowid DESC
8823 } {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}
8824 do_test boundary3-2.46.gt.5 {
8826 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8830 } {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}
8831 do_test boundary3-2.46.ge.1 {
8833 SELECT t2.a FROM t1 JOIN t2 USING(a)
8834 WHERE t1.rowid >= -9223372036854775808 ORDER BY t2.a
8836 } {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}
8837 do_test boundary3-2.46.ge.2 {
8839 SELECT t2.a FROM t2 NATURAL JOIN t1
8840 WHERE t1.rowid >= -9223372036854775808 ORDER BY t1.a DESC
8842 } {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}
8843 do_test boundary3-2.46.ge.3 {
8845 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
8849 } {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}
8850 do_test boundary3-2.46.ge.4 {
8852 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
8854 ORDER BY t1.rowid DESC
8856 } {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}
8857 do_test boundary3-2.46.ge.5 {
8859 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
8863 } {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}
8864 do_test boundary3-2.46.lt.1 {
8866 SELECT t2.a FROM t1 JOIN t2 USING(a)
8867 WHERE t1.rowid < -9223372036854775808 ORDER BY t2.a
8870 do_test boundary3-2.46.lt.2 {
8872 SELECT t2.a FROM t2 NATURAL JOIN t1
8873 WHERE t1.rowid < -9223372036854775808 ORDER BY t1.a DESC
8876 do_test boundary3-2.46.lt.3 {
8878 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
8883 do_test boundary3-2.46.lt.4 {
8885 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
8887 ORDER BY t1.rowid DESC
8890 do_test boundary3-2.46.lt.5 {
8892 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
8897 do_test boundary3-2.46.le.1 {
8899 SELECT t2.a FROM t1 JOIN t2 USING(a)
8900 WHERE t1.rowid <= -9223372036854775808 ORDER BY t2.a
8903 do_test boundary3-2.46.le.2 {
8905 SELECT t2.a FROM t2 NATURAL JOIN t1
8906 WHERE t1.rowid <= -9223372036854775808 ORDER BY t1.a DESC
8909 do_test boundary3-2.46.le.3 {
8911 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
8916 do_test boundary3-2.46.le.4 {
8918 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
8920 ORDER BY t1.rowid DESC
8923 do_test boundary3-2.46.le.5 {
8925 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
8930 do_test boundary3-2.47.1 {
8932 SELECT t1.* FROM t1, t2 WHERE t1.rowid=562949953421312 AND t2.a=t1.a
8934 } {43 0002000000000000}
8935 do_test boundary3-2.47.2 {
8937 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0002000000000000'
8939 } {562949953421312 43}
8940 do_test boundary3-2.47.3 {
8942 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=43
8944 } {562949953421312 0002000000000000}
8945 do_test boundary3-2.47.gt.1 {
8947 SELECT t2.a FROM t1 JOIN t2 USING(a)
8948 WHERE t1.rowid > 562949953421312 ORDER BY t2.a
8951 do_test boundary3-2.47.gt.2 {
8953 SELECT t2.a FROM t2 NATURAL JOIN t1
8954 WHERE t1.rowid > 562949953421312 ORDER BY t1.a DESC
8957 do_test boundary3-2.47.gt.3 {
8959 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8964 do_test boundary3-2.47.gt.4 {
8966 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8968 ORDER BY t1.rowid DESC
8971 do_test boundary3-2.47.gt.5 {
8973 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
8978 do_test boundary3-2.47.ge.1 {
8980 SELECT t2.a FROM t1 JOIN t2 USING(a)
8981 WHERE t1.rowid >= 562949953421312 ORDER BY t2.a
8983 } {3 17 27 28 43 45}
8984 do_test boundary3-2.47.ge.2 {
8986 SELECT t2.a FROM t2 NATURAL JOIN t1
8987 WHERE t1.rowid >= 562949953421312 ORDER BY t1.a DESC
8989 } {45 43 28 27 17 3}
8990 do_test boundary3-2.47.ge.3 {
8992 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
8996 } {43 27 45 17 28 3}
8997 do_test boundary3-2.47.ge.4 {
8999 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
9001 ORDER BY t1.rowid DESC
9003 } {3 28 17 45 27 43}
9004 do_test boundary3-2.47.ge.5 {
9006 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
9010 } {43 27 45 17 28 3}
9011 do_test boundary3-2.47.lt.1 {
9013 SELECT t2.a FROM t1 JOIN t2 USING(a)
9014 WHERE t1.rowid < 562949953421312 ORDER BY t2.a
9016 } {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}
9017 do_test boundary3-2.47.lt.2 {
9019 SELECT t2.a FROM t2 NATURAL JOIN t1
9020 WHERE t1.rowid < 562949953421312 ORDER BY t1.a DESC
9022 } {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}
9023 do_test boundary3-2.47.lt.3 {
9025 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
9029 } {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}
9030 do_test boundary3-2.47.lt.4 {
9032 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
9034 ORDER BY t1.rowid DESC
9036 } {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}
9037 do_test boundary3-2.47.lt.5 {
9039 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
9043 } {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}
9044 do_test boundary3-2.47.le.1 {
9046 SELECT t2.a FROM t1 JOIN t2 USING(a)
9047 WHERE t1.rowid <= 562949953421312 ORDER BY t2.a
9049 } {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}
9050 do_test boundary3-2.47.le.2 {
9052 SELECT t2.a FROM t2 NATURAL JOIN t1
9053 WHERE t1.rowid <= 562949953421312 ORDER BY t1.a DESC
9055 } {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}
9056 do_test boundary3-2.47.le.3 {
9058 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
9062 } {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}
9063 do_test boundary3-2.47.le.4 {
9065 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
9067 ORDER BY t1.rowid DESC
9069 } {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}
9070 do_test boundary3-2.47.le.5 {
9072 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
9076 } {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}
9077 do_test boundary3-2.48.1 {
9079 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-8388609 AND t2.a=t1.a
9081 } {1 ffffffffff7fffff}
9082 do_test boundary3-2.48.2 {
9084 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='ffffffffff7fffff'
9087 do_test boundary3-2.48.3 {
9089 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=1
9091 } {-8388609 ffffffffff7fffff}
9092 do_test boundary3-2.48.gt.1 {
9094 SELECT t2.a FROM t1 JOIN t2 USING(a)
9095 WHERE t1.rowid > -8388609 ORDER BY t2.a
9097 } {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}
9098 do_test boundary3-2.48.gt.2 {
9100 SELECT t2.a FROM t2 NATURAL JOIN t1
9101 WHERE t1.rowid > -8388609 ORDER BY t1.a DESC
9103 } {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}
9104 do_test boundary3-2.48.gt.3 {
9106 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
9110 } {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}
9111 do_test boundary3-2.48.gt.4 {
9113 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
9115 ORDER BY t1.rowid DESC
9117 } {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}
9118 do_test boundary3-2.48.gt.5 {
9120 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
9124 } {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}
9125 do_test boundary3-2.48.gt.10 {
9127 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
9131 } {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}
9132 do_test boundary3-2.48.gt.11 {
9134 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
9136 ORDER BY t1.rowid DESC
9138 } {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}
9139 do_test boundary3-2.48.ge.1 {
9141 SELECT t2.a FROM t1 JOIN t2 USING(a)
9142 WHERE t1.rowid >= -8388609 ORDER BY t2.a
9144 } {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}
9145 do_test boundary3-2.48.ge.2 {
9147 SELECT t2.a FROM t2 NATURAL JOIN t1
9148 WHERE t1.rowid >= -8388609 ORDER BY t1.a DESC
9150 } {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}
9151 do_test boundary3-2.48.ge.3 {
9153 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
9157 } {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}
9158 do_test boundary3-2.48.ge.4 {
9160 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
9162 ORDER BY t1.rowid DESC
9164 } {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}
9165 do_test boundary3-2.48.ge.5 {
9167 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
9171 } {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}
9172 do_test boundary3-2.48.ge.10 {
9174 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
9178 } {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}
9179 do_test boundary3-2.48.ge.11 {
9181 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
9183 ORDER BY t1.rowid DESC
9185 } {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}
9186 do_test boundary3-2.48.lt.1 {
9188 SELECT t2.a FROM t1 JOIN t2 USING(a)
9189 WHERE t1.rowid < -8388609 ORDER BY t2.a
9191 } {2 11 21 44 47 55 58 63 64}
9192 do_test boundary3-2.48.lt.2 {
9194 SELECT t2.a FROM t2 NATURAL JOIN t1
9195 WHERE t1.rowid < -8388609 ORDER BY t1.a DESC
9197 } {64 63 58 55 47 44 21 11 2}
9198 do_test boundary3-2.48.lt.3 {
9200 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
9204 } {55 2 64 21 44 58 63 47 11}
9205 do_test boundary3-2.48.lt.4 {
9207 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
9209 ORDER BY t1.rowid DESC
9211 } {11 47 63 58 44 21 64 2 55}
9212 do_test boundary3-2.48.lt.5 {
9214 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
9218 } {55 2 64 21 44 58 63 47 11}
9219 do_test boundary3-2.48.lt.10 {
9221 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
9225 } {55 2 64 21 44 58 63 47 11}
9226 do_test boundary3-2.48.lt.11 {
9228 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
9230 ORDER BY t1.rowid DESC
9232 } {11 47 63 58 44 21 64 2 55}
9233 do_test boundary3-2.48.le.1 {
9235 SELECT t2.a FROM t1 JOIN t2 USING(a)
9236 WHERE t1.rowid <= -8388609 ORDER BY t2.a
9238 } {1 2 11 21 44 47 55 58 63 64}
9239 do_test boundary3-2.48.le.2 {
9241 SELECT t2.a FROM t2 NATURAL JOIN t1
9242 WHERE t1.rowid <= -8388609 ORDER BY t1.a DESC
9244 } {64 63 58 55 47 44 21 11 2 1}
9245 do_test boundary3-2.48.le.3 {
9247 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
9251 } {55 2 64 21 44 58 63 47 11 1}
9252 do_test boundary3-2.48.le.4 {
9254 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
9256 ORDER BY t1.rowid DESC
9258 } {1 11 47 63 58 44 21 64 2 55}
9259 do_test boundary3-2.48.le.5 {
9261 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
9265 } {55 2 64 21 44 58 63 47 11 1}
9266 do_test boundary3-2.48.le.10 {
9268 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
9272 } {55 2 64 21 44 58 63 47 11 1}
9273 do_test boundary3-2.48.le.11 {
9275 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
9277 ORDER BY t1.rowid DESC
9279 } {1 11 47 63 58 44 21 64 2 55}
9280 do_test boundary3-2.49.1 {
9282 SELECT t1.* FROM t1, t2 WHERE t1.rowid=16777215 AND t2.a=t1.a
9284 } {9 0000000000ffffff}
9285 do_test boundary3-2.49.2 {
9287 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000000ffffff'
9290 do_test boundary3-2.49.3 {
9292 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=9
9294 } {16777215 0000000000ffffff}
9295 do_test boundary3-2.49.gt.1 {
9297 SELECT t2.a FROM t1 JOIN t2 USING(a)
9298 WHERE t1.rowid > 16777215 ORDER BY t2.a
9300 } {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}
9301 do_test boundary3-2.49.gt.2 {
9303 SELECT t2.a FROM t2 NATURAL JOIN t1
9304 WHERE t1.rowid > 16777215 ORDER BY t1.a DESC
9306 } {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}
9307 do_test boundary3-2.49.gt.3 {
9309 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
9313 } {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}
9314 do_test boundary3-2.49.gt.4 {
9316 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
9318 ORDER BY t1.rowid DESC
9320 } {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}
9321 do_test boundary3-2.49.gt.5 {
9323 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
9327 } {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}
9328 do_test boundary3-2.49.gt.10 {
9330 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
9334 } {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}
9335 do_test boundary3-2.49.gt.11 {
9337 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
9339 ORDER BY t1.rowid DESC
9341 } {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}
9342 do_test boundary3-2.49.ge.1 {
9344 SELECT t2.a FROM t1 JOIN t2 USING(a)
9345 WHERE t1.rowid >= 16777215 ORDER BY t2.a
9347 } {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}
9348 do_test boundary3-2.49.ge.2 {
9350 SELECT t2.a FROM t2 NATURAL JOIN t1
9351 WHERE t1.rowid >= 16777215 ORDER BY t1.a DESC
9353 } {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}
9354 do_test boundary3-2.49.ge.3 {
9356 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
9360 } {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}
9361 do_test boundary3-2.49.ge.4 {
9363 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
9365 ORDER BY t1.rowid DESC
9367 } {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}
9368 do_test boundary3-2.49.ge.5 {
9370 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
9374 } {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}
9375 do_test boundary3-2.49.ge.10 {
9377 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
9381 } {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}
9382 do_test boundary3-2.49.ge.11 {
9384 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
9386 ORDER BY t1.rowid DESC
9388 } {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}
9389 do_test boundary3-2.49.lt.1 {
9391 SELECT t2.a FROM t1 JOIN t2 USING(a)
9392 WHERE t1.rowid < 16777215 ORDER BY t2.a
9394 } {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}
9395 do_test boundary3-2.49.lt.2 {
9397 SELECT t2.a FROM t2 NATURAL JOIN t1
9398 WHERE t1.rowid < 16777215 ORDER BY t1.a DESC
9400 } {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}
9401 do_test boundary3-2.49.lt.3 {
9403 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
9407 } {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}
9408 do_test boundary3-2.49.lt.4 {
9410 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
9412 ORDER BY t1.rowid DESC
9414 } {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}
9415 do_test boundary3-2.49.lt.5 {
9417 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
9421 } {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}
9422 do_test boundary3-2.49.lt.10 {
9424 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
9428 } {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}
9429 do_test boundary3-2.49.lt.11 {
9431 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
9433 ORDER BY t1.rowid DESC
9435 } {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}
9436 do_test boundary3-2.49.le.1 {
9438 SELECT t2.a FROM t1 JOIN t2 USING(a)
9439 WHERE t1.rowid <= 16777215 ORDER BY t2.a
9441 } {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}
9442 do_test boundary3-2.49.le.2 {
9444 SELECT t2.a FROM t2 NATURAL JOIN t1
9445 WHERE t1.rowid <= 16777215 ORDER BY t1.a DESC
9447 } {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}
9448 do_test boundary3-2.49.le.3 {
9450 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
9454 } {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}
9455 do_test boundary3-2.49.le.4 {
9457 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
9459 ORDER BY t1.rowid DESC
9461 } {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}
9462 do_test boundary3-2.49.le.5 {
9464 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
9468 } {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}
9469 do_test boundary3-2.49.le.10 {
9471 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
9475 } {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}
9476 do_test boundary3-2.49.le.11 {
9478 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
9480 ORDER BY t1.rowid DESC
9482 } {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}
9483 do_test boundary3-2.50.1 {
9485 SELECT t1.* FROM t1, t2 WHERE t1.rowid=8388608 AND t2.a=t1.a
9487 } {24 0000000000800000}
9488 do_test boundary3-2.50.2 {
9490 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000000800000'
9493 do_test boundary3-2.50.3 {
9495 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=24
9497 } {8388608 0000000000800000}
9498 do_test boundary3-2.50.gt.1 {
9500 SELECT t2.a FROM t1 JOIN t2 USING(a)
9501 WHERE t1.rowid > 8388608 ORDER BY t2.a
9503 } {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}
9504 do_test boundary3-2.50.gt.2 {
9506 SELECT t2.a FROM t2 NATURAL JOIN t1
9507 WHERE t1.rowid > 8388608 ORDER BY t1.a DESC
9509 } {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}
9510 do_test boundary3-2.50.gt.3 {
9512 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
9516 } {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}
9517 do_test boundary3-2.50.gt.4 {
9519 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
9521 ORDER BY t1.rowid DESC
9523 } {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}
9524 do_test boundary3-2.50.gt.5 {
9526 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
9530 } {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}
9531 do_test boundary3-2.50.gt.10 {
9533 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
9537 } {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}
9538 do_test boundary3-2.50.gt.11 {
9540 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
9542 ORDER BY t1.rowid DESC
9544 } {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}
9545 do_test boundary3-2.50.ge.1 {
9547 SELECT t2.a FROM t1 JOIN t2 USING(a)
9548 WHERE t1.rowid >= 8388608 ORDER BY t2.a
9550 } {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}
9551 do_test boundary3-2.50.ge.2 {
9553 SELECT t2.a FROM t2 NATURAL JOIN t1
9554 WHERE t1.rowid >= 8388608 ORDER BY t1.a DESC
9556 } {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}
9557 do_test boundary3-2.50.ge.3 {
9559 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
9563 } {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}
9564 do_test boundary3-2.50.ge.4 {
9566 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
9568 ORDER BY t1.rowid DESC
9570 } {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}
9571 do_test boundary3-2.50.ge.5 {
9573 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
9577 } {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}
9578 do_test boundary3-2.50.ge.10 {
9580 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
9584 } {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}
9585 do_test boundary3-2.50.ge.11 {
9587 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
9589 ORDER BY t1.rowid DESC
9591 } {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}
9592 do_test boundary3-2.50.lt.1 {
9594 SELECT t2.a FROM t1 JOIN t2 USING(a)
9595 WHERE t1.rowid < 8388608 ORDER BY t2.a
9597 } {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}
9598 do_test boundary3-2.50.lt.2 {
9600 SELECT t2.a FROM t2 NATURAL JOIN t1
9601 WHERE t1.rowid < 8388608 ORDER BY t1.a DESC
9603 } {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}
9604 do_test boundary3-2.50.lt.3 {
9606 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
9610 } {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}
9611 do_test boundary3-2.50.lt.4 {
9613 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
9615 ORDER BY t1.rowid DESC
9617 } {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}
9618 do_test boundary3-2.50.lt.5 {
9620 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
9624 } {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}
9625 do_test boundary3-2.50.lt.10 {
9627 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
9631 } {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}
9632 do_test boundary3-2.50.lt.11 {
9634 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
9636 ORDER BY t1.rowid DESC
9638 } {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}
9639 do_test boundary3-2.50.le.1 {
9641 SELECT t2.a FROM t1 JOIN t2 USING(a)
9642 WHERE t1.rowid <= 8388608 ORDER BY t2.a
9644 } {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}
9645 do_test boundary3-2.50.le.2 {
9647 SELECT t2.a FROM t2 NATURAL JOIN t1
9648 WHERE t1.rowid <= 8388608 ORDER BY t1.a DESC
9650 } {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}
9651 do_test boundary3-2.50.le.3 {
9653 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
9657 } {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}
9658 do_test boundary3-2.50.le.4 {
9660 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
9662 ORDER BY t1.rowid DESC
9664 } {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}
9665 do_test boundary3-2.50.le.5 {
9667 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
9671 } {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}
9672 do_test boundary3-2.50.le.10 {
9674 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
9678 } {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}
9679 do_test boundary3-2.50.le.11 {
9681 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
9683 ORDER BY t1.rowid DESC
9685 } {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}
9686 do_test boundary3-2.51.1 {
9688 SELECT t1.* FROM t1, t2 WHERE t1.rowid=16383 AND t2.a=t1.a
9690 } {8 0000000000003fff}
9691 do_test boundary3-2.51.2 {
9693 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000000003fff'
9696 do_test boundary3-2.51.3 {
9698 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=8
9700 } {16383 0000000000003fff}
9701 do_test boundary3-2.51.gt.1 {
9703 SELECT t2.a FROM t1 JOIN t2 USING(a)
9704 WHERE t1.rowid > 16383 ORDER BY t2.a
9706 } {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}
9707 do_test boundary3-2.51.gt.2 {
9709 SELECT t2.a FROM t2 NATURAL JOIN t1
9710 WHERE t1.rowid > 16383 ORDER BY t1.a DESC
9712 } {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}
9713 do_test boundary3-2.51.gt.3 {
9715 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
9719 } {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}
9720 do_test boundary3-2.51.gt.4 {
9722 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
9724 ORDER BY t1.rowid DESC
9726 } {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}
9727 do_test boundary3-2.51.gt.5 {
9729 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
9733 } {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}
9734 do_test boundary3-2.51.gt.10 {
9736 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
9740 } {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}
9741 do_test boundary3-2.51.gt.11 {
9743 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
9745 ORDER BY t1.rowid DESC
9747 } {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}
9748 do_test boundary3-2.51.ge.1 {
9750 SELECT t2.a FROM t1 JOIN t2 USING(a)
9751 WHERE t1.rowid >= 16383 ORDER BY t2.a
9753 } {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}
9754 do_test boundary3-2.51.ge.2 {
9756 SELECT t2.a FROM t2 NATURAL JOIN t1
9757 WHERE t1.rowid >= 16383 ORDER BY t1.a DESC
9759 } {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}
9760 do_test boundary3-2.51.ge.3 {
9762 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
9766 } {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}
9767 do_test boundary3-2.51.ge.4 {
9769 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
9771 ORDER BY t1.rowid DESC
9773 } {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}
9774 do_test boundary3-2.51.ge.5 {
9776 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
9780 } {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}
9781 do_test boundary3-2.51.ge.10 {
9783 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
9787 } {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}
9788 do_test boundary3-2.51.ge.11 {
9790 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
9792 ORDER BY t1.rowid DESC
9794 } {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}
9795 do_test boundary3-2.51.lt.1 {
9797 SELECT t2.a FROM t1 JOIN t2 USING(a)
9798 WHERE t1.rowid < 16383 ORDER BY t2.a
9800 } {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}
9801 do_test boundary3-2.51.lt.2 {
9803 SELECT t2.a FROM t2 NATURAL JOIN t1
9804 WHERE t1.rowid < 16383 ORDER BY t1.a DESC
9806 } {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}
9807 do_test boundary3-2.51.lt.3 {
9809 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
9813 } {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}
9814 do_test boundary3-2.51.lt.4 {
9816 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
9818 ORDER BY t1.rowid DESC
9820 } {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}
9821 do_test boundary3-2.51.lt.5 {
9823 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
9827 } {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}
9828 do_test boundary3-2.51.lt.10 {
9830 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
9834 } {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}
9835 do_test boundary3-2.51.lt.11 {
9837 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
9839 ORDER BY t1.rowid DESC
9841 } {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}
9842 do_test boundary3-2.51.le.1 {
9844 SELECT t2.a FROM t1 JOIN t2 USING(a)
9845 WHERE t1.rowid <= 16383 ORDER BY t2.a
9847 } {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}
9848 do_test boundary3-2.51.le.2 {
9850 SELECT t2.a FROM t2 NATURAL JOIN t1
9851 WHERE t1.rowid <= 16383 ORDER BY t1.a DESC
9853 } {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}
9854 do_test boundary3-2.51.le.3 {
9856 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
9860 } {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}
9861 do_test boundary3-2.51.le.4 {
9863 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
9865 ORDER BY t1.rowid DESC
9867 } {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}
9868 do_test boundary3-2.51.le.5 {
9870 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
9874 } {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}
9875 do_test boundary3-2.51.le.10 {
9877 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
9881 } {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}
9882 do_test boundary3-2.51.le.11 {
9884 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
9886 ORDER BY t1.rowid DESC
9888 } {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}
9889 do_test boundary3-2.52.1 {
9891 SELECT t1.* FROM t1, t2 WHERE t1.rowid=140737488355328 AND t2.a=t1.a
9893 } {34 0000800000000000}
9894 do_test boundary3-2.52.2 {
9896 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000800000000000'
9898 } {140737488355328 34}
9899 do_test boundary3-2.52.3 {
9901 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=34
9903 } {140737488355328 0000800000000000}
9904 do_test boundary3-2.52.gt.1 {
9906 SELECT t2.a FROM t1 JOIN t2 USING(a)
9907 WHERE t1.rowid > 140737488355328 ORDER BY t2.a
9909 } {3 10 13 17 26 27 28 43 45}
9910 do_test boundary3-2.52.gt.2 {
9912 SELECT t2.a FROM t2 NATURAL JOIN t1
9913 WHERE t1.rowid > 140737488355328 ORDER BY t1.a DESC
9915 } {45 43 28 27 26 17 13 10 3}
9916 do_test boundary3-2.52.gt.3 {
9918 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
9922 } {10 26 13 43 27 45 17 28 3}
9923 do_test boundary3-2.52.gt.4 {
9925 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
9927 ORDER BY t1.rowid DESC
9929 } {3 28 17 45 27 43 13 26 10}
9930 do_test boundary3-2.52.gt.5 {
9932 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
9936 } {10 26 13 43 27 45 17 28 3}
9937 do_test boundary3-2.52.ge.1 {
9939 SELECT t2.a FROM t1 JOIN t2 USING(a)
9940 WHERE t1.rowid >= 140737488355328 ORDER BY t2.a
9942 } {3 10 13 17 26 27 28 34 43 45}
9943 do_test boundary3-2.52.ge.2 {
9945 SELECT t2.a FROM t2 NATURAL JOIN t1
9946 WHERE t1.rowid >= 140737488355328 ORDER BY t1.a DESC
9948 } {45 43 34 28 27 26 17 13 10 3}
9949 do_test boundary3-2.52.ge.3 {
9951 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
9955 } {34 10 26 13 43 27 45 17 28 3}
9956 do_test boundary3-2.52.ge.4 {
9958 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
9960 ORDER BY t1.rowid DESC
9962 } {3 28 17 45 27 43 13 26 10 34}
9963 do_test boundary3-2.52.ge.5 {
9965 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
9969 } {34 10 26 13 43 27 45 17 28 3}
9970 do_test boundary3-2.52.lt.1 {
9972 SELECT t2.a FROM t1 JOIN t2 USING(a)
9973 WHERE t1.rowid < 140737488355328 ORDER BY t2.a
9975 } {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}
9976 do_test boundary3-2.52.lt.2 {
9978 SELECT t2.a FROM t2 NATURAL JOIN t1
9979 WHERE t1.rowid < 140737488355328 ORDER BY t1.a DESC
9981 } {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}
9982 do_test boundary3-2.52.lt.3 {
9984 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
9988 } {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}
9989 do_test boundary3-2.52.lt.4 {
9991 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
9993 ORDER BY t1.rowid DESC
9995 } {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}
9996 do_test boundary3-2.52.lt.5 {
9998 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
10002 } {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}
10003 do_test boundary3-2.52.le.1 {
10005 SELECT t2.a FROM t1 JOIN t2 USING(a)
10006 WHERE t1.rowid <= 140737488355328 ORDER BY t2.a
10008 } {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}
10009 do_test boundary3-2.52.le.2 {
10011 SELECT t2.a FROM t2 NATURAL JOIN t1
10012 WHERE t1.rowid <= 140737488355328 ORDER BY t1.a DESC
10014 } {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}
10015 do_test boundary3-2.52.le.3 {
10017 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10021 } {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}
10022 do_test boundary3-2.52.le.4 {
10024 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10026 ORDER BY t1.rowid DESC
10028 } {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}
10029 do_test boundary3-2.52.le.5 {
10031 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10035 } {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}
10036 do_test boundary3-2.53.1 {
10038 SELECT t1.* FROM t1, t2 WHERE t1.rowid=2097151 AND t2.a=t1.a
10040 } {15 00000000001fffff}
10041 do_test boundary3-2.53.2 {
10043 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='00000000001fffff'
10046 do_test boundary3-2.53.3 {
10048 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=15
10050 } {2097151 00000000001fffff}
10051 do_test boundary3-2.53.gt.1 {
10053 SELECT t2.a FROM t1 JOIN t2 USING(a)
10054 WHERE t1.rowid > 2097151 ORDER BY t2.a
10056 } {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}
10057 do_test boundary3-2.53.gt.2 {
10059 SELECT t2.a FROM t2 NATURAL JOIN t1
10060 WHERE t1.rowid > 2097151 ORDER BY t1.a DESC
10062 } {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}
10063 do_test boundary3-2.53.gt.3 {
10065 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10069 } {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}
10070 do_test boundary3-2.53.gt.4 {
10072 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10074 ORDER BY t1.rowid DESC
10076 } {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}
10077 do_test boundary3-2.53.gt.5 {
10079 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10083 } {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}
10084 do_test boundary3-2.53.gt.10 {
10086 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
10090 } {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}
10091 do_test boundary3-2.53.gt.11 {
10093 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
10095 ORDER BY t1.rowid DESC
10097 } {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}
10098 do_test boundary3-2.53.ge.1 {
10100 SELECT t2.a FROM t1 JOIN t2 USING(a)
10101 WHERE t1.rowid >= 2097151 ORDER BY t2.a
10103 } {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}
10104 do_test boundary3-2.53.ge.2 {
10106 SELECT t2.a FROM t2 NATURAL JOIN t1
10107 WHERE t1.rowid >= 2097151 ORDER BY t1.a DESC
10109 } {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}
10110 do_test boundary3-2.53.ge.3 {
10112 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
10116 } {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}
10117 do_test boundary3-2.53.ge.4 {
10119 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
10121 ORDER BY t1.rowid DESC
10123 } {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}
10124 do_test boundary3-2.53.ge.5 {
10126 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
10130 } {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}
10131 do_test boundary3-2.53.ge.10 {
10133 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
10137 } {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}
10138 do_test boundary3-2.53.ge.11 {
10140 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
10142 ORDER BY t1.rowid DESC
10144 } {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}
10145 do_test boundary3-2.53.lt.1 {
10147 SELECT t2.a FROM t1 JOIN t2 USING(a)
10148 WHERE t1.rowid < 2097151 ORDER BY t2.a
10150 } {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}
10151 do_test boundary3-2.53.lt.2 {
10153 SELECT t2.a FROM t2 NATURAL JOIN t1
10154 WHERE t1.rowid < 2097151 ORDER BY t1.a DESC
10156 } {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}
10157 do_test boundary3-2.53.lt.3 {
10159 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
10163 } {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}
10164 do_test boundary3-2.53.lt.4 {
10166 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
10168 ORDER BY t1.rowid DESC
10170 } {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}
10171 do_test boundary3-2.53.lt.5 {
10173 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
10177 } {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}
10178 do_test boundary3-2.53.lt.10 {
10180 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
10184 } {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}
10185 do_test boundary3-2.53.lt.11 {
10187 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
10189 ORDER BY t1.rowid DESC
10191 } {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}
10192 do_test boundary3-2.53.le.1 {
10194 SELECT t2.a FROM t1 JOIN t2 USING(a)
10195 WHERE t1.rowid <= 2097151 ORDER BY t2.a
10197 } {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}
10198 do_test boundary3-2.53.le.2 {
10200 SELECT t2.a FROM t2 NATURAL JOIN t1
10201 WHERE t1.rowid <= 2097151 ORDER BY t1.a DESC
10203 } {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}
10204 do_test boundary3-2.53.le.3 {
10206 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10210 } {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}
10211 do_test boundary3-2.53.le.4 {
10213 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10215 ORDER BY t1.rowid DESC
10217 } {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}
10218 do_test boundary3-2.53.le.5 {
10220 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10224 } {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}
10225 do_test boundary3-2.53.le.10 {
10227 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
10231 } {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}
10232 do_test boundary3-2.53.le.11 {
10234 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
10236 ORDER BY t1.rowid DESC
10238 } {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}
10239 do_test boundary3-2.54.1 {
10241 SELECT t1.* FROM t1, t2 WHERE t1.rowid=140737488355327 AND t2.a=t1.a
10243 } {25 00007fffffffffff}
10244 do_test boundary3-2.54.2 {
10246 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='00007fffffffffff'
10248 } {140737488355327 25}
10249 do_test boundary3-2.54.3 {
10251 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=25
10253 } {140737488355327 00007fffffffffff}
10254 do_test boundary3-2.54.gt.1 {
10256 SELECT t2.a FROM t1 JOIN t2 USING(a)
10257 WHERE t1.rowid > 140737488355327 ORDER BY t2.a
10259 } {3 10 13 17 26 27 28 34 43 45}
10260 do_test boundary3-2.54.gt.2 {
10262 SELECT t2.a FROM t2 NATURAL JOIN t1
10263 WHERE t1.rowid > 140737488355327 ORDER BY t1.a DESC
10265 } {45 43 34 28 27 26 17 13 10 3}
10266 do_test boundary3-2.54.gt.3 {
10268 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10272 } {34 10 26 13 43 27 45 17 28 3}
10273 do_test boundary3-2.54.gt.4 {
10275 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10277 ORDER BY t1.rowid DESC
10279 } {3 28 17 45 27 43 13 26 10 34}
10280 do_test boundary3-2.54.gt.5 {
10282 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10286 } {34 10 26 13 43 27 45 17 28 3}
10287 do_test boundary3-2.54.ge.1 {
10289 SELECT t2.a FROM t1 JOIN t2 USING(a)
10290 WHERE t1.rowid >= 140737488355327 ORDER BY t2.a
10292 } {3 10 13 17 25 26 27 28 34 43 45}
10293 do_test boundary3-2.54.ge.2 {
10295 SELECT t2.a FROM t2 NATURAL JOIN t1
10296 WHERE t1.rowid >= 140737488355327 ORDER BY t1.a DESC
10298 } {45 43 34 28 27 26 25 17 13 10 3}
10299 do_test boundary3-2.54.ge.3 {
10301 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
10305 } {25 34 10 26 13 43 27 45 17 28 3}
10306 do_test boundary3-2.54.ge.4 {
10308 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
10310 ORDER BY t1.rowid DESC
10312 } {3 28 17 45 27 43 13 26 10 34 25}
10313 do_test boundary3-2.54.ge.5 {
10315 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
10319 } {25 34 10 26 13 43 27 45 17 28 3}
10320 do_test boundary3-2.54.lt.1 {
10322 SELECT t2.a FROM t1 JOIN t2 USING(a)
10323 WHERE t1.rowid < 140737488355327 ORDER BY t2.a
10325 } {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}
10326 do_test boundary3-2.54.lt.2 {
10328 SELECT t2.a FROM t2 NATURAL JOIN t1
10329 WHERE t1.rowid < 140737488355327 ORDER BY t1.a DESC
10331 } {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}
10332 do_test boundary3-2.54.lt.3 {
10334 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
10338 } {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}
10339 do_test boundary3-2.54.lt.4 {
10341 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
10343 ORDER BY t1.rowid DESC
10345 } {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}
10346 do_test boundary3-2.54.lt.5 {
10348 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
10352 } {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}
10353 do_test boundary3-2.54.le.1 {
10355 SELECT t2.a FROM t1 JOIN t2 USING(a)
10356 WHERE t1.rowid <= 140737488355327 ORDER BY t2.a
10358 } {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}
10359 do_test boundary3-2.54.le.2 {
10361 SELECT t2.a FROM t2 NATURAL JOIN t1
10362 WHERE t1.rowid <= 140737488355327 ORDER BY t1.a DESC
10364 } {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}
10365 do_test boundary3-2.54.le.3 {
10367 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10371 } {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}
10372 do_test boundary3-2.54.le.4 {
10374 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10376 ORDER BY t1.rowid DESC
10378 } {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}
10379 do_test boundary3-2.54.le.5 {
10381 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10385 } {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}
10386 do_test boundary3-2.55.1 {
10388 SELECT t1.* FROM t1, t2 WHERE t1.rowid=281474976710656 AND t2.a=t1.a
10390 } {26 0001000000000000}
10391 do_test boundary3-2.55.2 {
10393 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0001000000000000'
10395 } {281474976710656 26}
10396 do_test boundary3-2.55.3 {
10398 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=26
10400 } {281474976710656 0001000000000000}
10401 do_test boundary3-2.55.gt.1 {
10403 SELECT t2.a FROM t1 JOIN t2 USING(a)
10404 WHERE t1.rowid > 281474976710656 ORDER BY t2.a
10406 } {3 13 17 27 28 43 45}
10407 do_test boundary3-2.55.gt.2 {
10409 SELECT t2.a FROM t2 NATURAL JOIN t1
10410 WHERE t1.rowid > 281474976710656 ORDER BY t1.a DESC
10412 } {45 43 28 27 17 13 3}
10413 do_test boundary3-2.55.gt.3 {
10415 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10419 } {13 43 27 45 17 28 3}
10420 do_test boundary3-2.55.gt.4 {
10422 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10424 ORDER BY t1.rowid DESC
10426 } {3 28 17 45 27 43 13}
10427 do_test boundary3-2.55.gt.5 {
10429 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10433 } {13 43 27 45 17 28 3}
10434 do_test boundary3-2.55.ge.1 {
10436 SELECT t2.a FROM t1 JOIN t2 USING(a)
10437 WHERE t1.rowid >= 281474976710656 ORDER BY t2.a
10439 } {3 13 17 26 27 28 43 45}
10440 do_test boundary3-2.55.ge.2 {
10442 SELECT t2.a FROM t2 NATURAL JOIN t1
10443 WHERE t1.rowid >= 281474976710656 ORDER BY t1.a DESC
10445 } {45 43 28 27 26 17 13 3}
10446 do_test boundary3-2.55.ge.3 {
10448 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
10452 } {26 13 43 27 45 17 28 3}
10453 do_test boundary3-2.55.ge.4 {
10455 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
10457 ORDER BY t1.rowid DESC
10459 } {3 28 17 45 27 43 13 26}
10460 do_test boundary3-2.55.ge.5 {
10462 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
10466 } {26 13 43 27 45 17 28 3}
10467 do_test boundary3-2.55.lt.1 {
10469 SELECT t2.a FROM t1 JOIN t2 USING(a)
10470 WHERE t1.rowid < 281474976710656 ORDER BY t2.a
10472 } {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}
10473 do_test boundary3-2.55.lt.2 {
10475 SELECT t2.a FROM t2 NATURAL JOIN t1
10476 WHERE t1.rowid < 281474976710656 ORDER BY t1.a DESC
10478 } {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}
10479 do_test boundary3-2.55.lt.3 {
10481 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
10485 } {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}
10486 do_test boundary3-2.55.lt.4 {
10488 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
10490 ORDER BY t1.rowid DESC
10492 } {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}
10493 do_test boundary3-2.55.lt.5 {
10495 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
10499 } {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}
10500 do_test boundary3-2.55.le.1 {
10502 SELECT t2.a FROM t1 JOIN t2 USING(a)
10503 WHERE t1.rowid <= 281474976710656 ORDER BY t2.a
10505 } {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}
10506 do_test boundary3-2.55.le.2 {
10508 SELECT t2.a FROM t2 NATURAL JOIN t1
10509 WHERE t1.rowid <= 281474976710656 ORDER BY t1.a DESC
10511 } {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}
10512 do_test boundary3-2.55.le.3 {
10514 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10518 } {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}
10519 do_test boundary3-2.55.le.4 {
10521 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10523 ORDER BY t1.rowid DESC
10525 } {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}
10526 do_test boundary3-2.55.le.5 {
10528 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10532 } {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}
10533 do_test boundary3-2.56.1 {
10535 SELECT t1.* FROM t1, t2 WHERE t1.rowid=32767 AND t2.a=t1.a
10537 } {23 0000000000007fff}
10538 do_test boundary3-2.56.2 {
10540 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000000007fff'
10543 do_test boundary3-2.56.3 {
10545 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=23
10547 } {32767 0000000000007fff}
10548 do_test boundary3-2.56.gt.1 {
10550 SELECT t2.a FROM t1 JOIN t2 USING(a)
10551 WHERE t1.rowid > 32767 ORDER BY t2.a
10553 } {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}
10554 do_test boundary3-2.56.gt.2 {
10556 SELECT t2.a FROM t2 NATURAL JOIN t1
10557 WHERE t1.rowid > 32767 ORDER BY t1.a DESC
10559 } {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}
10560 do_test boundary3-2.56.gt.3 {
10562 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10566 } {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}
10567 do_test boundary3-2.56.gt.4 {
10569 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10571 ORDER BY t1.rowid DESC
10573 } {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}
10574 do_test boundary3-2.56.gt.5 {
10576 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10580 } {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}
10581 do_test boundary3-2.56.gt.10 {
10583 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
10587 } {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}
10588 do_test boundary3-2.56.gt.11 {
10590 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
10592 ORDER BY t1.rowid DESC
10594 } {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}
10595 do_test boundary3-2.56.ge.1 {
10597 SELECT t2.a FROM t1 JOIN t2 USING(a)
10598 WHERE t1.rowid >= 32767 ORDER BY t2.a
10600 } {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}
10601 do_test boundary3-2.56.ge.2 {
10603 SELECT t2.a FROM t2 NATURAL JOIN t1
10604 WHERE t1.rowid >= 32767 ORDER BY t1.a DESC
10606 } {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}
10607 do_test boundary3-2.56.ge.3 {
10609 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
10613 } {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}
10614 do_test boundary3-2.56.ge.4 {
10616 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
10618 ORDER BY t1.rowid DESC
10620 } {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}
10621 do_test boundary3-2.56.ge.5 {
10623 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
10627 } {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}
10628 do_test boundary3-2.56.ge.10 {
10630 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
10634 } {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}
10635 do_test boundary3-2.56.ge.11 {
10637 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
10639 ORDER BY t1.rowid DESC
10641 } {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}
10642 do_test boundary3-2.56.lt.1 {
10644 SELECT t2.a FROM t1 JOIN t2 USING(a)
10645 WHERE t1.rowid < 32767 ORDER BY t2.a
10647 } {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}
10648 do_test boundary3-2.56.lt.2 {
10650 SELECT t2.a FROM t2 NATURAL JOIN t1
10651 WHERE t1.rowid < 32767 ORDER BY t1.a DESC
10653 } {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}
10654 do_test boundary3-2.56.lt.3 {
10656 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
10660 } {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}
10661 do_test boundary3-2.56.lt.4 {
10663 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
10665 ORDER BY t1.rowid DESC
10667 } {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}
10668 do_test boundary3-2.56.lt.5 {
10670 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
10674 } {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}
10675 do_test boundary3-2.56.lt.10 {
10677 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
10681 } {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}
10682 do_test boundary3-2.56.lt.11 {
10684 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
10686 ORDER BY t1.rowid DESC
10688 } {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}
10689 do_test boundary3-2.56.le.1 {
10691 SELECT t2.a FROM t1 JOIN t2 USING(a)
10692 WHERE t1.rowid <= 32767 ORDER BY t2.a
10694 } {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}
10695 do_test boundary3-2.56.le.2 {
10697 SELECT t2.a FROM t2 NATURAL JOIN t1
10698 WHERE t1.rowid <= 32767 ORDER BY t1.a DESC
10700 } {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}
10701 do_test boundary3-2.56.le.3 {
10703 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10707 } {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}
10708 do_test boundary3-2.56.le.4 {
10710 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10712 ORDER BY t1.rowid DESC
10714 } {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}
10715 do_test boundary3-2.56.le.5 {
10717 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10721 } {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}
10722 do_test boundary3-2.56.le.10 {
10724 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
10728 } {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}
10729 do_test boundary3-2.56.le.11 {
10731 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
10733 ORDER BY t1.rowid DESC
10735 } {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}
10736 do_test boundary3-2.57.1 {
10738 SELECT t1.* FROM t1, t2 WHERE t1.rowid=127 AND t2.a=t1.a
10740 } {4 000000000000007f}
10741 do_test boundary3-2.57.2 {
10743 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='000000000000007f'
10746 do_test boundary3-2.57.3 {
10748 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=4
10750 } {127 000000000000007f}
10751 do_test boundary3-2.57.gt.1 {
10753 SELECT t2.a FROM t1 JOIN t2 USING(a)
10754 WHERE t1.rowid > 127 ORDER BY t2.a
10756 } {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}
10757 do_test boundary3-2.57.gt.2 {
10759 SELECT t2.a FROM t2 NATURAL JOIN t1
10760 WHERE t1.rowid > 127 ORDER BY t1.a DESC
10762 } {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}
10763 do_test boundary3-2.57.gt.3 {
10765 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10769 } {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}
10770 do_test boundary3-2.57.gt.4 {
10772 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10774 ORDER BY t1.rowid DESC
10776 } {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}
10777 do_test boundary3-2.57.gt.5 {
10779 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10783 } {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}
10784 do_test boundary3-2.57.gt.10 {
10786 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
10790 } {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}
10791 do_test boundary3-2.57.gt.11 {
10793 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
10795 ORDER BY t1.rowid DESC
10797 } {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}
10798 do_test boundary3-2.57.ge.1 {
10800 SELECT t2.a FROM t1 JOIN t2 USING(a)
10801 WHERE t1.rowid >= 127 ORDER BY t2.a
10803 } {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}
10804 do_test boundary3-2.57.ge.2 {
10806 SELECT t2.a FROM t2 NATURAL JOIN t1
10807 WHERE t1.rowid >= 127 ORDER BY t1.a DESC
10809 } {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}
10810 do_test boundary3-2.57.ge.3 {
10812 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
10816 } {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}
10817 do_test boundary3-2.57.ge.4 {
10819 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
10821 ORDER BY t1.rowid DESC
10823 } {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}
10824 do_test boundary3-2.57.ge.5 {
10826 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
10830 } {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}
10831 do_test boundary3-2.57.ge.10 {
10833 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
10837 } {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}
10838 do_test boundary3-2.57.ge.11 {
10840 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
10842 ORDER BY t1.rowid DESC
10844 } {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}
10845 do_test boundary3-2.57.lt.1 {
10847 SELECT t2.a FROM t1 JOIN t2 USING(a)
10848 WHERE t1.rowid < 127 ORDER BY t2.a
10850 } {1 2 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
10851 do_test boundary3-2.57.lt.2 {
10853 SELECT t2.a FROM t2 NATURAL JOIN t1
10854 WHERE t1.rowid < 127 ORDER BY t1.a DESC
10856 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 2 1}
10857 do_test boundary3-2.57.lt.3 {
10859 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
10863 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31}
10864 do_test boundary3-2.57.lt.4 {
10866 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
10868 ORDER BY t1.rowid DESC
10870 } {31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
10871 do_test boundary3-2.57.lt.5 {
10873 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
10877 } {59 60 41 5 31 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
10878 do_test boundary3-2.57.lt.10 {
10880 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
10884 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31}
10885 do_test boundary3-2.57.lt.11 {
10887 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
10889 ORDER BY t1.rowid DESC
10891 } {31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
10892 do_test boundary3-2.57.le.1 {
10894 SELECT t2.a FROM t1 JOIN t2 USING(a)
10895 WHERE t1.rowid <= 127 ORDER BY t2.a
10897 } {1 2 4 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
10898 do_test boundary3-2.57.le.2 {
10900 SELECT t2.a FROM t2 NATURAL JOIN t1
10901 WHERE t1.rowid <= 127 ORDER BY t1.a DESC
10903 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 4 2 1}
10904 do_test boundary3-2.57.le.3 {
10906 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10910 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4}
10911 do_test boundary3-2.57.le.4 {
10913 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10915 ORDER BY t1.rowid DESC
10917 } {4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
10918 do_test boundary3-2.57.le.5 {
10920 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
10924 } {59 60 41 5 31 4 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
10925 do_test boundary3-2.57.le.10 {
10927 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
10931 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4}
10932 do_test boundary3-2.57.le.11 {
10934 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
10936 ORDER BY t1.rowid DESC
10938 } {4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
10939 do_test boundary3-2.58.1 {
10941 SELECT t1.* FROM t1, t2 WHERE t1.rowid=36028797018963967 AND t2.a=t1.a
10943 } {27 007fffffffffffff}
10944 do_test boundary3-2.58.2 {
10946 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='007fffffffffffff'
10948 } {36028797018963967 27}
10949 do_test boundary3-2.58.3 {
10951 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=27
10953 } {36028797018963967 007fffffffffffff}
10954 do_test boundary3-2.58.gt.1 {
10956 SELECT t2.a FROM t1 JOIN t2 USING(a)
10957 WHERE t1.rowid > 36028797018963967 ORDER BY t2.a
10960 do_test boundary3-2.58.gt.2 {
10962 SELECT t2.a FROM t2 NATURAL JOIN t1
10963 WHERE t1.rowid > 36028797018963967 ORDER BY t1.a DESC
10966 do_test boundary3-2.58.gt.3 {
10968 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10973 do_test boundary3-2.58.gt.4 {
10975 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10977 ORDER BY t1.rowid DESC
10980 do_test boundary3-2.58.gt.5 {
10982 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
10987 do_test boundary3-2.58.ge.1 {
10989 SELECT t2.a FROM t1 JOIN t2 USING(a)
10990 WHERE t1.rowid >= 36028797018963967 ORDER BY t2.a
10993 do_test boundary3-2.58.ge.2 {
10995 SELECT t2.a FROM t2 NATURAL JOIN t1
10996 WHERE t1.rowid >= 36028797018963967 ORDER BY t1.a DESC
10999 do_test boundary3-2.58.ge.3 {
11001 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11006 do_test boundary3-2.58.ge.4 {
11008 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11010 ORDER BY t1.rowid DESC
11013 do_test boundary3-2.58.ge.5 {
11015 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11020 do_test boundary3-2.58.lt.1 {
11022 SELECT t2.a FROM t1 JOIN t2 USING(a)
11023 WHERE t1.rowid < 36028797018963967 ORDER BY t2.a
11025 } {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}
11026 do_test boundary3-2.58.lt.2 {
11028 SELECT t2.a FROM t2 NATURAL JOIN t1
11029 WHERE t1.rowid < 36028797018963967 ORDER BY t1.a DESC
11031 } {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}
11032 do_test boundary3-2.58.lt.3 {
11034 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11038 } {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}
11039 do_test boundary3-2.58.lt.4 {
11041 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11043 ORDER BY t1.rowid DESC
11045 } {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}
11046 do_test boundary3-2.58.lt.5 {
11048 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11052 } {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}
11053 do_test boundary3-2.58.le.1 {
11055 SELECT t2.a FROM t1 JOIN t2 USING(a)
11056 WHERE t1.rowid <= 36028797018963967 ORDER BY t2.a
11058 } {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}
11059 do_test boundary3-2.58.le.2 {
11061 SELECT t2.a FROM t2 NATURAL JOIN t1
11062 WHERE t1.rowid <= 36028797018963967 ORDER BY t1.a DESC
11064 } {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}
11065 do_test boundary3-2.58.le.3 {
11067 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11071 } {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}
11072 do_test boundary3-2.58.le.4 {
11074 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11076 ORDER BY t1.rowid DESC
11078 } {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}
11079 do_test boundary3-2.58.le.5 {
11081 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11085 } {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}
11086 do_test boundary3-2.59.1 {
11088 SELECT t1.* FROM t1, t2 WHERE t1.rowid=4398046511104 AND t2.a=t1.a
11090 } {56 0000040000000000}
11091 do_test boundary3-2.59.2 {
11093 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000040000000000'
11095 } {4398046511104 56}
11096 do_test boundary3-2.59.3 {
11098 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=56
11100 } {4398046511104 0000040000000000}
11101 do_test boundary3-2.59.gt.1 {
11103 SELECT t2.a FROM t1 JOIN t2 USING(a)
11104 WHERE t1.rowid > 4398046511104 ORDER BY t2.a
11106 } {3 10 13 17 25 26 27 28 34 43 45}
11107 do_test boundary3-2.59.gt.2 {
11109 SELECT t2.a FROM t2 NATURAL JOIN t1
11110 WHERE t1.rowid > 4398046511104 ORDER BY t1.a DESC
11112 } {45 43 34 28 27 26 25 17 13 10 3}
11113 do_test boundary3-2.59.gt.3 {
11115 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
11119 } {25 34 10 26 13 43 27 45 17 28 3}
11120 do_test boundary3-2.59.gt.4 {
11122 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
11124 ORDER BY t1.rowid DESC
11126 } {3 28 17 45 27 43 13 26 10 34 25}
11127 do_test boundary3-2.59.gt.5 {
11129 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
11133 } {25 34 10 26 13 43 27 45 17 28 3}
11134 do_test boundary3-2.59.gt.10 {
11136 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
11140 } {25 34 10 26 13 43 27 45 17 28 3}
11141 do_test boundary3-2.59.gt.11 {
11143 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
11145 ORDER BY t1.rowid DESC
11147 } {3 28 17 45 27 43 13 26 10 34 25}
11148 do_test boundary3-2.59.ge.1 {
11150 SELECT t2.a FROM t1 JOIN t2 USING(a)
11151 WHERE t1.rowid >= 4398046511104 ORDER BY t2.a
11153 } {3 10 13 17 25 26 27 28 34 43 45 56}
11154 do_test boundary3-2.59.ge.2 {
11156 SELECT t2.a FROM t2 NATURAL JOIN t1
11157 WHERE t1.rowid >= 4398046511104 ORDER BY t1.a DESC
11159 } {56 45 43 34 28 27 26 25 17 13 10 3}
11160 do_test boundary3-2.59.ge.3 {
11162 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11166 } {56 25 34 10 26 13 43 27 45 17 28 3}
11167 do_test boundary3-2.59.ge.4 {
11169 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11171 ORDER BY t1.rowid DESC
11173 } {3 28 17 45 27 43 13 26 10 34 25 56}
11174 do_test boundary3-2.59.ge.5 {
11176 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11180 } {56 25 34 10 26 13 43 27 45 17 28 3}
11181 do_test boundary3-2.59.ge.10 {
11183 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
11187 } {56 25 34 10 26 13 43 27 45 17 28 3}
11188 do_test boundary3-2.59.ge.11 {
11190 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
11192 ORDER BY t1.rowid DESC
11194 } {3 28 17 45 27 43 13 26 10 34 25 56}
11195 do_test boundary3-2.59.lt.1 {
11197 SELECT t2.a FROM t1 JOIN t2 USING(a)
11198 WHERE t1.rowid < 4398046511104 ORDER BY t2.a
11200 } {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}
11201 do_test boundary3-2.59.lt.2 {
11203 SELECT t2.a FROM t2 NATURAL JOIN t1
11204 WHERE t1.rowid < 4398046511104 ORDER BY t1.a DESC
11206 } {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}
11207 do_test boundary3-2.59.lt.3 {
11209 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11213 } {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}
11214 do_test boundary3-2.59.lt.4 {
11216 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11218 ORDER BY t1.rowid DESC
11220 } {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}
11221 do_test boundary3-2.59.lt.5 {
11223 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11227 } {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}
11228 do_test boundary3-2.59.lt.10 {
11230 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
11234 } {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}
11235 do_test boundary3-2.59.lt.11 {
11237 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
11239 ORDER BY t1.rowid DESC
11241 } {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}
11242 do_test boundary3-2.59.le.1 {
11244 SELECT t2.a FROM t1 JOIN t2 USING(a)
11245 WHERE t1.rowid <= 4398046511104 ORDER BY t2.a
11247 } {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}
11248 do_test boundary3-2.59.le.2 {
11250 SELECT t2.a FROM t2 NATURAL JOIN t1
11251 WHERE t1.rowid <= 4398046511104 ORDER BY t1.a DESC
11253 } {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}
11254 do_test boundary3-2.59.le.3 {
11256 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11260 } {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}
11261 do_test boundary3-2.59.le.4 {
11263 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11265 ORDER BY t1.rowid DESC
11267 } {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}
11268 do_test boundary3-2.59.le.5 {
11270 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11274 } {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}
11275 do_test boundary3-2.59.le.10 {
11277 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
11281 } {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}
11282 do_test boundary3-2.59.le.11 {
11284 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
11286 ORDER BY t1.rowid DESC
11288 } {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}
11289 do_test boundary3-2.60.1 {
11291 SELECT t1.* FROM t1, t2 WHERE t1.rowid=1 AND t2.a=t1.a
11293 } {60 0000000000000001}
11294 do_test boundary3-2.60.2 {
11296 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000000000001'
11299 do_test boundary3-2.60.3 {
11301 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=60
11303 } {1 0000000000000001}
11304 do_test boundary3-2.60.gt.1 {
11306 SELECT t2.a FROM t1 JOIN t2 USING(a)
11307 WHERE t1.rowid > 1 ORDER BY t2.a
11309 } {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}
11310 do_test boundary3-2.60.gt.2 {
11312 SELECT t2.a FROM t2 NATURAL JOIN t1
11313 WHERE t1.rowid > 1 ORDER BY t1.a DESC
11315 } {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}
11316 do_test boundary3-2.60.gt.3 {
11318 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
11322 } {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}
11323 do_test boundary3-2.60.gt.4 {
11325 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
11327 ORDER BY t1.rowid DESC
11329 } {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}
11330 do_test boundary3-2.60.gt.5 {
11332 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
11336 } {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}
11337 do_test boundary3-2.60.gt.10 {
11339 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
11343 } {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}
11344 do_test boundary3-2.60.gt.11 {
11346 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
11348 ORDER BY t1.rowid DESC
11350 } {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}
11351 do_test boundary3-2.60.ge.1 {
11353 SELECT t2.a FROM t1 JOIN t2 USING(a)
11354 WHERE t1.rowid >= 1 ORDER BY t2.a
11356 } {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}
11357 do_test boundary3-2.60.ge.2 {
11359 SELECT t2.a FROM t2 NATURAL JOIN t1
11360 WHERE t1.rowid >= 1 ORDER BY t1.a DESC
11362 } {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}
11363 do_test boundary3-2.60.ge.3 {
11365 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11369 } {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}
11370 do_test boundary3-2.60.ge.4 {
11372 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11374 ORDER BY t1.rowid DESC
11376 } {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}
11377 do_test boundary3-2.60.ge.5 {
11379 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11383 } {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}
11384 do_test boundary3-2.60.ge.10 {
11386 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
11390 } {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}
11391 do_test boundary3-2.60.ge.11 {
11393 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
11395 ORDER BY t1.rowid DESC
11397 } {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}
11398 do_test boundary3-2.60.lt.1 {
11400 SELECT t2.a FROM t1 JOIN t2 USING(a)
11401 WHERE t1.rowid < 1 ORDER BY t2.a
11403 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 63 64}
11404 do_test boundary3-2.60.lt.2 {
11406 SELECT t2.a FROM t2 NATURAL JOIN t1
11407 WHERE t1.rowid < 1 ORDER BY t1.a DESC
11409 } {64 63 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
11410 do_test boundary3-2.60.lt.3 {
11412 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11416 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59}
11417 do_test boundary3-2.60.lt.4 {
11419 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11421 ORDER BY t1.rowid DESC
11423 } {59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
11424 do_test boundary3-2.60.lt.5 {
11426 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11430 } {59 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
11431 do_test boundary3-2.60.lt.10 {
11433 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
11437 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59}
11438 do_test boundary3-2.60.lt.11 {
11440 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
11442 ORDER BY t1.rowid DESC
11444 } {59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
11445 do_test boundary3-2.60.le.1 {
11447 SELECT t2.a FROM t1 JOIN t2 USING(a)
11448 WHERE t1.rowid <= 1 ORDER BY t2.a
11450 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 60 63 64}
11451 do_test boundary3-2.60.le.2 {
11453 SELECT t2.a FROM t2 NATURAL JOIN t1
11454 WHERE t1.rowid <= 1 ORDER BY t1.a DESC
11456 } {64 63 60 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
11457 do_test boundary3-2.60.le.3 {
11459 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11463 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60}
11464 do_test boundary3-2.60.le.4 {
11466 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11468 ORDER BY t1.rowid DESC
11470 } {60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
11471 do_test boundary3-2.60.le.5 {
11473 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11477 } {59 60 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
11478 do_test boundary3-2.60.le.10 {
11480 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
11484 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60}
11485 do_test boundary3-2.60.le.11 {
11487 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
11489 ORDER BY t1.rowid DESC
11491 } {60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
11492 do_test boundary3-2.61.1 {
11494 SELECT t1.* FROM t1, t2 WHERE t1.rowid=36028797018963968 AND t2.a=t1.a
11496 } {45 0080000000000000}
11497 do_test boundary3-2.61.2 {
11499 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0080000000000000'
11501 } {36028797018963968 45}
11502 do_test boundary3-2.61.3 {
11504 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=45
11506 } {36028797018963968 0080000000000000}
11507 do_test boundary3-2.61.gt.1 {
11509 SELECT t2.a FROM t1 JOIN t2 USING(a)
11510 WHERE t1.rowid > 36028797018963968 ORDER BY t2.a
11513 do_test boundary3-2.61.gt.2 {
11515 SELECT t2.a FROM t2 NATURAL JOIN t1
11516 WHERE t1.rowid > 36028797018963968 ORDER BY t1.a DESC
11519 do_test boundary3-2.61.gt.3 {
11521 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
11526 do_test boundary3-2.61.gt.4 {
11528 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
11530 ORDER BY t1.rowid DESC
11533 do_test boundary3-2.61.gt.5 {
11535 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
11540 do_test boundary3-2.61.ge.1 {
11542 SELECT t2.a FROM t1 JOIN t2 USING(a)
11543 WHERE t1.rowid >= 36028797018963968 ORDER BY t2.a
11546 do_test boundary3-2.61.ge.2 {
11548 SELECT t2.a FROM t2 NATURAL JOIN t1
11549 WHERE t1.rowid >= 36028797018963968 ORDER BY t1.a DESC
11552 do_test boundary3-2.61.ge.3 {
11554 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11559 do_test boundary3-2.61.ge.4 {
11561 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11563 ORDER BY t1.rowid DESC
11566 do_test boundary3-2.61.ge.5 {
11568 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11573 do_test boundary3-2.61.lt.1 {
11575 SELECT t2.a FROM t1 JOIN t2 USING(a)
11576 WHERE t1.rowid < 36028797018963968 ORDER BY t2.a
11578 } {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}
11579 do_test boundary3-2.61.lt.2 {
11581 SELECT t2.a FROM t2 NATURAL JOIN t1
11582 WHERE t1.rowid < 36028797018963968 ORDER BY t1.a DESC
11584 } {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}
11585 do_test boundary3-2.61.lt.3 {
11587 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11591 } {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}
11592 do_test boundary3-2.61.lt.4 {
11594 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11596 ORDER BY t1.rowid DESC
11598 } {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}
11599 do_test boundary3-2.61.lt.5 {
11601 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11605 } {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}
11606 do_test boundary3-2.61.le.1 {
11608 SELECT t2.a FROM t1 JOIN t2 USING(a)
11609 WHERE t1.rowid <= 36028797018963968 ORDER BY t2.a
11611 } {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}
11612 do_test boundary3-2.61.le.2 {
11614 SELECT t2.a FROM t2 NATURAL JOIN t1
11615 WHERE t1.rowid <= 36028797018963968 ORDER BY t1.a DESC
11617 } {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}
11618 do_test boundary3-2.61.le.3 {
11620 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11624 } {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}
11625 do_test boundary3-2.61.le.4 {
11627 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11629 ORDER BY t1.rowid DESC
11631 } {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}
11632 do_test boundary3-2.61.le.5 {
11634 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11638 } {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}
11639 do_test boundary3-2.62.1 {
11641 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-2147483649 AND t2.a=t1.a
11643 } {47 ffffffff7fffffff}
11644 do_test boundary3-2.62.2 {
11646 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='ffffffff7fffffff'
11649 do_test boundary3-2.62.3 {
11651 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=47
11653 } {-2147483649 ffffffff7fffffff}
11654 do_test boundary3-2.62.gt.1 {
11656 SELECT t2.a FROM t1 JOIN t2 USING(a)
11657 WHERE t1.rowid > -2147483649 ORDER BY t2.a
11659 } {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}
11660 do_test boundary3-2.62.gt.2 {
11662 SELECT t2.a FROM t2 NATURAL JOIN t1
11663 WHERE t1.rowid > -2147483649 ORDER BY t1.a DESC
11665 } {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}
11666 do_test boundary3-2.62.gt.3 {
11668 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
11672 } {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}
11673 do_test boundary3-2.62.gt.4 {
11675 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
11677 ORDER BY t1.rowid DESC
11679 } {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}
11680 do_test boundary3-2.62.gt.5 {
11682 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
11686 } {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}
11687 do_test boundary3-2.62.gt.10 {
11689 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
11693 } {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}
11694 do_test boundary3-2.62.gt.11 {
11696 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
11698 ORDER BY t1.rowid DESC
11700 } {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}
11701 do_test boundary3-2.62.ge.1 {
11703 SELECT t2.a FROM t1 JOIN t2 USING(a)
11704 WHERE t1.rowid >= -2147483649 ORDER BY t2.a
11706 } {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}
11707 do_test boundary3-2.62.ge.2 {
11709 SELECT t2.a FROM t2 NATURAL JOIN t1
11710 WHERE t1.rowid >= -2147483649 ORDER BY t1.a DESC
11712 } {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}
11713 do_test boundary3-2.62.ge.3 {
11715 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11719 } {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}
11720 do_test boundary3-2.62.ge.4 {
11722 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11724 ORDER BY t1.rowid DESC
11726 } {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}
11727 do_test boundary3-2.62.ge.5 {
11729 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11733 } {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}
11734 do_test boundary3-2.62.ge.10 {
11736 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
11740 } {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}
11741 do_test boundary3-2.62.ge.11 {
11743 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
11745 ORDER BY t1.rowid DESC
11747 } {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}
11748 do_test boundary3-2.62.lt.1 {
11750 SELECT t2.a FROM t1 JOIN t2 USING(a)
11751 WHERE t1.rowid < -2147483649 ORDER BY t2.a
11753 } {2 21 44 55 58 63 64}
11754 do_test boundary3-2.62.lt.2 {
11756 SELECT t2.a FROM t2 NATURAL JOIN t1
11757 WHERE t1.rowid < -2147483649 ORDER BY t1.a DESC
11759 } {64 63 58 55 44 21 2}
11760 do_test boundary3-2.62.lt.3 {
11762 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11766 } {55 2 64 21 44 58 63}
11767 do_test boundary3-2.62.lt.4 {
11769 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11771 ORDER BY t1.rowid DESC
11773 } {63 58 44 21 64 2 55}
11774 do_test boundary3-2.62.lt.5 {
11776 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11780 } {55 2 64 21 44 58 63}
11781 do_test boundary3-2.62.lt.10 {
11783 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
11787 } {55 2 64 21 44 58 63}
11788 do_test boundary3-2.62.lt.11 {
11790 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
11792 ORDER BY t1.rowid DESC
11794 } {63 58 44 21 64 2 55}
11795 do_test boundary3-2.62.le.1 {
11797 SELECT t2.a FROM t1 JOIN t2 USING(a)
11798 WHERE t1.rowid <= -2147483649 ORDER BY t2.a
11800 } {2 21 44 47 55 58 63 64}
11801 do_test boundary3-2.62.le.2 {
11803 SELECT t2.a FROM t2 NATURAL JOIN t1
11804 WHERE t1.rowid <= -2147483649 ORDER BY t1.a DESC
11806 } {64 63 58 55 47 44 21 2}
11807 do_test boundary3-2.62.le.3 {
11809 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11813 } {55 2 64 21 44 58 63 47}
11814 do_test boundary3-2.62.le.4 {
11816 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11818 ORDER BY t1.rowid DESC
11820 } {47 63 58 44 21 64 2 55}
11821 do_test boundary3-2.62.le.5 {
11823 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11827 } {55 2 64 21 44 58 63 47}
11828 do_test boundary3-2.62.le.10 {
11830 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
11834 } {55 2 64 21 44 58 63 47}
11835 do_test boundary3-2.62.le.11 {
11837 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
11839 ORDER BY t1.rowid DESC
11841 } {47 63 58 44 21 64 2 55}
11842 do_test boundary3-2.63.1 {
11844 SELECT t1.* FROM t1, t2 WHERE t1.rowid=-36028797018963969 AND t2.a=t1.a
11846 } {2 ff7fffffffffffff}
11847 do_test boundary3-2.63.2 {
11849 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='ff7fffffffffffff'
11851 } {-36028797018963969 2}
11852 do_test boundary3-2.63.3 {
11854 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=2
11856 } {-36028797018963969 ff7fffffffffffff}
11857 do_test boundary3-2.63.gt.1 {
11859 SELECT t2.a FROM t1 JOIN t2 USING(a)
11860 WHERE t1.rowid > -36028797018963969 ORDER BY t2.a
11862 } {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}
11863 do_test boundary3-2.63.gt.2 {
11865 SELECT t2.a FROM t2 NATURAL JOIN t1
11866 WHERE t1.rowid > -36028797018963969 ORDER BY t1.a DESC
11868 } {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}
11869 do_test boundary3-2.63.gt.3 {
11871 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
11875 } {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}
11876 do_test boundary3-2.63.gt.4 {
11878 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
11880 ORDER BY t1.rowid DESC
11882 } {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}
11883 do_test boundary3-2.63.gt.5 {
11885 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
11889 } {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}
11890 do_test boundary3-2.63.ge.1 {
11892 SELECT t2.a FROM t1 JOIN t2 USING(a)
11893 WHERE t1.rowid >= -36028797018963969 ORDER BY t2.a
11895 } {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}
11896 do_test boundary3-2.63.ge.2 {
11898 SELECT t2.a FROM t2 NATURAL JOIN t1
11899 WHERE t1.rowid >= -36028797018963969 ORDER BY t1.a DESC
11901 } {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}
11902 do_test boundary3-2.63.ge.3 {
11904 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11908 } {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}
11909 do_test boundary3-2.63.ge.4 {
11911 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11913 ORDER BY t1.rowid DESC
11915 } {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}
11916 do_test boundary3-2.63.ge.5 {
11918 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
11922 } {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}
11923 do_test boundary3-2.63.lt.1 {
11925 SELECT t2.a FROM t1 JOIN t2 USING(a)
11926 WHERE t1.rowid < -36028797018963969 ORDER BY t2.a
11929 do_test boundary3-2.63.lt.2 {
11931 SELECT t2.a FROM t2 NATURAL JOIN t1
11932 WHERE t1.rowid < -36028797018963969 ORDER BY t1.a DESC
11935 do_test boundary3-2.63.lt.3 {
11937 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11942 do_test boundary3-2.63.lt.4 {
11944 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11946 ORDER BY t1.rowid DESC
11949 do_test boundary3-2.63.lt.5 {
11951 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
11956 do_test boundary3-2.63.le.1 {
11958 SELECT t2.a FROM t1 JOIN t2 USING(a)
11959 WHERE t1.rowid <= -36028797018963969 ORDER BY t2.a
11962 do_test boundary3-2.63.le.2 {
11964 SELECT t2.a FROM t2 NATURAL JOIN t1
11965 WHERE t1.rowid <= -36028797018963969 ORDER BY t1.a DESC
11968 do_test boundary3-2.63.le.3 {
11970 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11975 do_test boundary3-2.63.le.4 {
11977 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11979 ORDER BY t1.rowid DESC
11982 do_test boundary3-2.63.le.5 {
11984 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
11989 do_test boundary3-2.64.1 {
11991 SELECT t1.* FROM t1, t2 WHERE t1.rowid=3 AND t2.a=t1.a
11993 } {5 0000000000000003}
11994 do_test boundary3-2.64.2 {
11996 SELECT t2.* FROM t1 JOIN t2 USING(a) WHERE x='0000000000000003'
11999 do_test boundary3-2.64.3 {
12001 SELECT t1.rowid, x FROM t1 JOIN t2 ON t2.r=t1.rowid WHERE t2.a=5
12003 } {3 0000000000000003}
12004 do_test boundary3-2.64.gt.1 {
12006 SELECT t2.a FROM t1 JOIN t2 USING(a)
12007 WHERE t1.rowid > 3 ORDER BY t2.a
12009 } {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}
12010 do_test boundary3-2.64.gt.2 {
12012 SELECT t2.a FROM t2 NATURAL JOIN t1
12013 WHERE t1.rowid > 3 ORDER BY t1.a DESC
12015 } {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}
12016 do_test boundary3-2.64.gt.3 {
12018 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
12022 } {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}
12023 do_test boundary3-2.64.gt.4 {
12025 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
12027 ORDER BY t1.rowid DESC
12029 } {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}
12030 do_test boundary3-2.64.gt.5 {
12032 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
12036 } {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}
12037 do_test boundary3-2.64.gt.10 {
12039 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
12043 } {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}
12044 do_test boundary3-2.64.gt.11 {
12046 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > CAST(t2.r AS real)
12048 ORDER BY t1.rowid DESC
12050 } {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}
12051 do_test boundary3-2.64.ge.1 {
12053 SELECT t2.a FROM t1 JOIN t2 USING(a)
12054 WHERE t1.rowid >= 3 ORDER BY t2.a
12056 } {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}
12057 do_test boundary3-2.64.ge.2 {
12059 SELECT t2.a FROM t2 NATURAL JOIN t1
12060 WHERE t1.rowid >= 3 ORDER BY t1.a DESC
12062 } {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}
12063 do_test boundary3-2.64.ge.3 {
12065 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
12069 } {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}
12070 do_test boundary3-2.64.ge.4 {
12072 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
12074 ORDER BY t1.rowid DESC
12076 } {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}
12077 do_test boundary3-2.64.ge.5 {
12079 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
12083 } {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}
12084 do_test boundary3-2.64.ge.10 {
12086 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
12090 } {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}
12091 do_test boundary3-2.64.ge.11 {
12093 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= CAST(t2.r AS real)
12095 ORDER BY t1.rowid DESC
12097 } {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}
12098 do_test boundary3-2.64.lt.1 {
12100 SELECT t2.a FROM t1 JOIN t2 USING(a)
12101 WHERE t1.rowid < 3 ORDER BY t2.a
12103 } {1 2 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
12104 do_test boundary3-2.64.lt.2 {
12106 SELECT t2.a FROM t2 NATURAL JOIN t1
12107 WHERE t1.rowid < 3 ORDER BY t1.a DESC
12109 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 2 1}
12110 do_test boundary3-2.64.lt.3 {
12112 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
12116 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41}
12117 do_test boundary3-2.64.lt.4 {
12119 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
12121 ORDER BY t1.rowid DESC
12123 } {41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
12124 do_test boundary3-2.64.lt.5 {
12126 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
12130 } {59 60 41 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
12131 do_test boundary3-2.64.lt.10 {
12133 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
12137 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41}
12138 do_test boundary3-2.64.lt.11 {
12140 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < CAST(t2.r AS real)
12142 ORDER BY t1.rowid DESC
12144 } {41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
12145 do_test boundary3-2.64.le.1 {
12147 SELECT t2.a FROM t1 JOIN t2 USING(a)
12148 WHERE t1.rowid <= 3 ORDER BY t2.a
12150 } {1 2 5 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
12151 do_test boundary3-2.64.le.2 {
12153 SELECT t2.a FROM t2 NATURAL JOIN t1
12154 WHERE t1.rowid <= 3 ORDER BY t1.a DESC
12156 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 5 2 1}
12157 do_test boundary3-2.64.le.3 {
12159 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
12163 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5}
12164 do_test boundary3-2.64.le.4 {
12166 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
12168 ORDER BY t1.rowid DESC
12170 } {5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
12171 do_test boundary3-2.64.le.5 {
12173 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
12177 } {59 60 41 5 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
12178 do_test boundary3-2.64.le.10 {
12180 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
12184 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5}
12185 do_test boundary3-2.64.le.11 {
12187 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= CAST(t2.r AS real)
12189 ORDER BY t1.rowid DESC
12191 } {5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
12192 do_test boundary3-2.65.gt.1 {
12194 SELECT t2.a FROM t1 JOIN t2 USING(a)
12195 WHERE t1.rowid > 9.22337303685477580800e+18 ORDER BY t2.a
12198 do_test boundary3-2.65.gt.2 {
12200 SELECT t2.a FROM t2 NATURAL JOIN t1
12201 WHERE t1.rowid > 9.22337303685477580800e+18 ORDER BY t1.a DESC
12204 do_test boundary3-2.65.gt.3 {
12206 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
12211 do_test boundary3-2.65.gt.4 {
12213 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
12215 ORDER BY t1.rowid DESC
12218 do_test boundary3-2.65.gt.5 {
12220 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
12225 do_test boundary3-2.65.ge.1 {
12227 SELECT t2.a FROM t1 JOIN t2 USING(a)
12228 WHERE t1.rowid >= 9.22337303685477580800e+18 ORDER BY t2.a
12231 do_test boundary3-2.65.ge.2 {
12233 SELECT t2.a FROM t2 NATURAL JOIN t1
12234 WHERE t1.rowid >= 9.22337303685477580800e+18 ORDER BY t1.a DESC
12237 do_test boundary3-2.65.ge.3 {
12239 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
12244 do_test boundary3-2.65.ge.4 {
12246 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
12248 ORDER BY t1.rowid DESC
12251 do_test boundary3-2.65.ge.5 {
12253 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
12258 do_test boundary3-2.65.lt.1 {
12260 SELECT t2.a FROM t1 JOIN t2 USING(a)
12261 WHERE t1.rowid < 9.22337303685477580800e+18 ORDER BY t2.a
12263 } {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}
12264 do_test boundary3-2.65.lt.2 {
12266 SELECT t2.a FROM t2 NATURAL JOIN t1
12267 WHERE t1.rowid < 9.22337303685477580800e+18 ORDER BY t1.a DESC
12269 } {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}
12270 do_test boundary3-2.65.lt.3 {
12272 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
12276 } {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}
12277 do_test boundary3-2.65.lt.4 {
12279 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
12281 ORDER BY t1.rowid DESC
12283 } {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}
12284 do_test boundary3-2.65.lt.5 {
12286 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
12290 } {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}
12291 do_test boundary3-2.65.le.1 {
12293 SELECT t2.a FROM t1 JOIN t2 USING(a)
12294 WHERE t1.rowid <= 9.22337303685477580800e+18 ORDER BY t2.a
12296 } {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}
12297 do_test boundary3-2.65.le.2 {
12299 SELECT t2.a FROM t2 NATURAL JOIN t1
12300 WHERE t1.rowid <= 9.22337303685477580800e+18 ORDER BY t1.a DESC
12302 } {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}
12303 do_test boundary3-2.65.le.3 {
12305 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
12309 } {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}
12310 do_test boundary3-2.65.le.4 {
12312 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
12314 ORDER BY t1.rowid DESC
12316 } {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}
12317 do_test boundary3-2.65.le.5 {
12319 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
12323 } {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}
12324 do_test boundary3-2.66.gt.1 {
12326 SELECT t2.a FROM t1 JOIN t2 USING(a)
12327 WHERE t1.rowid > -9.22337303685477580800e+18 ORDER BY t2.a
12329 } {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}
12330 do_test boundary3-2.66.gt.2 {
12332 SELECT t2.a FROM t2 NATURAL JOIN t1
12333 WHERE t1.rowid > -9.22337303685477580800e+18 ORDER BY t1.a DESC
12335 } {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}
12336 do_test boundary3-2.66.gt.3 {
12338 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
12342 } {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}
12343 do_test boundary3-2.66.gt.4 {
12345 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
12347 ORDER BY t1.rowid DESC
12349 } {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}
12350 do_test boundary3-2.66.gt.5 {
12352 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid > t2.r
12356 } {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}
12357 do_test boundary3-2.66.ge.1 {
12359 SELECT t2.a FROM t1 JOIN t2 USING(a)
12360 WHERE t1.rowid >= -9.22337303685477580800e+18 ORDER BY t2.a
12362 } {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}
12363 do_test boundary3-2.66.ge.2 {
12365 SELECT t2.a FROM t2 NATURAL JOIN t1
12366 WHERE t1.rowid >= -9.22337303685477580800e+18 ORDER BY t1.a DESC
12368 } {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}
12369 do_test boundary3-2.66.ge.3 {
12371 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
12375 } {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}
12376 do_test boundary3-2.66.ge.4 {
12378 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
12380 ORDER BY t1.rowid DESC
12382 } {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}
12383 do_test boundary3-2.66.ge.5 {
12385 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid >= t2.r
12389 } {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}
12390 do_test boundary3-2.66.lt.1 {
12392 SELECT t2.a FROM t1 JOIN t2 USING(a)
12393 WHERE t1.rowid < -9.22337303685477580800e+18 ORDER BY t2.a
12396 do_test boundary3-2.66.lt.2 {
12398 SELECT t2.a FROM t2 NATURAL JOIN t1
12399 WHERE t1.rowid < -9.22337303685477580800e+18 ORDER BY t1.a DESC
12402 do_test boundary3-2.66.lt.3 {
12404 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
12409 do_test boundary3-2.66.lt.4 {
12411 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
12413 ORDER BY t1.rowid DESC
12416 do_test boundary3-2.66.lt.5 {
12418 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid < t2.r
12423 do_test boundary3-2.66.le.1 {
12425 SELECT t2.a FROM t1 JOIN t2 USING(a)
12426 WHERE t1.rowid <= -9.22337303685477580800e+18 ORDER BY t2.a
12429 do_test boundary3-2.66.le.2 {
12431 SELECT t2.a FROM t2 NATURAL JOIN t1
12432 WHERE t1.rowid <= -9.22337303685477580800e+18 ORDER BY t1.a DESC
12435 do_test boundary3-2.66.le.3 {
12437 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
12442 do_test boundary3-2.66.le.4 {
12444 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r
12446 ORDER BY t1.rowid DESC
12449 do_test boundary3-2.66.le.5 {
12451 SELECT t1.a FROM t1 JOIN t2 ON t1.rowid <= t2.r