Home | History | Annotate | Download | only in test
      1 # 2008 December 11
      2 #
      3 # The author disclaims copyright to this source code.  In place of
      4 # a legal notice, here is a blessing:
      5 #
      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.
      9 #
     10 #***********************************************************************
     11 # This file implements regression tests for SQLite library.
     12 #
     13 # This file is automatically generated from a separate TCL script.
     14 # This file seeks to exercise integer boundary values.
     15 #
     16 # $Id: boundary2.test,v 1.2 2009/01/02 15:45:48 shane Exp $
     17 
     18 set testdir [file dirname $argv0]
     19 source $testdir/tester.tcl
     20 
     21 # Many of the boundary tests depend on a working 64-bit implementation.
     22 if {![working_64bit_int]} { finish_test; return }
     23 
     24 do_test boundary2-1.1 {
     25   db eval {
     26     CREATE TABLE t1(r INTEGER, a INTEGER, x TEXT);
     27     INSERT INTO t1 VALUES(-8388609,1,'ffffffffff7fffff');
     28     INSERT INTO t1 VALUES(-36028797018963969,2,'ff7fffffffffffff');
     29     INSERT INTO t1 VALUES(9223372036854775807,3,'7fffffffffffffff');
     30     INSERT INTO t1 VALUES(127,4,'000000000000007f');
     31     INSERT INTO t1 VALUES(3,5,'0000000000000003');
     32     INSERT INTO t1 VALUES(16777216,6,'0000000001000000');
     33     INSERT INTO t1 VALUES(4398046511103,7,'000003ffffffffff');
     34     INSERT INTO t1 VALUES(16383,8,'0000000000003fff');
     35     INSERT INTO t1 VALUES(16777215,9,'0000000000ffffff');
     36     INSERT INTO t1 VALUES(281474976710655,10,'0000ffffffffffff');
     37     INSERT INTO t1 VALUES(-2147483648,11,'ffffffff80000000');
     38     INSERT INTO t1 VALUES(268435455,12,'000000000fffffff');
     39     INSERT INTO t1 VALUES(562949953421311,13,'0001ffffffffffff');
     40     INSERT INTO t1 VALUES(4294967295,14,'00000000ffffffff');
     41     INSERT INTO t1 VALUES(2097151,15,'00000000001fffff');
     42     INSERT INTO t1 VALUES(16384,16,'0000000000004000');
     43     INSERT INTO t1 VALUES(72057594037927935,17,'00ffffffffffffff');
     44     INSERT INTO t1 VALUES(8388607,18,'00000000007fffff');
     45     INSERT INTO t1 VALUES(1099511627776,19,'0000010000000000');
     46     INSERT INTO t1 VALUES(2147483647,20,'000000007fffffff');
     47     INSERT INTO t1 VALUES(-140737488355329,21,'ffff7fffffffffff');
     48     INSERT INTO t1 VALUES(34359738368,22,'0000000800000000');
     49     INSERT INTO t1 VALUES(32767,23,'0000000000007fff');
     50     INSERT INTO t1 VALUES(8388608,24,'0000000000800000');
     51     INSERT INTO t1 VALUES(140737488355327,25,'00007fffffffffff');
     52     INSERT INTO t1 VALUES(281474976710656,26,'0001000000000000');
     53     INSERT INTO t1 VALUES(36028797018963967,27,'007fffffffffffff');
     54     INSERT INTO t1 VALUES(72057594037927936,28,'0100000000000000');
     55     INSERT INTO t1 VALUES(-32769,29,'ffffffffffff7fff');
     56     INSERT INTO t1 VALUES(255,30,'00000000000000ff');
     57     INSERT INTO t1 VALUES(4,31,'0000000000000004');
     58     INSERT INTO t1 VALUES(-32768,32,'ffffffffffff8000');
     59     INSERT INTO t1 VALUES(-2,33,'fffffffffffffffe');
     60     INSERT INTO t1 VALUES(140737488355328,34,'0000800000000000');
     61     INSERT INTO t1 VALUES(549755813888,35,'0000008000000000');
     62     INSERT INTO t1 VALUES(4294967296,36,'0000000100000000');
     63     INSERT INTO t1 VALUES(-8388608,37,'ffffffffff800000');
     64     INSERT INTO t1 VALUES(-1,38,'ffffffffffffffff');
     65     INSERT INTO t1 VALUES(34359738367,39,'00000007ffffffff');
     66     INSERT INTO t1 VALUES(268435456,40,'0000000010000000');
     67     INSERT INTO t1 VALUES(2,41,'0000000000000002');
     68     INSERT INTO t1 VALUES(2097152,42,'0000000000200000');
     69     INSERT INTO t1 VALUES(562949953421312,43,'0002000000000000');
     70     INSERT INTO t1 VALUES(-140737488355328,44,'ffff800000000000');
     71     INSERT INTO t1 VALUES(36028797018963968,45,'0080000000000000');
     72     INSERT INTO t1 VALUES(549755813887,46,'0000007fffffffff');
     73     INSERT INTO t1 VALUES(-2147483649,47,'ffffffff7fffffff');
     74     INSERT INTO t1 VALUES(65535,48,'000000000000ffff');
     75     INSERT INTO t1 VALUES(128,49,'0000000000000080');
     76     INSERT INTO t1 VALUES(32768,50,'0000000000008000');
     77     INSERT INTO t1 VALUES(2147483648,51,'0000000080000000');
     78     INSERT INTO t1 VALUES(-3,52,'fffffffffffffffd');
     79     INSERT INTO t1 VALUES(-128,53,'ffffffffffffff80');
     80     INSERT INTO t1 VALUES(-129,54,'ffffffffffffff7f');
     81     INSERT INTO t1 VALUES(-9223372036854775808,55,'8000000000000000');
     82     INSERT INTO t1 VALUES(4398046511104,56,'0000040000000000');
     83     INSERT INTO t1 VALUES(1099511627775,57,'000000ffffffffff');
     84     INSERT INTO t1 VALUES(-549755813889,58,'ffffff7fffffffff');
     85     INSERT INTO t1 VALUES(0,59,'0000000000000000');
     86     INSERT INTO t1 VALUES(1,60,'0000000000000001');
     87     INSERT INTO t1 VALUES(256,61,'0000000000000100');
     88     INSERT INTO t1 VALUES(65536,62,'0000000000010000');
     89     INSERT INTO t1 VALUES(-549755813888,63,'ffffff8000000000');
     90     INSERT INTO t1 VALUES(-36028797018963968,64,'ff80000000000000');
     91     CREATE INDEX t1i1 ON t1(r);
     92     CREATE INDEX t1i2 ON t1(a);
     93     CREATE INDEX t1i3 ON t1(x);
     94   }
     95 } {}
     96 do_test boundary2-1.2 {
     97   db eval {
     98     SELECT count(*) FROM t1
     99   }
    100 } {64}
    101 do_test boundary2-2.1.1 {
    102   db eval {
    103     SELECT * FROM t1 WHERE r=72057594037927935
    104   }
    105 } {72057594037927935 17 00ffffffffffffff}
    106 do_test boundary2-2.1.2 {
    107   db eval {
    108     SELECT r, a FROM t1 WHERE x='00ffffffffffffff'
    109   }
    110 } {72057594037927935 17}
    111 do_test boundary2-2.1.3 {
    112   db eval {
    113     SELECT r, x FROM t1 WHERE a=17
    114   }
    115 } {72057594037927935 00ffffffffffffff}
    116 do_test boundary2-2.1.gt.1 {
    117   db eval {
    118     SELECT a FROM t1 WHERE r > 72057594037927935 ORDER BY a
    119   }
    120 } {3 28}
    121 do_test boundary2-2.1.gt.2 {
    122   db eval {
    123     SELECT a FROM t1 WHERE r > 72057594037927935 ORDER BY a DESC
    124   }
    125 } {28 3}
    126 do_test boundary2-2.1.gt.3 {
    127   db eval {
    128     SELECT a FROM t1 WHERE r > 72057594037927935 ORDER BY r
    129   }
    130 } {28 3}
    131 do_test boundary2-2.1.gt.4 {
    132   db eval {
    133     SELECT a FROM t1 WHERE r > 72057594037927935 ORDER BY r DESC
    134   }
    135 } {3 28}
    136 do_test boundary2-2.1.gt.5 {
    137   db eval {
    138     SELECT a FROM t1 WHERE r > 72057594037927935 ORDER BY x
    139   }
    140 } {28 3}
    141 do_test boundary2-2.1.ge.1 {
    142   db eval {
    143     SELECT a FROM t1 WHERE r >= 72057594037927935 ORDER BY a
    144   }
    145 } {3 17 28}
    146 do_test boundary2-2.1.ge.2 {
    147   db eval {
    148     SELECT a FROM t1 WHERE r >= 72057594037927935 ORDER BY a DESC
    149   }
    150 } {28 17 3}
    151 do_test boundary2-2.1.ge.3 {
    152   db eval {
    153     SELECT a FROM t1 WHERE r >= 72057594037927935 ORDER BY r
    154   }
    155 } {17 28 3}
    156 do_test boundary2-2.1.ge.4 {
    157   db eval {
    158     SELECT a FROM t1 WHERE r >= 72057594037927935 ORDER BY r DESC
    159   }
    160 } {3 28 17}
    161 do_test boundary2-2.1.ge.5 {
    162   db eval {
    163     SELECT a FROM t1 WHERE r >= 72057594037927935 ORDER BY x
    164   }
    165 } {17 28 3}
    166 do_test boundary2-2.1.lt.1 {
    167   db eval {
    168     SELECT a FROM t1 WHERE r < 72057594037927935 ORDER BY a
    169   }
    170 } {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}
    171 do_test boundary2-2.1.lt.2 {
    172   db eval {
    173     SELECT a FROM t1 WHERE r < 72057594037927935 ORDER BY a DESC
    174   }
    175 } {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}
    176 do_test boundary2-2.1.lt.3 {
    177   db eval {
    178     SELECT a FROM t1 WHERE r < 72057594037927935 ORDER BY r
    179   }
    180 } {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}
    181 do_test boundary2-2.1.lt.4 {
    182   db eval {
    183     SELECT a FROM t1 WHERE r < 72057594037927935 ORDER BY r DESC
    184   }
    185 } {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}
    186 do_test boundary2-2.1.lt.5 {
    187   db eval {
    188     SELECT a FROM t1 WHERE r < 72057594037927935 ORDER BY x
    189   }
    190 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 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}
    191 do_test boundary2-2.1.le.1 {
    192   db eval {
    193     SELECT a FROM t1 WHERE r <= 72057594037927935 ORDER BY a
    194   }
    195 } {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}
    196 do_test boundary2-2.1.le.2 {
    197   db eval {
    198     SELECT a FROM t1 WHERE r <= 72057594037927935 ORDER BY a DESC
    199   }
    200 } {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}
    201 do_test boundary2-2.1.le.3 {
    202   db eval {
    203     SELECT a FROM t1 WHERE r <= 72057594037927935 ORDER BY r
    204   }
    205 } {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}
    206 do_test boundary2-2.1.le.4 {
    207   db eval {
    208     SELECT a FROM t1 WHERE r <= 72057594037927935 ORDER BY r DESC
    209   }
    210 } {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}
    211 do_test boundary2-2.1.le.5 {
    212   db eval {
    213     SELECT a FROM t1 WHERE r <= 72057594037927935 ORDER BY x
    214   }
    215 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 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}
    216 do_test boundary2-2.2.1 {
    217   db eval {
    218     SELECT * FROM t1 WHERE r=16384
    219   }
    220 } {16384 16 0000000000004000}
    221 do_test boundary2-2.2.2 {
    222   db eval {
    223     SELECT r, a FROM t1 WHERE x='0000000000004000'
    224   }
    225 } {16384 16}
    226 do_test boundary2-2.2.3 {
    227   db eval {
    228     SELECT r, x FROM t1 WHERE a=16
    229   }
    230 } {16384 0000000000004000}
    231 do_test boundary2-2.2.gt.1 {
    232   db eval {
    233     SELECT a FROM t1 WHERE r > 16384 ORDER BY a
    234   }
    235 } {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}
    236 do_test boundary2-2.2.gt.2 {
    237   db eval {
    238     SELECT a FROM t1 WHERE r > 16384 ORDER BY a DESC
    239   }
    240 } {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}
    241 do_test boundary2-2.2.gt.3 {
    242   db eval {
    243     SELECT a FROM t1 WHERE r > 16384 ORDER BY r
    244   }
    245 } {23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    246 do_test boundary2-2.2.gt.4 {
    247   db eval {
    248     SELECT a FROM t1 WHERE r > 16384 ORDER BY r DESC
    249   }
    250 } {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}
    251 do_test boundary2-2.2.gt.5 {
    252   db eval {
    253     SELECT a FROM t1 WHERE r > 16384 ORDER BY x
    254   }
    255 } {23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    256 do_test boundary2-2.2.ge.1 {
    257   db eval {
    258     SELECT a FROM t1 WHERE r >= 16384 ORDER BY a
    259   }
    260 } {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}
    261 do_test boundary2-2.2.ge.2 {
    262   db eval {
    263     SELECT a FROM t1 WHERE r >= 16384 ORDER BY a DESC
    264   }
    265 } {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}
    266 do_test boundary2-2.2.ge.3 {
    267   db eval {
    268     SELECT a FROM t1 WHERE r >= 16384 ORDER BY r
    269   }
    270 } {16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    271 do_test boundary2-2.2.ge.4 {
    272   db eval {
    273     SELECT a FROM t1 WHERE r >= 16384 ORDER BY r DESC
    274   }
    275 } {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}
    276 do_test boundary2-2.2.ge.5 {
    277   db eval {
    278     SELECT a FROM t1 WHERE r >= 16384 ORDER BY x
    279   }
    280 } {16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    281 do_test boundary2-2.2.lt.1 {
    282   db eval {
    283     SELECT a FROM t1 WHERE r < 16384 ORDER BY a
    284   }
    285 } {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}
    286 do_test boundary2-2.2.lt.2 {
    287   db eval {
    288     SELECT a FROM t1 WHERE r < 16384 ORDER BY a DESC
    289   }
    290 } {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}
    291 do_test boundary2-2.2.lt.3 {
    292   db eval {
    293     SELECT a FROM t1 WHERE r < 16384 ORDER BY r
    294   }
    295 } {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}
    296 do_test boundary2-2.2.lt.4 {
    297   db eval {
    298     SELECT a FROM t1 WHERE r < 16384 ORDER BY r DESC
    299   }
    300 } {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}
    301 do_test boundary2-2.2.lt.5 {
    302   db eval {
    303     SELECT a FROM t1 WHERE r < 16384 ORDER BY x
    304   }
    305 } {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}
    306 do_test boundary2-2.2.le.1 {
    307   db eval {
    308     SELECT a FROM t1 WHERE r <= 16384 ORDER BY a
    309   }
    310 } {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}
    311 do_test boundary2-2.2.le.2 {
    312   db eval {
    313     SELECT a FROM t1 WHERE r <= 16384 ORDER BY a DESC
    314   }
    315 } {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}
    316 do_test boundary2-2.2.le.3 {
    317   db eval {
    318     SELECT a FROM t1 WHERE r <= 16384 ORDER BY r
    319   }
    320 } {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}
    321 do_test boundary2-2.2.le.4 {
    322   db eval {
    323     SELECT a FROM t1 WHERE r <= 16384 ORDER BY r DESC
    324   }
    325 } {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}
    326 do_test boundary2-2.2.le.5 {
    327   db eval {
    328     SELECT a FROM t1 WHERE r <= 16384 ORDER BY x
    329   }
    330 } {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}
    331 do_test boundary2-2.3.1 {
    332   db eval {
    333     SELECT * FROM t1 WHERE r=4294967296
    334   }
    335 } {4294967296 36 0000000100000000}
    336 do_test boundary2-2.3.2 {
    337   db eval {
    338     SELECT r, a FROM t1 WHERE x='0000000100000000'
    339   }
    340 } {4294967296 36}
    341 do_test boundary2-2.3.3 {
    342   db eval {
    343     SELECT r, x FROM t1 WHERE a=36
    344   }
    345 } {4294967296 0000000100000000}
    346 do_test boundary2-2.3.gt.1 {
    347   db eval {
    348     SELECT a FROM t1 WHERE r > 4294967296 ORDER BY a
    349   }
    350 } {3 7 10 13 17 19 22 25 26 27 28 34 35 39 43 45 46 56 57}
    351 do_test boundary2-2.3.gt.2 {
    352   db eval {
    353     SELECT a FROM t1 WHERE r > 4294967296 ORDER BY a DESC
    354   }
    355 } {57 56 46 45 43 39 35 34 28 27 26 25 22 19 17 13 10 7 3}
    356 do_test boundary2-2.3.gt.3 {
    357   db eval {
    358     SELECT a FROM t1 WHERE r > 4294967296 ORDER BY r
    359   }
    360 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    361 do_test boundary2-2.3.gt.4 {
    362   db eval {
    363     SELECT a FROM t1 WHERE r > 4294967296 ORDER BY r DESC
    364   }
    365 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39}
    366 do_test boundary2-2.3.gt.5 {
    367   db eval {
    368     SELECT a FROM t1 WHERE r > 4294967296 ORDER BY x
    369   }
    370 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    371 do_test boundary2-2.3.ge.1 {
    372   db eval {
    373     SELECT a FROM t1 WHERE r >= 4294967296 ORDER BY a
    374   }
    375 } {3 7 10 13 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
    376 do_test boundary2-2.3.ge.2 {
    377   db eval {
    378     SELECT a FROM t1 WHERE r >= 4294967296 ORDER BY a DESC
    379   }
    380 } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 13 10 7 3}
    381 do_test boundary2-2.3.ge.3 {
    382   db eval {
    383     SELECT a FROM t1 WHERE r >= 4294967296 ORDER BY r
    384   }
    385 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    386 do_test boundary2-2.3.ge.4 {
    387   db eval {
    388     SELECT a FROM t1 WHERE r >= 4294967296 ORDER BY r DESC
    389   }
    390 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36}
    391 do_test boundary2-2.3.ge.5 {
    392   db eval {
    393     SELECT a FROM t1 WHERE r >= 4294967296 ORDER BY x
    394   }
    395 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    396 do_test boundary2-2.3.lt.1 {
    397   db eval {
    398     SELECT a FROM t1 WHERE r < 4294967296 ORDER BY a
    399   }
    400 } {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}
    401 do_test boundary2-2.3.lt.2 {
    402   db eval {
    403     SELECT a FROM t1 WHERE r < 4294967296 ORDER BY a DESC
    404   }
    405 } {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}
    406 do_test boundary2-2.3.lt.3 {
    407   db eval {
    408     SELECT a FROM t1 WHERE r < 4294967296 ORDER BY r
    409   }
    410 } {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}
    411 do_test boundary2-2.3.lt.4 {
    412   db eval {
    413     SELECT a FROM t1 WHERE r < 4294967296 ORDER BY r DESC
    414   }
    415 } {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}
    416 do_test boundary2-2.3.lt.5 {
    417   db eval {
    418     SELECT a FROM t1 WHERE r < 4294967296 ORDER BY x
    419   }
    420 } {59 60 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}
    421 do_test boundary2-2.3.le.1 {
    422   db eval {
    423     SELECT a FROM t1 WHERE r <= 4294967296 ORDER BY a
    424   }
    425 } {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}
    426 do_test boundary2-2.3.le.2 {
    427   db eval {
    428     SELECT a FROM t1 WHERE r <= 4294967296 ORDER BY a DESC
    429   }
    430 } {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}
    431 do_test boundary2-2.3.le.3 {
    432   db eval {
    433     SELECT a FROM t1 WHERE r <= 4294967296 ORDER BY r
    434   }
    435 } {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}
    436 do_test boundary2-2.3.le.4 {
    437   db eval {
    438     SELECT a FROM t1 WHERE r <= 4294967296 ORDER BY r DESC
    439   }
    440 } {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}
    441 do_test boundary2-2.3.le.5 {
    442   db eval {
    443     SELECT a FROM t1 WHERE r <= 4294967296 ORDER BY x
    444   }
    445 } {59 60 41 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}
    446 do_test boundary2-2.4.1 {
    447   db eval {
    448     SELECT * FROM t1 WHERE r=16777216
    449   }
    450 } {16777216 6 0000000001000000}
    451 do_test boundary2-2.4.2 {
    452   db eval {
    453     SELECT r, a FROM t1 WHERE x='0000000001000000'
    454   }
    455 } {16777216 6}
    456 do_test boundary2-2.4.3 {
    457   db eval {
    458     SELECT r, x FROM t1 WHERE a=6
    459   }
    460 } {16777216 0000000001000000}
    461 do_test boundary2-2.4.gt.1 {
    462   db eval {
    463     SELECT a FROM t1 WHERE r > 16777216 ORDER BY a
    464   }
    465 } {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}
    466 do_test boundary2-2.4.gt.2 {
    467   db eval {
    468     SELECT a FROM t1 WHERE r > 16777216 ORDER BY a DESC
    469   }
    470 } {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}
    471 do_test boundary2-2.4.gt.3 {
    472   db eval {
    473     SELECT a FROM t1 WHERE r > 16777216 ORDER BY r
    474   }
    475 } {12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    476 do_test boundary2-2.4.gt.4 {
    477   db eval {
    478     SELECT a FROM t1 WHERE r > 16777216 ORDER BY r DESC
    479   }
    480 } {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}
    481 do_test boundary2-2.4.gt.5 {
    482   db eval {
    483     SELECT a FROM t1 WHERE r > 16777216 ORDER BY x
    484   }
    485 } {12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    486 do_test boundary2-2.4.ge.1 {
    487   db eval {
    488     SELECT a FROM t1 WHERE r >= 16777216 ORDER BY a
    489   }
    490 } {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}
    491 do_test boundary2-2.4.ge.2 {
    492   db eval {
    493     SELECT a FROM t1 WHERE r >= 16777216 ORDER BY a DESC
    494   }
    495 } {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}
    496 do_test boundary2-2.4.ge.3 {
    497   db eval {
    498     SELECT a FROM t1 WHERE r >= 16777216 ORDER BY r
    499   }
    500 } {6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    501 do_test boundary2-2.4.ge.4 {
    502   db eval {
    503     SELECT a FROM t1 WHERE r >= 16777216 ORDER BY r DESC
    504   }
    505 } {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}
    506 do_test boundary2-2.4.ge.5 {
    507   db eval {
    508     SELECT a FROM t1 WHERE r >= 16777216 ORDER BY x
    509   }
    510 } {6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    511 do_test boundary2-2.4.lt.1 {
    512   db eval {
    513     SELECT a FROM t1 WHERE r < 16777216 ORDER BY a
    514   }
    515 } {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}
    516 do_test boundary2-2.4.lt.2 {
    517   db eval {
    518     SELECT a FROM t1 WHERE r < 16777216 ORDER BY a DESC
    519   }
    520 } {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}
    521 do_test boundary2-2.4.lt.3 {
    522   db eval {
    523     SELECT a FROM t1 WHERE r < 16777216 ORDER BY r
    524   }
    525 } {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}
    526 do_test boundary2-2.4.lt.4 {
    527   db eval {
    528     SELECT a FROM t1 WHERE r < 16777216 ORDER BY r DESC
    529   }
    530 } {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}
    531 do_test boundary2-2.4.lt.5 {
    532   db eval {
    533     SELECT a FROM t1 WHERE r < 16777216 ORDER BY x
    534   }
    535 } {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}
    536 do_test boundary2-2.4.le.1 {
    537   db eval {
    538     SELECT a FROM t1 WHERE r <= 16777216 ORDER BY a
    539   }
    540 } {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}
    541 do_test boundary2-2.4.le.2 {
    542   db eval {
    543     SELECT a FROM t1 WHERE r <= 16777216 ORDER BY a DESC
    544   }
    545 } {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}
    546 do_test boundary2-2.4.le.3 {
    547   db eval {
    548     SELECT a FROM t1 WHERE r <= 16777216 ORDER BY r
    549   }
    550 } {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}
    551 do_test boundary2-2.4.le.4 {
    552   db eval {
    553     SELECT a FROM t1 WHERE r <= 16777216 ORDER BY r DESC
    554   }
    555 } {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}
    556 do_test boundary2-2.4.le.5 {
    557   db eval {
    558     SELECT a FROM t1 WHERE r <= 16777216 ORDER BY x
    559   }
    560 } {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}
    561 do_test boundary2-2.5.1 {
    562   db eval {
    563     SELECT * FROM t1 WHERE r=-32769
    564   }
    565 } {-32769 29 ffffffffffff7fff}
    566 do_test boundary2-2.5.2 {
    567   db eval {
    568     SELECT r, a FROM t1 WHERE x='ffffffffffff7fff'
    569   }
    570 } {-32769 29}
    571 do_test boundary2-2.5.3 {
    572   db eval {
    573     SELECT r, x FROM t1 WHERE a=29
    574   }
    575 } {-32769 ffffffffffff7fff}
    576 do_test boundary2-2.5.gt.1 {
    577   db eval {
    578     SELECT a FROM t1 WHERE r > -32769 ORDER BY a
    579   }
    580 } {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}
    581 do_test boundary2-2.5.gt.2 {
    582   db eval {
    583     SELECT a FROM t1 WHERE r > -32769 ORDER BY a DESC
    584   }
    585 } {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}
    586 do_test boundary2-2.5.gt.3 {
    587   db eval {
    588     SELECT a FROM t1 WHERE r > -32769 ORDER BY r
    589   }
    590 } {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}
    591 do_test boundary2-2.5.gt.4 {
    592   db eval {
    593     SELECT a FROM t1 WHERE r > -32769 ORDER BY r DESC
    594   }
    595 } {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}
    596 do_test boundary2-2.5.gt.5 {
    597   db eval {
    598     SELECT a FROM t1 WHERE r > -32769 ORDER BY x
    599   }
    600 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
    601 do_test boundary2-2.5.ge.1 {
    602   db eval {
    603     SELECT a FROM t1 WHERE r >= -32769 ORDER BY a
    604   }
    605 } {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}
    606 do_test boundary2-2.5.ge.2 {
    607   db eval {
    608     SELECT a FROM t1 WHERE r >= -32769 ORDER BY a DESC
    609   }
    610 } {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}
    611 do_test boundary2-2.5.ge.3 {
    612   db eval {
    613     SELECT a FROM t1 WHERE r >= -32769 ORDER BY r
    614   }
    615 } {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}
    616 do_test boundary2-2.5.ge.4 {
    617   db eval {
    618     SELECT a FROM t1 WHERE r >= -32769 ORDER BY r DESC
    619   }
    620 } {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}
    621 do_test boundary2-2.5.ge.5 {
    622   db eval {
    623     SELECT a FROM t1 WHERE r >= -32769 ORDER BY x
    624   }
    625 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
    626 do_test boundary2-2.5.lt.1 {
    627   db eval {
    628     SELECT a FROM t1 WHERE r < -32769 ORDER BY a
    629   }
    630 } {1 2 11 21 37 44 47 55 58 63 64}
    631 do_test boundary2-2.5.lt.2 {
    632   db eval {
    633     SELECT a FROM t1 WHERE r < -32769 ORDER BY a DESC
    634   }
    635 } {64 63 58 55 47 44 37 21 11 2 1}
    636 do_test boundary2-2.5.lt.3 {
    637   db eval {
    638     SELECT a FROM t1 WHERE r < -32769 ORDER BY r
    639   }
    640 } {55 2 64 21 44 58 63 47 11 1 37}
    641 do_test boundary2-2.5.lt.4 {
    642   db eval {
    643     SELECT a FROM t1 WHERE r < -32769 ORDER BY r DESC
    644   }
    645 } {37 1 11 47 63 58 44 21 64 2 55}
    646 do_test boundary2-2.5.lt.5 {
    647   db eval {
    648     SELECT a FROM t1 WHERE r < -32769 ORDER BY x
    649   }
    650 } {55 2 64 21 44 58 63 47 11 1 37}
    651 do_test boundary2-2.5.le.1 {
    652   db eval {
    653     SELECT a FROM t1 WHERE r <= -32769 ORDER BY a
    654   }
    655 } {1 2 11 21 29 37 44 47 55 58 63 64}
    656 do_test boundary2-2.5.le.2 {
    657   db eval {
    658     SELECT a FROM t1 WHERE r <= -32769 ORDER BY a DESC
    659   }
    660 } {64 63 58 55 47 44 37 29 21 11 2 1}
    661 do_test boundary2-2.5.le.3 {
    662   db eval {
    663     SELECT a FROM t1 WHERE r <= -32769 ORDER BY r
    664   }
    665 } {55 2 64 21 44 58 63 47 11 1 37 29}
    666 do_test boundary2-2.5.le.4 {
    667   db eval {
    668     SELECT a FROM t1 WHERE r <= -32769 ORDER BY r DESC
    669   }
    670 } {29 37 1 11 47 63 58 44 21 64 2 55}
    671 do_test boundary2-2.5.le.5 {
    672   db eval {
    673     SELECT a FROM t1 WHERE r <= -32769 ORDER BY x
    674   }
    675 } {55 2 64 21 44 58 63 47 11 1 37 29}
    676 do_test boundary2-2.6.1 {
    677   db eval {
    678     SELECT * FROM t1 WHERE r=-140737488355329
    679   }
    680 } {-140737488355329 21 ffff7fffffffffff}
    681 do_test boundary2-2.6.2 {
    682   db eval {
    683     SELECT r, a FROM t1 WHERE x='ffff7fffffffffff'
    684   }
    685 } {-140737488355329 21}
    686 do_test boundary2-2.6.3 {
    687   db eval {
    688     SELECT r, x FROM t1 WHERE a=21
    689   }
    690 } {-140737488355329 ffff7fffffffffff}
    691 do_test boundary2-2.6.gt.1 {
    692   db eval {
    693     SELECT a FROM t1 WHERE r > -140737488355329 ORDER BY a
    694   }
    695 } {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}
    696 do_test boundary2-2.6.gt.2 {
    697   db eval {
    698     SELECT a FROM t1 WHERE r > -140737488355329 ORDER BY a DESC
    699   }
    700 } {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}
    701 do_test boundary2-2.6.gt.3 {
    702   db eval {
    703     SELECT a FROM t1 WHERE r > -140737488355329 ORDER BY r
    704   }
    705 } {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}
    706 do_test boundary2-2.6.gt.4 {
    707   db eval {
    708     SELECT a FROM t1 WHERE r > -140737488355329 ORDER BY r DESC
    709   }
    710 } {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}
    711 do_test boundary2-2.6.gt.5 {
    712   db eval {
    713     SELECT a FROM t1 WHERE r > -140737488355329 ORDER BY x
    714   }
    715 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
    716 do_test boundary2-2.6.ge.1 {
    717   db eval {
    718     SELECT a FROM t1 WHERE r >= -140737488355329 ORDER BY a
    719   }
    720 } {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}
    721 do_test boundary2-2.6.ge.2 {
    722   db eval {
    723     SELECT a FROM t1 WHERE r >= -140737488355329 ORDER BY a DESC
    724   }
    725 } {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}
    726 do_test boundary2-2.6.ge.3 {
    727   db eval {
    728     SELECT a FROM t1 WHERE r >= -140737488355329 ORDER BY r
    729   }
    730 } {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}
    731 do_test boundary2-2.6.ge.4 {
    732   db eval {
    733     SELECT a FROM t1 WHERE r >= -140737488355329 ORDER BY r DESC
    734   }
    735 } {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}
    736 do_test boundary2-2.6.ge.5 {
    737   db eval {
    738     SELECT a FROM t1 WHERE r >= -140737488355329 ORDER BY x
    739   }
    740 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
    741 do_test boundary2-2.6.lt.1 {
    742   db eval {
    743     SELECT a FROM t1 WHERE r < -140737488355329 ORDER BY a
    744   }
    745 } {2 55 64}
    746 do_test boundary2-2.6.lt.2 {
    747   db eval {
    748     SELECT a FROM t1 WHERE r < -140737488355329 ORDER BY a DESC
    749   }
    750 } {64 55 2}
    751 do_test boundary2-2.6.lt.3 {
    752   db eval {
    753     SELECT a FROM t1 WHERE r < -140737488355329 ORDER BY r
    754   }
    755 } {55 2 64}
    756 do_test boundary2-2.6.lt.4 {
    757   db eval {
    758     SELECT a FROM t1 WHERE r < -140737488355329 ORDER BY r DESC
    759   }
    760 } {64 2 55}
    761 do_test boundary2-2.6.lt.5 {
    762   db eval {
    763     SELECT a FROM t1 WHERE r < -140737488355329 ORDER BY x
    764   }
    765 } {55 2 64}
    766 do_test boundary2-2.6.le.1 {
    767   db eval {
    768     SELECT a FROM t1 WHERE r <= -140737488355329 ORDER BY a
    769   }
    770 } {2 21 55 64}
    771 do_test boundary2-2.6.le.2 {
    772   db eval {
    773     SELECT a FROM t1 WHERE r <= -140737488355329 ORDER BY a DESC
    774   }
    775 } {64 55 21 2}
    776 do_test boundary2-2.6.le.3 {
    777   db eval {
    778     SELECT a FROM t1 WHERE r <= -140737488355329 ORDER BY r
    779   }
    780 } {55 2 64 21}
    781 do_test boundary2-2.6.le.4 {
    782   db eval {
    783     SELECT a FROM t1 WHERE r <= -140737488355329 ORDER BY r DESC
    784   }
    785 } {21 64 2 55}
    786 do_test boundary2-2.6.le.5 {
    787   db eval {
    788     SELECT a FROM t1 WHERE r <= -140737488355329 ORDER BY x
    789   }
    790 } {55 2 64 21}
    791 do_test boundary2-2.7.1 {
    792   db eval {
    793     SELECT * FROM t1 WHERE r=2
    794   }
    795 } {2 41 0000000000000002}
    796 do_test boundary2-2.7.2 {
    797   db eval {
    798     SELECT r, a FROM t1 WHERE x='0000000000000002'
    799   }
    800 } {2 41}
    801 do_test boundary2-2.7.3 {
    802   db eval {
    803     SELECT r, x FROM t1 WHERE a=41
    804   }
    805 } {2 0000000000000002}
    806 do_test boundary2-2.7.gt.1 {
    807   db eval {
    808     SELECT a FROM t1 WHERE r > 2 ORDER BY a
    809   }
    810 } {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}
    811 do_test boundary2-2.7.gt.2 {
    812   db eval {
    813     SELECT a FROM t1 WHERE r > 2 ORDER BY a DESC
    814   }
    815 } {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}
    816 do_test boundary2-2.7.gt.3 {
    817   db eval {
    818     SELECT a FROM t1 WHERE r > 2 ORDER BY r
    819   }
    820 } {5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    821 do_test boundary2-2.7.gt.4 {
    822   db eval {
    823     SELECT a FROM t1 WHERE r > 2 ORDER BY r DESC
    824   }
    825 } {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}
    826 do_test boundary2-2.7.gt.5 {
    827   db eval {
    828     SELECT a FROM t1 WHERE r > 2 ORDER BY x
    829   }
    830 } {5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    831 do_test boundary2-2.7.ge.1 {
    832   db eval {
    833     SELECT a FROM t1 WHERE r >= 2 ORDER BY a
    834   }
    835 } {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}
    836 do_test boundary2-2.7.ge.2 {
    837   db eval {
    838     SELECT a FROM t1 WHERE r >= 2 ORDER BY a DESC
    839   }
    840 } {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}
    841 do_test boundary2-2.7.ge.3 {
    842   db eval {
    843     SELECT a FROM t1 WHERE r >= 2 ORDER BY r
    844   }
    845 } {41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    846 do_test boundary2-2.7.ge.4 {
    847   db eval {
    848     SELECT a FROM t1 WHERE r >= 2 ORDER BY r DESC
    849   }
    850 } {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}
    851 do_test boundary2-2.7.ge.5 {
    852   db eval {
    853     SELECT a FROM t1 WHERE r >= 2 ORDER BY x
    854   }
    855 } {41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    856 do_test boundary2-2.7.lt.1 {
    857   db eval {
    858     SELECT a FROM t1 WHERE r < 2 ORDER BY a
    859   }
    860 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 60 63 64}
    861 do_test boundary2-2.7.lt.2 {
    862   db eval {
    863     SELECT a FROM t1 WHERE r < 2 ORDER BY a DESC
    864   }
    865 } {64 63 60 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
    866 do_test boundary2-2.7.lt.3 {
    867   db eval {
    868     SELECT a FROM t1 WHERE r < 2 ORDER BY r
    869   }
    870 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60}
    871 do_test boundary2-2.7.lt.4 {
    872   db eval {
    873     SELECT a FROM t1 WHERE r < 2 ORDER BY r DESC
    874   }
    875 } {60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
    876 do_test boundary2-2.7.lt.5 {
    877   db eval {
    878     SELECT a FROM t1 WHERE r < 2 ORDER BY x
    879   }
    880 } {59 60 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
    881 do_test boundary2-2.7.le.1 {
    882   db eval {
    883     SELECT a FROM t1 WHERE r <= 2 ORDER BY a
    884   }
    885 } {1 2 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
    886 do_test boundary2-2.7.le.2 {
    887   db eval {
    888     SELECT a FROM t1 WHERE r <= 2 ORDER BY a DESC
    889   }
    890 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 2 1}
    891 do_test boundary2-2.7.le.3 {
    892   db eval {
    893     SELECT a FROM t1 WHERE r <= 2 ORDER BY r
    894   }
    895 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41}
    896 do_test boundary2-2.7.le.4 {
    897   db eval {
    898     SELECT a FROM t1 WHERE r <= 2 ORDER BY r DESC
    899   }
    900 } {41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
    901 do_test boundary2-2.7.le.5 {
    902   db eval {
    903     SELECT a FROM t1 WHERE r <= 2 ORDER BY x
    904   }
    905 } {59 60 41 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
    906 do_test boundary2-2.8.1 {
    907   db eval {
    908     SELECT * FROM t1 WHERE r=4
    909   }
    910 } {4 31 0000000000000004}
    911 do_test boundary2-2.8.2 {
    912   db eval {
    913     SELECT r, a FROM t1 WHERE x='0000000000000004'
    914   }
    915 } {4 31}
    916 do_test boundary2-2.8.3 {
    917   db eval {
    918     SELECT r, x FROM t1 WHERE a=31
    919   }
    920 } {4 0000000000000004}
    921 do_test boundary2-2.8.gt.1 {
    922   db eval {
    923     SELECT a FROM t1 WHERE r > 4 ORDER BY a
    924   }
    925 } {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}
    926 do_test boundary2-2.8.gt.2 {
    927   db eval {
    928     SELECT a FROM t1 WHERE r > 4 ORDER BY a DESC
    929   }
    930 } {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}
    931 do_test boundary2-2.8.gt.3 {
    932   db eval {
    933     SELECT a FROM t1 WHERE r > 4 ORDER BY r
    934   }
    935 } {4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    936 do_test boundary2-2.8.gt.4 {
    937   db eval {
    938     SELECT a FROM t1 WHERE r > 4 ORDER BY r DESC
    939   }
    940 } {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}
    941 do_test boundary2-2.8.gt.5 {
    942   db eval {
    943     SELECT a FROM t1 WHERE r > 4 ORDER BY x
    944   }
    945 } {4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    946 do_test boundary2-2.8.ge.1 {
    947   db eval {
    948     SELECT a FROM t1 WHERE r >= 4 ORDER BY a
    949   }
    950 } {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}
    951 do_test boundary2-2.8.ge.2 {
    952   db eval {
    953     SELECT a FROM t1 WHERE r >= 4 ORDER BY a DESC
    954   }
    955 } {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}
    956 do_test boundary2-2.8.ge.3 {
    957   db eval {
    958     SELECT a FROM t1 WHERE r >= 4 ORDER BY r
    959   }
    960 } {31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    961 do_test boundary2-2.8.ge.4 {
    962   db eval {
    963     SELECT a FROM t1 WHERE r >= 4 ORDER BY r DESC
    964   }
    965 } {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}
    966 do_test boundary2-2.8.ge.5 {
    967   db eval {
    968     SELECT a FROM t1 WHERE r >= 4 ORDER BY x
    969   }
    970 } {31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
    971 do_test boundary2-2.8.lt.1 {
    972   db eval {
    973     SELECT a FROM t1 WHERE r < 4 ORDER BY a
    974   }
    975 } {1 2 5 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
    976 do_test boundary2-2.8.lt.2 {
    977   db eval {
    978     SELECT a FROM t1 WHERE r < 4 ORDER BY a DESC
    979   }
    980 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 5 2 1}
    981 do_test boundary2-2.8.lt.3 {
    982   db eval {
    983     SELECT a FROM t1 WHERE r < 4 ORDER BY r
    984   }
    985 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5}
    986 do_test boundary2-2.8.lt.4 {
    987   db eval {
    988     SELECT a FROM t1 WHERE r < 4 ORDER BY r DESC
    989   }
    990 } {5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
    991 do_test boundary2-2.8.lt.5 {
    992   db eval {
    993     SELECT a FROM t1 WHERE r < 4 ORDER BY x
    994   }
    995 } {59 60 41 5 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
    996 do_test boundary2-2.8.le.1 {
    997   db eval {
    998     SELECT a FROM t1 WHERE r <= 4 ORDER BY a
    999   }
   1000 } {1 2 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
   1001 do_test boundary2-2.8.le.2 {
   1002   db eval {
   1003     SELECT a FROM t1 WHERE r <= 4 ORDER BY a DESC
   1004   }
   1005 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 2 1}
   1006 do_test boundary2-2.8.le.3 {
   1007   db eval {
   1008     SELECT a FROM t1 WHERE r <= 4 ORDER BY r
   1009   }
   1010 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31}
   1011 do_test boundary2-2.8.le.4 {
   1012   db eval {
   1013     SELECT a FROM t1 WHERE r <= 4 ORDER BY r DESC
   1014   }
   1015 } {31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   1016 do_test boundary2-2.8.le.5 {
   1017   db eval {
   1018     SELECT a FROM t1 WHERE r <= 4 ORDER BY x
   1019   }
   1020 } {59 60 41 5 31 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   1021 do_test boundary2-2.9.1 {
   1022   db eval {
   1023     SELECT * FROM t1 WHERE r=562949953421311
   1024   }
   1025 } {562949953421311 13 0001ffffffffffff}
   1026 do_test boundary2-2.9.2 {
   1027   db eval {
   1028     SELECT r, a FROM t1 WHERE x='0001ffffffffffff'
   1029   }
   1030 } {562949953421311 13}
   1031 do_test boundary2-2.9.3 {
   1032   db eval {
   1033     SELECT r, x FROM t1 WHERE a=13
   1034   }
   1035 } {562949953421311 0001ffffffffffff}
   1036 do_test boundary2-2.9.gt.1 {
   1037   db eval {
   1038     SELECT a FROM t1 WHERE r > 562949953421311 ORDER BY a
   1039   }
   1040 } {3 17 27 28 43 45}
   1041 do_test boundary2-2.9.gt.2 {
   1042   db eval {
   1043     SELECT a FROM t1 WHERE r > 562949953421311 ORDER BY a DESC
   1044   }
   1045 } {45 43 28 27 17 3}
   1046 do_test boundary2-2.9.gt.3 {
   1047   db eval {
   1048     SELECT a FROM t1 WHERE r > 562949953421311 ORDER BY r
   1049   }
   1050 } {43 27 45 17 28 3}
   1051 do_test boundary2-2.9.gt.4 {
   1052   db eval {
   1053     SELECT a FROM t1 WHERE r > 562949953421311 ORDER BY r DESC
   1054   }
   1055 } {3 28 17 45 27 43}
   1056 do_test boundary2-2.9.gt.5 {
   1057   db eval {
   1058     SELECT a FROM t1 WHERE r > 562949953421311 ORDER BY x
   1059   }
   1060 } {43 27 45 17 28 3}
   1061 do_test boundary2-2.9.ge.1 {
   1062   db eval {
   1063     SELECT a FROM t1 WHERE r >= 562949953421311 ORDER BY a
   1064   }
   1065 } {3 13 17 27 28 43 45}
   1066 do_test boundary2-2.9.ge.2 {
   1067   db eval {
   1068     SELECT a FROM t1 WHERE r >= 562949953421311 ORDER BY a DESC
   1069   }
   1070 } {45 43 28 27 17 13 3}
   1071 do_test boundary2-2.9.ge.3 {
   1072   db eval {
   1073     SELECT a FROM t1 WHERE r >= 562949953421311 ORDER BY r
   1074   }
   1075 } {13 43 27 45 17 28 3}
   1076 do_test boundary2-2.9.ge.4 {
   1077   db eval {
   1078     SELECT a FROM t1 WHERE r >= 562949953421311 ORDER BY r DESC
   1079   }
   1080 } {3 28 17 45 27 43 13}
   1081 do_test boundary2-2.9.ge.5 {
   1082   db eval {
   1083     SELECT a FROM t1 WHERE r >= 562949953421311 ORDER BY x
   1084   }
   1085 } {13 43 27 45 17 28 3}
   1086 do_test boundary2-2.9.lt.1 {
   1087   db eval {
   1088     SELECT a FROM t1 WHERE r < 562949953421311 ORDER BY a
   1089   }
   1090 } {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}
   1091 do_test boundary2-2.9.lt.2 {
   1092   db eval {
   1093     SELECT a FROM t1 WHERE r < 562949953421311 ORDER BY a DESC
   1094   }
   1095 } {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}
   1096 do_test boundary2-2.9.lt.3 {
   1097   db eval {
   1098     SELECT a FROM t1 WHERE r < 562949953421311 ORDER BY r
   1099   }
   1100 } {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}
   1101 do_test boundary2-2.9.lt.4 {
   1102   db eval {
   1103     SELECT a FROM t1 WHERE r < 562949953421311 ORDER BY r DESC
   1104   }
   1105 } {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}
   1106 do_test boundary2-2.9.lt.5 {
   1107   db eval {
   1108     SELECT a FROM t1 WHERE r < 562949953421311 ORDER BY x
   1109   }
   1110 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 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}
   1111 do_test boundary2-2.9.le.1 {
   1112   db eval {
   1113     SELECT a FROM t1 WHERE r <= 562949953421311 ORDER BY a
   1114   }
   1115 } {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}
   1116 do_test boundary2-2.9.le.2 {
   1117   db eval {
   1118     SELECT a FROM t1 WHERE r <= 562949953421311 ORDER BY a DESC
   1119   }
   1120 } {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}
   1121 do_test boundary2-2.9.le.3 {
   1122   db eval {
   1123     SELECT a FROM t1 WHERE r <= 562949953421311 ORDER BY r
   1124   }
   1125 } {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}
   1126 do_test boundary2-2.9.le.4 {
   1127   db eval {
   1128     SELECT a FROM t1 WHERE r <= 562949953421311 ORDER BY r DESC
   1129   }
   1130 } {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}
   1131 do_test boundary2-2.9.le.5 {
   1132   db eval {
   1133     SELECT a FROM t1 WHERE r <= 562949953421311 ORDER BY x
   1134   }
   1135 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 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}
   1136 do_test boundary2-2.10.1 {
   1137   db eval {
   1138     SELECT * FROM t1 WHERE r=256
   1139   }
   1140 } {256 61 0000000000000100}
   1141 do_test boundary2-2.10.2 {
   1142   db eval {
   1143     SELECT r, a FROM t1 WHERE x='0000000000000100'
   1144   }
   1145 } {256 61}
   1146 do_test boundary2-2.10.3 {
   1147   db eval {
   1148     SELECT r, x FROM t1 WHERE a=61
   1149   }
   1150 } {256 0000000000000100}
   1151 do_test boundary2-2.10.gt.1 {
   1152   db eval {
   1153     SELECT a FROM t1 WHERE r > 256 ORDER BY a
   1154   }
   1155 } {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}
   1156 do_test boundary2-2.10.gt.2 {
   1157   db eval {
   1158     SELECT a FROM t1 WHERE r > 256 ORDER BY a DESC
   1159   }
   1160 } {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}
   1161 do_test boundary2-2.10.gt.3 {
   1162   db eval {
   1163     SELECT a FROM t1 WHERE r > 256 ORDER BY r
   1164   }
   1165 } {8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1166 do_test boundary2-2.10.gt.4 {
   1167   db eval {
   1168     SELECT a FROM t1 WHERE r > 256 ORDER BY r DESC
   1169   }
   1170 } {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}
   1171 do_test boundary2-2.10.gt.5 {
   1172   db eval {
   1173     SELECT a FROM t1 WHERE r > 256 ORDER BY x
   1174   }
   1175 } {8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1176 do_test boundary2-2.10.ge.1 {
   1177   db eval {
   1178     SELECT a FROM t1 WHERE r >= 256 ORDER BY a
   1179   }
   1180 } {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}
   1181 do_test boundary2-2.10.ge.2 {
   1182   db eval {
   1183     SELECT a FROM t1 WHERE r >= 256 ORDER BY a DESC
   1184   }
   1185 } {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}
   1186 do_test boundary2-2.10.ge.3 {
   1187   db eval {
   1188     SELECT a FROM t1 WHERE r >= 256 ORDER BY r
   1189   }
   1190 } {61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1191 do_test boundary2-2.10.ge.4 {
   1192   db eval {
   1193     SELECT a FROM t1 WHERE r >= 256 ORDER BY r DESC
   1194   }
   1195 } {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}
   1196 do_test boundary2-2.10.ge.5 {
   1197   db eval {
   1198     SELECT a FROM t1 WHERE r >= 256 ORDER BY x
   1199   }
   1200 } {61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1201 do_test boundary2-2.10.lt.1 {
   1202   db eval {
   1203     SELECT a FROM t1 WHERE r < 256 ORDER BY a
   1204   }
   1205 } {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}
   1206 do_test boundary2-2.10.lt.2 {
   1207   db eval {
   1208     SELECT a FROM t1 WHERE r < 256 ORDER BY a DESC
   1209   }
   1210 } {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}
   1211 do_test boundary2-2.10.lt.3 {
   1212   db eval {
   1213     SELECT a FROM t1 WHERE r < 256 ORDER BY r
   1214   }
   1215 } {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}
   1216 do_test boundary2-2.10.lt.4 {
   1217   db eval {
   1218     SELECT a FROM t1 WHERE r < 256 ORDER BY r DESC
   1219   }
   1220 } {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}
   1221 do_test boundary2-2.10.lt.5 {
   1222   db eval {
   1223     SELECT a FROM t1 WHERE r < 256 ORDER BY x
   1224   }
   1225 } {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}
   1226 do_test boundary2-2.10.le.1 {
   1227   db eval {
   1228     SELECT a FROM t1 WHERE r <= 256 ORDER BY a
   1229   }
   1230 } {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}
   1231 do_test boundary2-2.10.le.2 {
   1232   db eval {
   1233     SELECT a FROM t1 WHERE r <= 256 ORDER BY a DESC
   1234   }
   1235 } {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}
   1236 do_test boundary2-2.10.le.3 {
   1237   db eval {
   1238     SELECT a FROM t1 WHERE r <= 256 ORDER BY r
   1239   }
   1240 } {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}
   1241 do_test boundary2-2.10.le.4 {
   1242   db eval {
   1243     SELECT a FROM t1 WHERE r <= 256 ORDER BY r DESC
   1244   }
   1245 } {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}
   1246 do_test boundary2-2.10.le.5 {
   1247   db eval {
   1248     SELECT a FROM t1 WHERE r <= 256 ORDER BY x
   1249   }
   1250 } {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}
   1251 do_test boundary2-2.11.1 {
   1252   db eval {
   1253     SELECT * FROM t1 WHERE r=34359738368
   1254   }
   1255 } {34359738368 22 0000000800000000}
   1256 do_test boundary2-2.11.2 {
   1257   db eval {
   1258     SELECT r, a FROM t1 WHERE x='0000000800000000'
   1259   }
   1260 } {34359738368 22}
   1261 do_test boundary2-2.11.3 {
   1262   db eval {
   1263     SELECT r, x FROM t1 WHERE a=22
   1264   }
   1265 } {34359738368 0000000800000000}
   1266 do_test boundary2-2.11.gt.1 {
   1267   db eval {
   1268     SELECT a FROM t1 WHERE r > 34359738368 ORDER BY a
   1269   }
   1270 } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 46 56 57}
   1271 do_test boundary2-2.11.gt.2 {
   1272   db eval {
   1273     SELECT a FROM t1 WHERE r > 34359738368 ORDER BY a DESC
   1274   }
   1275 } {57 56 46 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
   1276 do_test boundary2-2.11.gt.3 {
   1277   db eval {
   1278     SELECT a FROM t1 WHERE r > 34359738368 ORDER BY r
   1279   }
   1280 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1281 do_test boundary2-2.11.gt.4 {
   1282   db eval {
   1283     SELECT a FROM t1 WHERE r > 34359738368 ORDER BY r DESC
   1284   }
   1285 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46}
   1286 do_test boundary2-2.11.gt.5 {
   1287   db eval {
   1288     SELECT a FROM t1 WHERE r > 34359738368 ORDER BY x
   1289   }
   1290 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1291 do_test boundary2-2.11.ge.1 {
   1292   db eval {
   1293     SELECT a FROM t1 WHERE r >= 34359738368 ORDER BY a
   1294   }
   1295 } {3 7 10 13 17 19 22 25 26 27 28 34 35 43 45 46 56 57}
   1296 do_test boundary2-2.11.ge.2 {
   1297   db eval {
   1298     SELECT a FROM t1 WHERE r >= 34359738368 ORDER BY a DESC
   1299   }
   1300 } {57 56 46 45 43 35 34 28 27 26 25 22 19 17 13 10 7 3}
   1301 do_test boundary2-2.11.ge.3 {
   1302   db eval {
   1303     SELECT a FROM t1 WHERE r >= 34359738368 ORDER BY r
   1304   }
   1305 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1306 do_test boundary2-2.11.ge.4 {
   1307   db eval {
   1308     SELECT a FROM t1 WHERE r >= 34359738368 ORDER BY r DESC
   1309   }
   1310 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22}
   1311 do_test boundary2-2.11.ge.5 {
   1312   db eval {
   1313     SELECT a FROM t1 WHERE r >= 34359738368 ORDER BY x
   1314   }
   1315 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1316 do_test boundary2-2.11.lt.1 {
   1317   db eval {
   1318     SELECT a FROM t1 WHERE r < 34359738368 ORDER BY a
   1319   }
   1320 } {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}
   1321 do_test boundary2-2.11.lt.2 {
   1322   db eval {
   1323     SELECT a FROM t1 WHERE r < 34359738368 ORDER BY a DESC
   1324   }
   1325 } {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}
   1326 do_test boundary2-2.11.lt.3 {
   1327   db eval {
   1328     SELECT a FROM t1 WHERE r < 34359738368 ORDER BY r
   1329   }
   1330 } {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}
   1331 do_test boundary2-2.11.lt.4 {
   1332   db eval {
   1333     SELECT a FROM t1 WHERE r < 34359738368 ORDER BY r DESC
   1334   }
   1335 } {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}
   1336 do_test boundary2-2.11.lt.5 {
   1337   db eval {
   1338     SELECT a FROM t1 WHERE r < 34359738368 ORDER BY x
   1339   }
   1340 } {59 60 41 5 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}
   1341 do_test boundary2-2.11.le.1 {
   1342   db eval {
   1343     SELECT a FROM t1 WHERE r <= 34359738368 ORDER BY a
   1344   }
   1345 } {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}
   1346 do_test boundary2-2.11.le.2 {
   1347   db eval {
   1348     SELECT a FROM t1 WHERE r <= 34359738368 ORDER BY a DESC
   1349   }
   1350 } {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}
   1351 do_test boundary2-2.11.le.3 {
   1352   db eval {
   1353     SELECT a FROM t1 WHERE r <= 34359738368 ORDER BY r
   1354   }
   1355 } {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}
   1356 do_test boundary2-2.11.le.4 {
   1357   db eval {
   1358     SELECT a FROM t1 WHERE r <= 34359738368 ORDER BY r DESC
   1359   }
   1360 } {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}
   1361 do_test boundary2-2.11.le.5 {
   1362   db eval {
   1363     SELECT a FROM t1 WHERE r <= 34359738368 ORDER BY x
   1364   }
   1365 } {59 60 41 5 31 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}
   1366 do_test boundary2-2.12.1 {
   1367   db eval {
   1368     SELECT * FROM t1 WHERE r=65536
   1369   }
   1370 } {65536 62 0000000000010000}
   1371 do_test boundary2-2.12.2 {
   1372   db eval {
   1373     SELECT r, a FROM t1 WHERE x='0000000000010000'
   1374   }
   1375 } {65536 62}
   1376 do_test boundary2-2.12.3 {
   1377   db eval {
   1378     SELECT r, x FROM t1 WHERE a=62
   1379   }
   1380 } {65536 0000000000010000}
   1381 do_test boundary2-2.12.gt.1 {
   1382   db eval {
   1383     SELECT a FROM t1 WHERE r > 65536 ORDER BY a
   1384   }
   1385 } {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}
   1386 do_test boundary2-2.12.gt.2 {
   1387   db eval {
   1388     SELECT a FROM t1 WHERE r > 65536 ORDER BY a DESC
   1389   }
   1390 } {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}
   1391 do_test boundary2-2.12.gt.3 {
   1392   db eval {
   1393     SELECT a FROM t1 WHERE r > 65536 ORDER BY r
   1394   }
   1395 } {15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1396 do_test boundary2-2.12.gt.4 {
   1397   db eval {
   1398     SELECT a FROM t1 WHERE r > 65536 ORDER BY r DESC
   1399   }
   1400 } {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}
   1401 do_test boundary2-2.12.gt.5 {
   1402   db eval {
   1403     SELECT a FROM t1 WHERE r > 65536 ORDER BY x
   1404   }
   1405 } {15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1406 do_test boundary2-2.12.ge.1 {
   1407   db eval {
   1408     SELECT a FROM t1 WHERE r >= 65536 ORDER BY a
   1409   }
   1410 } {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}
   1411 do_test boundary2-2.12.ge.2 {
   1412   db eval {
   1413     SELECT a FROM t1 WHERE r >= 65536 ORDER BY a DESC
   1414   }
   1415 } {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}
   1416 do_test boundary2-2.12.ge.3 {
   1417   db eval {
   1418     SELECT a FROM t1 WHERE r >= 65536 ORDER BY r
   1419   }
   1420 } {62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1421 do_test boundary2-2.12.ge.4 {
   1422   db eval {
   1423     SELECT a FROM t1 WHERE r >= 65536 ORDER BY r DESC
   1424   }
   1425 } {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}
   1426 do_test boundary2-2.12.ge.5 {
   1427   db eval {
   1428     SELECT a FROM t1 WHERE r >= 65536 ORDER BY x
   1429   }
   1430 } {62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1431 do_test boundary2-2.12.lt.1 {
   1432   db eval {
   1433     SELECT a FROM t1 WHERE r < 65536 ORDER BY a
   1434   }
   1435 } {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}
   1436 do_test boundary2-2.12.lt.2 {
   1437   db eval {
   1438     SELECT a FROM t1 WHERE r < 65536 ORDER BY a DESC
   1439   }
   1440 } {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}
   1441 do_test boundary2-2.12.lt.3 {
   1442   db eval {
   1443     SELECT a FROM t1 WHERE r < 65536 ORDER BY r
   1444   }
   1445 } {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}
   1446 do_test boundary2-2.12.lt.4 {
   1447   db eval {
   1448     SELECT a FROM t1 WHERE r < 65536 ORDER BY r DESC
   1449   }
   1450 } {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}
   1451 do_test boundary2-2.12.lt.5 {
   1452   db eval {
   1453     SELECT a FROM t1 WHERE r < 65536 ORDER BY x
   1454   }
   1455 } {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}
   1456 do_test boundary2-2.12.le.1 {
   1457   db eval {
   1458     SELECT a FROM t1 WHERE r <= 65536 ORDER BY a
   1459   }
   1460 } {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}
   1461 do_test boundary2-2.12.le.2 {
   1462   db eval {
   1463     SELECT a FROM t1 WHERE r <= 65536 ORDER BY a DESC
   1464   }
   1465 } {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}
   1466 do_test boundary2-2.12.le.3 {
   1467   db eval {
   1468     SELECT a FROM t1 WHERE r <= 65536 ORDER BY r
   1469   }
   1470 } {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}
   1471 do_test boundary2-2.12.le.4 {
   1472   db eval {
   1473     SELECT a FROM t1 WHERE r <= 65536 ORDER BY r DESC
   1474   }
   1475 } {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}
   1476 do_test boundary2-2.12.le.5 {
   1477   db eval {
   1478     SELECT a FROM t1 WHERE r <= 65536 ORDER BY x
   1479   }
   1480 } {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}
   1481 do_test boundary2-2.13.1 {
   1482   db eval {
   1483     SELECT * FROM t1 WHERE r=268435456
   1484   }
   1485 } {268435456 40 0000000010000000}
   1486 do_test boundary2-2.13.2 {
   1487   db eval {
   1488     SELECT r, a FROM t1 WHERE x='0000000010000000'
   1489   }
   1490 } {268435456 40}
   1491 do_test boundary2-2.13.3 {
   1492   db eval {
   1493     SELECT r, x FROM t1 WHERE a=40
   1494   }
   1495 } {268435456 0000000010000000}
   1496 do_test boundary2-2.13.gt.1 {
   1497   db eval {
   1498     SELECT a FROM t1 WHERE r > 268435456 ORDER BY a
   1499   }
   1500 } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
   1501 do_test boundary2-2.13.gt.2 {
   1502   db eval {
   1503     SELECT a FROM t1 WHERE r > 268435456 ORDER BY a DESC
   1504   }
   1505 } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
   1506 do_test boundary2-2.13.gt.3 {
   1507   db eval {
   1508     SELECT a FROM t1 WHERE r > 268435456 ORDER BY r
   1509   }
   1510 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1511 do_test boundary2-2.13.gt.4 {
   1512   db eval {
   1513     SELECT a FROM t1 WHERE r > 268435456 ORDER BY r DESC
   1514   }
   1515 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20}
   1516 do_test boundary2-2.13.gt.5 {
   1517   db eval {
   1518     SELECT a FROM t1 WHERE r > 268435456 ORDER BY x
   1519   }
   1520 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1521 do_test boundary2-2.13.ge.1 {
   1522   db eval {
   1523     SELECT a FROM t1 WHERE r >= 268435456 ORDER BY a
   1524   }
   1525 } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
   1526 do_test boundary2-2.13.ge.2 {
   1527   db eval {
   1528     SELECT a FROM t1 WHERE r >= 268435456 ORDER BY a DESC
   1529   }
   1530 } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
   1531 do_test boundary2-2.13.ge.3 {
   1532   db eval {
   1533     SELECT a FROM t1 WHERE r >= 268435456 ORDER BY r
   1534   }
   1535 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1536 do_test boundary2-2.13.ge.4 {
   1537   db eval {
   1538     SELECT a FROM t1 WHERE r >= 268435456 ORDER BY r DESC
   1539   }
   1540 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40}
   1541 do_test boundary2-2.13.ge.5 {
   1542   db eval {
   1543     SELECT a FROM t1 WHERE r >= 268435456 ORDER BY x
   1544   }
   1545 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1546 do_test boundary2-2.13.lt.1 {
   1547   db eval {
   1548     SELECT a FROM t1 WHERE r < 268435456 ORDER BY a
   1549   }
   1550 } {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}
   1551 do_test boundary2-2.13.lt.2 {
   1552   db eval {
   1553     SELECT a FROM t1 WHERE r < 268435456 ORDER BY a DESC
   1554   }
   1555 } {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}
   1556 do_test boundary2-2.13.lt.3 {
   1557   db eval {
   1558     SELECT a FROM t1 WHERE r < 268435456 ORDER BY r
   1559   }
   1560 } {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}
   1561 do_test boundary2-2.13.lt.4 {
   1562   db eval {
   1563     SELECT a FROM t1 WHERE r < 268435456 ORDER BY r DESC
   1564   }
   1565 } {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}
   1566 do_test boundary2-2.13.lt.5 {
   1567   db eval {
   1568     SELECT a FROM t1 WHERE r < 268435456 ORDER BY x
   1569   }
   1570 } {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}
   1571 do_test boundary2-2.13.le.1 {
   1572   db eval {
   1573     SELECT a FROM t1 WHERE r <= 268435456 ORDER BY a
   1574   }
   1575 } {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}
   1576 do_test boundary2-2.13.le.2 {
   1577   db eval {
   1578     SELECT a FROM t1 WHERE r <= 268435456 ORDER BY a DESC
   1579   }
   1580 } {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}
   1581 do_test boundary2-2.13.le.3 {
   1582   db eval {
   1583     SELECT a FROM t1 WHERE r <= 268435456 ORDER BY r
   1584   }
   1585 } {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}
   1586 do_test boundary2-2.13.le.4 {
   1587   db eval {
   1588     SELECT a FROM t1 WHERE r <= 268435456 ORDER BY r DESC
   1589   }
   1590 } {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}
   1591 do_test boundary2-2.13.le.5 {
   1592   db eval {
   1593     SELECT a FROM t1 WHERE r <= 268435456 ORDER BY x
   1594   }
   1595 } {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}
   1596 do_test boundary2-2.14.1 {
   1597   db eval {
   1598     SELECT * FROM t1 WHERE r=-140737488355328
   1599   }
   1600 } {-140737488355328 44 ffff800000000000}
   1601 do_test boundary2-2.14.2 {
   1602   db eval {
   1603     SELECT r, a FROM t1 WHERE x='ffff800000000000'
   1604   }
   1605 } {-140737488355328 44}
   1606 do_test boundary2-2.14.3 {
   1607   db eval {
   1608     SELECT r, x FROM t1 WHERE a=44
   1609   }
   1610 } {-140737488355328 ffff800000000000}
   1611 do_test boundary2-2.14.gt.1 {
   1612   db eval {
   1613     SELECT a FROM t1 WHERE r > -140737488355328 ORDER BY a
   1614   }
   1615 } {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}
   1616 do_test boundary2-2.14.gt.2 {
   1617   db eval {
   1618     SELECT a FROM t1 WHERE r > -140737488355328 ORDER BY a DESC
   1619   }
   1620 } {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}
   1621 do_test boundary2-2.14.gt.3 {
   1622   db eval {
   1623     SELECT a FROM t1 WHERE r > -140737488355328 ORDER BY r
   1624   }
   1625 } {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}
   1626 do_test boundary2-2.14.gt.4 {
   1627   db eval {
   1628     SELECT a FROM t1 WHERE r > -140737488355328 ORDER BY r DESC
   1629   }
   1630 } {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}
   1631 do_test boundary2-2.14.gt.5 {
   1632   db eval {
   1633     SELECT a FROM t1 WHERE r > -140737488355328 ORDER BY x
   1634   }
   1635 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   1636 do_test boundary2-2.14.ge.1 {
   1637   db eval {
   1638     SELECT a FROM t1 WHERE r >= -140737488355328 ORDER BY a
   1639   }
   1640 } {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}
   1641 do_test boundary2-2.14.ge.2 {
   1642   db eval {
   1643     SELECT a FROM t1 WHERE r >= -140737488355328 ORDER BY a DESC
   1644   }
   1645 } {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}
   1646 do_test boundary2-2.14.ge.3 {
   1647   db eval {
   1648     SELECT a FROM t1 WHERE r >= -140737488355328 ORDER BY r
   1649   }
   1650 } {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}
   1651 do_test boundary2-2.14.ge.4 {
   1652   db eval {
   1653     SELECT a FROM t1 WHERE r >= -140737488355328 ORDER BY r DESC
   1654   }
   1655 } {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}
   1656 do_test boundary2-2.14.ge.5 {
   1657   db eval {
   1658     SELECT a FROM t1 WHERE r >= -140737488355328 ORDER BY x
   1659   }
   1660 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   1661 do_test boundary2-2.14.lt.1 {
   1662   db eval {
   1663     SELECT a FROM t1 WHERE r < -140737488355328 ORDER BY a
   1664   }
   1665 } {2 21 55 64}
   1666 do_test boundary2-2.14.lt.2 {
   1667   db eval {
   1668     SELECT a FROM t1 WHERE r < -140737488355328 ORDER BY a DESC
   1669   }
   1670 } {64 55 21 2}
   1671 do_test boundary2-2.14.lt.3 {
   1672   db eval {
   1673     SELECT a FROM t1 WHERE r < -140737488355328 ORDER BY r
   1674   }
   1675 } {55 2 64 21}
   1676 do_test boundary2-2.14.lt.4 {
   1677   db eval {
   1678     SELECT a FROM t1 WHERE r < -140737488355328 ORDER BY r DESC
   1679   }
   1680 } {21 64 2 55}
   1681 do_test boundary2-2.14.lt.5 {
   1682   db eval {
   1683     SELECT a FROM t1 WHERE r < -140737488355328 ORDER BY x
   1684   }
   1685 } {55 2 64 21}
   1686 do_test boundary2-2.14.le.1 {
   1687   db eval {
   1688     SELECT a FROM t1 WHERE r <= -140737488355328 ORDER BY a
   1689   }
   1690 } {2 21 44 55 64}
   1691 do_test boundary2-2.14.le.2 {
   1692   db eval {
   1693     SELECT a FROM t1 WHERE r <= -140737488355328 ORDER BY a DESC
   1694   }
   1695 } {64 55 44 21 2}
   1696 do_test boundary2-2.14.le.3 {
   1697   db eval {
   1698     SELECT a FROM t1 WHERE r <= -140737488355328 ORDER BY r
   1699   }
   1700 } {55 2 64 21 44}
   1701 do_test boundary2-2.14.le.4 {
   1702   db eval {
   1703     SELECT a FROM t1 WHERE r <= -140737488355328 ORDER BY r DESC
   1704   }
   1705 } {44 21 64 2 55}
   1706 do_test boundary2-2.14.le.5 {
   1707   db eval {
   1708     SELECT a FROM t1 WHERE r <= -140737488355328 ORDER BY x
   1709   }
   1710 } {55 2 64 21 44}
   1711 do_test boundary2-2.15.1 {
   1712   db eval {
   1713     SELECT * FROM t1 WHERE r=1099511627776
   1714   }
   1715 } {1099511627776 19 0000010000000000}
   1716 do_test boundary2-2.15.2 {
   1717   db eval {
   1718     SELECT r, a FROM t1 WHERE x='0000010000000000'
   1719   }
   1720 } {1099511627776 19}
   1721 do_test boundary2-2.15.3 {
   1722   db eval {
   1723     SELECT r, x FROM t1 WHERE a=19
   1724   }
   1725 } {1099511627776 0000010000000000}
   1726 do_test boundary2-2.15.gt.1 {
   1727   db eval {
   1728     SELECT a FROM t1 WHERE r > 1099511627776 ORDER BY a
   1729   }
   1730 } {3 7 10 13 17 25 26 27 28 34 43 45 56}
   1731 do_test boundary2-2.15.gt.2 {
   1732   db eval {
   1733     SELECT a FROM t1 WHERE r > 1099511627776 ORDER BY a DESC
   1734   }
   1735 } {56 45 43 34 28 27 26 25 17 13 10 7 3}
   1736 do_test boundary2-2.15.gt.3 {
   1737   db eval {
   1738     SELECT a FROM t1 WHERE r > 1099511627776 ORDER BY r
   1739   }
   1740 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
   1741 do_test boundary2-2.15.gt.4 {
   1742   db eval {
   1743     SELECT a FROM t1 WHERE r > 1099511627776 ORDER BY r DESC
   1744   }
   1745 } {3 28 17 45 27 43 13 26 10 34 25 56 7}
   1746 do_test boundary2-2.15.gt.5 {
   1747   db eval {
   1748     SELECT a FROM t1 WHERE r > 1099511627776 ORDER BY x
   1749   }
   1750 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
   1751 do_test boundary2-2.15.ge.1 {
   1752   db eval {
   1753     SELECT a FROM t1 WHERE r >= 1099511627776 ORDER BY a
   1754   }
   1755 } {3 7 10 13 17 19 25 26 27 28 34 43 45 56}
   1756 do_test boundary2-2.15.ge.2 {
   1757   db eval {
   1758     SELECT a FROM t1 WHERE r >= 1099511627776 ORDER BY a DESC
   1759   }
   1760 } {56 45 43 34 28 27 26 25 19 17 13 10 7 3}
   1761 do_test boundary2-2.15.ge.3 {
   1762   db eval {
   1763     SELECT a FROM t1 WHERE r >= 1099511627776 ORDER BY r
   1764   }
   1765 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1766 do_test boundary2-2.15.ge.4 {
   1767   db eval {
   1768     SELECT a FROM t1 WHERE r >= 1099511627776 ORDER BY r DESC
   1769   }
   1770 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19}
   1771 do_test boundary2-2.15.ge.5 {
   1772   db eval {
   1773     SELECT a FROM t1 WHERE r >= 1099511627776 ORDER BY x
   1774   }
   1775 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1776 do_test boundary2-2.15.lt.1 {
   1777   db eval {
   1778     SELECT a FROM t1 WHERE r < 1099511627776 ORDER BY a
   1779   }
   1780 } {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}
   1781 do_test boundary2-2.15.lt.2 {
   1782   db eval {
   1783     SELECT a FROM t1 WHERE r < 1099511627776 ORDER BY a DESC
   1784   }
   1785 } {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}
   1786 do_test boundary2-2.15.lt.3 {
   1787   db eval {
   1788     SELECT a FROM t1 WHERE r < 1099511627776 ORDER BY r
   1789   }
   1790 } {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}
   1791 do_test boundary2-2.15.lt.4 {
   1792   db eval {
   1793     SELECT a FROM t1 WHERE r < 1099511627776 ORDER BY r DESC
   1794   }
   1795 } {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}
   1796 do_test boundary2-2.15.lt.5 {
   1797   db eval {
   1798     SELECT a FROM t1 WHERE r < 1099511627776 ORDER BY x
   1799   }
   1800 } {59 60 41 5 31 4 49 30 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}
   1801 do_test boundary2-2.15.le.1 {
   1802   db eval {
   1803     SELECT a FROM t1 WHERE r <= 1099511627776 ORDER BY a
   1804   }
   1805 } {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}
   1806 do_test boundary2-2.15.le.2 {
   1807   db eval {
   1808     SELECT a FROM t1 WHERE r <= 1099511627776 ORDER BY a DESC
   1809   }
   1810 } {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}
   1811 do_test boundary2-2.15.le.3 {
   1812   db eval {
   1813     SELECT a FROM t1 WHERE r <= 1099511627776 ORDER BY r
   1814   }
   1815 } {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}
   1816 do_test boundary2-2.15.le.4 {
   1817   db eval {
   1818     SELECT a FROM t1 WHERE r <= 1099511627776 ORDER BY r DESC
   1819   }
   1820 } {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}
   1821 do_test boundary2-2.15.le.5 {
   1822   db eval {
   1823     SELECT a FROM t1 WHERE r <= 1099511627776 ORDER BY x
   1824   }
   1825 } {59 60 41 5 31 4 49 30 61 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}
   1826 do_test boundary2-2.16.gt.1 {
   1827   db eval {
   1828     SELECT a FROM t1 WHERE r > 9223372036854775807 ORDER BY a
   1829   }
   1830 } {}
   1831 do_test boundary2-2.16.gt.2 {
   1832   db eval {
   1833     SELECT a FROM t1 WHERE r > 9223372036854775807 ORDER BY a DESC
   1834   }
   1835 } {}
   1836 do_test boundary2-2.16.gt.3 {
   1837   db eval {
   1838     SELECT a FROM t1 WHERE r > 9223372036854775807 ORDER BY r
   1839   }
   1840 } {}
   1841 do_test boundary2-2.16.gt.4 {
   1842   db eval {
   1843     SELECT a FROM t1 WHERE r > 9223372036854775807 ORDER BY r DESC
   1844   }
   1845 } {}
   1846 do_test boundary2-2.16.gt.5 {
   1847   db eval {
   1848     SELECT a FROM t1 WHERE r > 9223372036854775807 ORDER BY x
   1849   }
   1850 } {}
   1851 do_test boundary2-2.16.ge.1 {
   1852   db eval {
   1853     SELECT a FROM t1 WHERE r >= 9223372036854775807 ORDER BY a
   1854   }
   1855 } {3}
   1856 do_test boundary2-2.16.ge.2 {
   1857   db eval {
   1858     SELECT a FROM t1 WHERE r >= 9223372036854775807 ORDER BY a DESC
   1859   }
   1860 } {3}
   1861 do_test boundary2-2.16.ge.3 {
   1862   db eval {
   1863     SELECT a FROM t1 WHERE r >= 9223372036854775807 ORDER BY r
   1864   }
   1865 } {3}
   1866 do_test boundary2-2.16.ge.4 {
   1867   db eval {
   1868     SELECT a FROM t1 WHERE r >= 9223372036854775807 ORDER BY r DESC
   1869   }
   1870 } {3}
   1871 do_test boundary2-2.16.ge.5 {
   1872   db eval {
   1873     SELECT a FROM t1 WHERE r >= 9223372036854775807 ORDER BY x
   1874   }
   1875 } {3}
   1876 do_test boundary2-2.16.lt.1 {
   1877   db eval {
   1878     SELECT a FROM t1 WHERE r < 9223372036854775807 ORDER BY a
   1879   }
   1880 } {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}
   1881 do_test boundary2-2.16.lt.2 {
   1882   db eval {
   1883     SELECT a FROM t1 WHERE r < 9223372036854775807 ORDER BY a DESC
   1884   }
   1885 } {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}
   1886 do_test boundary2-2.16.lt.3 {
   1887   db eval {
   1888     SELECT a FROM t1 WHERE r < 9223372036854775807 ORDER BY r
   1889   }
   1890 } {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}
   1891 do_test boundary2-2.16.lt.4 {
   1892   db eval {
   1893     SELECT a FROM t1 WHERE r < 9223372036854775807 ORDER BY r DESC
   1894   }
   1895 } {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}
   1896 do_test boundary2-2.16.lt.5 {
   1897   db eval {
   1898     SELECT a FROM t1 WHERE r < 9223372036854775807 ORDER BY x
   1899   }
   1900 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 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}
   1901 do_test boundary2-2.16.le.1 {
   1902   db eval {
   1903     SELECT a FROM t1 WHERE r <= 9223372036854775807 ORDER BY a
   1904   }
   1905 } {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}
   1906 do_test boundary2-2.16.le.2 {
   1907   db eval {
   1908     SELECT a FROM t1 WHERE r <= 9223372036854775807 ORDER BY a DESC
   1909   }
   1910 } {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}
   1911 do_test boundary2-2.16.le.3 {
   1912   db eval {
   1913     SELECT a FROM t1 WHERE r <= 9223372036854775807 ORDER BY r
   1914   }
   1915 } {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}
   1916 do_test boundary2-2.16.le.4 {
   1917   db eval {
   1918     SELECT a FROM t1 WHERE r <= 9223372036854775807 ORDER BY r DESC
   1919   }
   1920 } {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}
   1921 do_test boundary2-2.16.le.5 {
   1922   db eval {
   1923     SELECT a FROM t1 WHERE r <= 9223372036854775807 ORDER BY x
   1924   }
   1925 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   1926 do_test boundary2-2.17.1 {
   1927   db eval {
   1928     SELECT * FROM t1 WHERE r=32768
   1929   }
   1930 } {32768 50 0000000000008000}
   1931 do_test boundary2-2.17.2 {
   1932   db eval {
   1933     SELECT r, a FROM t1 WHERE x='0000000000008000'
   1934   }
   1935 } {32768 50}
   1936 do_test boundary2-2.17.3 {
   1937   db eval {
   1938     SELECT r, x FROM t1 WHERE a=50
   1939   }
   1940 } {32768 0000000000008000}
   1941 do_test boundary2-2.17.gt.1 {
   1942   db eval {
   1943     SELECT a FROM t1 WHERE r > 32768 ORDER BY a
   1944   }
   1945 } {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}
   1946 do_test boundary2-2.17.gt.2 {
   1947   db eval {
   1948     SELECT a FROM t1 WHERE r > 32768 ORDER BY a DESC
   1949   }
   1950 } {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}
   1951 do_test boundary2-2.17.gt.3 {
   1952   db eval {
   1953     SELECT a FROM t1 WHERE r > 32768 ORDER BY r
   1954   }
   1955 } {48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1956 do_test boundary2-2.17.gt.4 {
   1957   db eval {
   1958     SELECT a FROM t1 WHERE r > 32768 ORDER BY r DESC
   1959   }
   1960 } {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}
   1961 do_test boundary2-2.17.gt.5 {
   1962   db eval {
   1963     SELECT a FROM t1 WHERE r > 32768 ORDER BY x
   1964   }
   1965 } {48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1966 do_test boundary2-2.17.ge.1 {
   1967   db eval {
   1968     SELECT a FROM t1 WHERE r >= 32768 ORDER BY a
   1969   }
   1970 } {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}
   1971 do_test boundary2-2.17.ge.2 {
   1972   db eval {
   1973     SELECT a FROM t1 WHERE r >= 32768 ORDER BY a DESC
   1974   }
   1975 } {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}
   1976 do_test boundary2-2.17.ge.3 {
   1977   db eval {
   1978     SELECT a FROM t1 WHERE r >= 32768 ORDER BY r
   1979   }
   1980 } {50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1981 do_test boundary2-2.17.ge.4 {
   1982   db eval {
   1983     SELECT a FROM t1 WHERE r >= 32768 ORDER BY r DESC
   1984   }
   1985 } {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}
   1986 do_test boundary2-2.17.ge.5 {
   1987   db eval {
   1988     SELECT a FROM t1 WHERE r >= 32768 ORDER BY x
   1989   }
   1990 } {50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   1991 do_test boundary2-2.17.lt.1 {
   1992   db eval {
   1993     SELECT a FROM t1 WHERE r < 32768 ORDER BY a
   1994   }
   1995 } {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}
   1996 do_test boundary2-2.17.lt.2 {
   1997   db eval {
   1998     SELECT a FROM t1 WHERE r < 32768 ORDER BY a DESC
   1999   }
   2000 } {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}
   2001 do_test boundary2-2.17.lt.3 {
   2002   db eval {
   2003     SELECT a FROM t1 WHERE r < 32768 ORDER BY r
   2004   }
   2005 } {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}
   2006 do_test boundary2-2.17.lt.4 {
   2007   db eval {
   2008     SELECT a FROM t1 WHERE r < 32768 ORDER BY r DESC
   2009   }
   2010 } {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}
   2011 do_test boundary2-2.17.lt.5 {
   2012   db eval {
   2013     SELECT a FROM t1 WHERE r < 32768 ORDER BY x
   2014   }
   2015 } {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}
   2016 do_test boundary2-2.17.le.1 {
   2017   db eval {
   2018     SELECT a FROM t1 WHERE r <= 32768 ORDER BY a
   2019   }
   2020 } {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}
   2021 do_test boundary2-2.17.le.2 {
   2022   db eval {
   2023     SELECT a FROM t1 WHERE r <= 32768 ORDER BY a DESC
   2024   }
   2025 } {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}
   2026 do_test boundary2-2.17.le.3 {
   2027   db eval {
   2028     SELECT a FROM t1 WHERE r <= 32768 ORDER BY r
   2029   }
   2030 } {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}
   2031 do_test boundary2-2.17.le.4 {
   2032   db eval {
   2033     SELECT a FROM t1 WHERE r <= 32768 ORDER BY r DESC
   2034   }
   2035 } {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}
   2036 do_test boundary2-2.17.le.5 {
   2037   db eval {
   2038     SELECT a FROM t1 WHERE r <= 32768 ORDER BY x
   2039   }
   2040 } {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}
   2041 do_test boundary2-2.18.1 {
   2042   db eval {
   2043     SELECT * FROM t1 WHERE r=-36028797018963968
   2044   }
   2045 } {-36028797018963968 64 ff80000000000000}
   2046 do_test boundary2-2.18.2 {
   2047   db eval {
   2048     SELECT r, a FROM t1 WHERE x='ff80000000000000'
   2049   }
   2050 } {-36028797018963968 64}
   2051 do_test boundary2-2.18.3 {
   2052   db eval {
   2053     SELECT r, x FROM t1 WHERE a=64
   2054   }
   2055 } {-36028797018963968 ff80000000000000}
   2056 do_test boundary2-2.18.gt.1 {
   2057   db eval {
   2058     SELECT a FROM t1 WHERE r > -36028797018963968 ORDER BY a
   2059   }
   2060 } {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}
   2061 do_test boundary2-2.18.gt.2 {
   2062   db eval {
   2063     SELECT a FROM t1 WHERE r > -36028797018963968 ORDER BY a DESC
   2064   }
   2065 } {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}
   2066 do_test boundary2-2.18.gt.3 {
   2067   db eval {
   2068     SELECT a FROM t1 WHERE r > -36028797018963968 ORDER BY r
   2069   }
   2070 } {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}
   2071 do_test boundary2-2.18.gt.4 {
   2072   db eval {
   2073     SELECT a FROM t1 WHERE r > -36028797018963968 ORDER BY r DESC
   2074   }
   2075 } {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}
   2076 do_test boundary2-2.18.gt.5 {
   2077   db eval {
   2078     SELECT a FROM t1 WHERE r > -36028797018963968 ORDER BY x
   2079   }
   2080 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   2081 do_test boundary2-2.18.ge.1 {
   2082   db eval {
   2083     SELECT a FROM t1 WHERE r >= -36028797018963968 ORDER BY a
   2084   }
   2085 } {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}
   2086 do_test boundary2-2.18.ge.2 {
   2087   db eval {
   2088     SELECT a FROM t1 WHERE r >= -36028797018963968 ORDER BY a DESC
   2089   }
   2090 } {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}
   2091 do_test boundary2-2.18.ge.3 {
   2092   db eval {
   2093     SELECT a FROM t1 WHERE r >= -36028797018963968 ORDER BY r
   2094   }
   2095 } {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}
   2096 do_test boundary2-2.18.ge.4 {
   2097   db eval {
   2098     SELECT a FROM t1 WHERE r >= -36028797018963968 ORDER BY r DESC
   2099   }
   2100 } {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}
   2101 do_test boundary2-2.18.ge.5 {
   2102   db eval {
   2103     SELECT a FROM t1 WHERE r >= -36028797018963968 ORDER BY x
   2104   }
   2105 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   2106 do_test boundary2-2.18.lt.1 {
   2107   db eval {
   2108     SELECT a FROM t1 WHERE r < -36028797018963968 ORDER BY a
   2109   }
   2110 } {2 55}
   2111 do_test boundary2-2.18.lt.2 {
   2112   db eval {
   2113     SELECT a FROM t1 WHERE r < -36028797018963968 ORDER BY a DESC
   2114   }
   2115 } {55 2}
   2116 do_test boundary2-2.18.lt.3 {
   2117   db eval {
   2118     SELECT a FROM t1 WHERE r < -36028797018963968 ORDER BY r
   2119   }
   2120 } {55 2}
   2121 do_test boundary2-2.18.lt.4 {
   2122   db eval {
   2123     SELECT a FROM t1 WHERE r < -36028797018963968 ORDER BY r DESC
   2124   }
   2125 } {2 55}
   2126 do_test boundary2-2.18.lt.5 {
   2127   db eval {
   2128     SELECT a FROM t1 WHERE r < -36028797018963968 ORDER BY x
   2129   }
   2130 } {55 2}
   2131 do_test boundary2-2.18.le.1 {
   2132   db eval {
   2133     SELECT a FROM t1 WHERE r <= -36028797018963968 ORDER BY a
   2134   }
   2135 } {2 55 64}
   2136 do_test boundary2-2.18.le.2 {
   2137   db eval {
   2138     SELECT a FROM t1 WHERE r <= -36028797018963968 ORDER BY a DESC
   2139   }
   2140 } {64 55 2}
   2141 do_test boundary2-2.18.le.3 {
   2142   db eval {
   2143     SELECT a FROM t1 WHERE r <= -36028797018963968 ORDER BY r
   2144   }
   2145 } {55 2 64}
   2146 do_test boundary2-2.18.le.4 {
   2147   db eval {
   2148     SELECT a FROM t1 WHERE r <= -36028797018963968 ORDER BY r DESC
   2149   }
   2150 } {64 2 55}
   2151 do_test boundary2-2.18.le.5 {
   2152   db eval {
   2153     SELECT a FROM t1 WHERE r <= -36028797018963968 ORDER BY x
   2154   }
   2155 } {55 2 64}
   2156 do_test boundary2-2.19.1 {
   2157   db eval {
   2158     SELECT * FROM t1 WHERE r=65535
   2159   }
   2160 } {65535 48 000000000000ffff}
   2161 do_test boundary2-2.19.2 {
   2162   db eval {
   2163     SELECT r, a FROM t1 WHERE x='000000000000ffff'
   2164   }
   2165 } {65535 48}
   2166 do_test boundary2-2.19.3 {
   2167   db eval {
   2168     SELECT r, x FROM t1 WHERE a=48
   2169   }
   2170 } {65535 000000000000ffff}
   2171 do_test boundary2-2.19.gt.1 {
   2172   db eval {
   2173     SELECT a FROM t1 WHERE r > 65535 ORDER BY a
   2174   }
   2175 } {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}
   2176 do_test boundary2-2.19.gt.2 {
   2177   db eval {
   2178     SELECT a FROM t1 WHERE r > 65535 ORDER BY a DESC
   2179   }
   2180 } {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}
   2181 do_test boundary2-2.19.gt.3 {
   2182   db eval {
   2183     SELECT a FROM t1 WHERE r > 65535 ORDER BY r
   2184   }
   2185 } {62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2186 do_test boundary2-2.19.gt.4 {
   2187   db eval {
   2188     SELECT a FROM t1 WHERE r > 65535 ORDER BY r DESC
   2189   }
   2190 } {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}
   2191 do_test boundary2-2.19.gt.5 {
   2192   db eval {
   2193     SELECT a FROM t1 WHERE r > 65535 ORDER BY x
   2194   }
   2195 } {62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2196 do_test boundary2-2.19.ge.1 {
   2197   db eval {
   2198     SELECT a FROM t1 WHERE r >= 65535 ORDER BY a
   2199   }
   2200 } {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}
   2201 do_test boundary2-2.19.ge.2 {
   2202   db eval {
   2203     SELECT a FROM t1 WHERE r >= 65535 ORDER BY a DESC
   2204   }
   2205 } {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}
   2206 do_test boundary2-2.19.ge.3 {
   2207   db eval {
   2208     SELECT a FROM t1 WHERE r >= 65535 ORDER BY r
   2209   }
   2210 } {48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2211 do_test boundary2-2.19.ge.4 {
   2212   db eval {
   2213     SELECT a FROM t1 WHERE r >= 65535 ORDER BY r DESC
   2214   }
   2215 } {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}
   2216 do_test boundary2-2.19.ge.5 {
   2217   db eval {
   2218     SELECT a FROM t1 WHERE r >= 65535 ORDER BY x
   2219   }
   2220 } {48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2221 do_test boundary2-2.19.lt.1 {
   2222   db eval {
   2223     SELECT a FROM t1 WHERE r < 65535 ORDER BY a
   2224   }
   2225 } {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}
   2226 do_test boundary2-2.19.lt.2 {
   2227   db eval {
   2228     SELECT a FROM t1 WHERE r < 65535 ORDER BY a DESC
   2229   }
   2230 } {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}
   2231 do_test boundary2-2.19.lt.3 {
   2232   db eval {
   2233     SELECT a FROM t1 WHERE r < 65535 ORDER BY r
   2234   }
   2235 } {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}
   2236 do_test boundary2-2.19.lt.4 {
   2237   db eval {
   2238     SELECT a FROM t1 WHERE r < 65535 ORDER BY r DESC
   2239   }
   2240 } {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}
   2241 do_test boundary2-2.19.lt.5 {
   2242   db eval {
   2243     SELECT a FROM t1 WHERE r < 65535 ORDER BY x
   2244   }
   2245 } {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}
   2246 do_test boundary2-2.19.le.1 {
   2247   db eval {
   2248     SELECT a FROM t1 WHERE r <= 65535 ORDER BY a
   2249   }
   2250 } {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}
   2251 do_test boundary2-2.19.le.2 {
   2252   db eval {
   2253     SELECT a FROM t1 WHERE r <= 65535 ORDER BY a DESC
   2254   }
   2255 } {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}
   2256 do_test boundary2-2.19.le.3 {
   2257   db eval {
   2258     SELECT a FROM t1 WHERE r <= 65535 ORDER BY r
   2259   }
   2260 } {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}
   2261 do_test boundary2-2.19.le.4 {
   2262   db eval {
   2263     SELECT a FROM t1 WHERE r <= 65535 ORDER BY r DESC
   2264   }
   2265 } {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}
   2266 do_test boundary2-2.19.le.5 {
   2267   db eval {
   2268     SELECT a FROM t1 WHERE r <= 65535 ORDER BY x
   2269   }
   2270 } {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}
   2271 do_test boundary2-2.20.1 {
   2272   db eval {
   2273     SELECT * FROM t1 WHERE r=4294967295
   2274   }
   2275 } {4294967295 14 00000000ffffffff}
   2276 do_test boundary2-2.20.2 {
   2277   db eval {
   2278     SELECT r, a FROM t1 WHERE x='00000000ffffffff'
   2279   }
   2280 } {4294967295 14}
   2281 do_test boundary2-2.20.3 {
   2282   db eval {
   2283     SELECT r, x FROM t1 WHERE a=14
   2284   }
   2285 } {4294967295 00000000ffffffff}
   2286 do_test boundary2-2.20.gt.1 {
   2287   db eval {
   2288     SELECT a FROM t1 WHERE r > 4294967295 ORDER BY a
   2289   }
   2290 } {3 7 10 13 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
   2291 do_test boundary2-2.20.gt.2 {
   2292   db eval {
   2293     SELECT a FROM t1 WHERE r > 4294967295 ORDER BY a DESC
   2294   }
   2295 } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 13 10 7 3}
   2296 do_test boundary2-2.20.gt.3 {
   2297   db eval {
   2298     SELECT a FROM t1 WHERE r > 4294967295 ORDER BY r
   2299   }
   2300 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2301 do_test boundary2-2.20.gt.4 {
   2302   db eval {
   2303     SELECT a FROM t1 WHERE r > 4294967295 ORDER BY r DESC
   2304   }
   2305 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36}
   2306 do_test boundary2-2.20.gt.5 {
   2307   db eval {
   2308     SELECT a FROM t1 WHERE r > 4294967295 ORDER BY x
   2309   }
   2310 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2311 do_test boundary2-2.20.ge.1 {
   2312   db eval {
   2313     SELECT a FROM t1 WHERE r >= 4294967295 ORDER BY a
   2314   }
   2315 } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
   2316 do_test boundary2-2.20.ge.2 {
   2317   db eval {
   2318     SELECT a FROM t1 WHERE r >= 4294967295 ORDER BY a DESC
   2319   }
   2320 } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
   2321 do_test boundary2-2.20.ge.3 {
   2322   db eval {
   2323     SELECT a FROM t1 WHERE r >= 4294967295 ORDER BY r
   2324   }
   2325 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2326 do_test boundary2-2.20.ge.4 {
   2327   db eval {
   2328     SELECT a FROM t1 WHERE r >= 4294967295 ORDER BY r DESC
   2329   }
   2330 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14}
   2331 do_test boundary2-2.20.ge.5 {
   2332   db eval {
   2333     SELECT a FROM t1 WHERE r >= 4294967295 ORDER BY x
   2334   }
   2335 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2336 do_test boundary2-2.20.lt.1 {
   2337   db eval {
   2338     SELECT a FROM t1 WHERE r < 4294967295 ORDER BY a
   2339   }
   2340 } {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}
   2341 do_test boundary2-2.20.lt.2 {
   2342   db eval {
   2343     SELECT a FROM t1 WHERE r < 4294967295 ORDER BY a DESC
   2344   }
   2345 } {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}
   2346 do_test boundary2-2.20.lt.3 {
   2347   db eval {
   2348     SELECT a FROM t1 WHERE r < 4294967295 ORDER BY r
   2349   }
   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 15 42 18 24 9 6 12 40 20 51}
   2351 do_test boundary2-2.20.lt.4 {
   2352   db eval {
   2353     SELECT a FROM t1 WHERE r < 4294967295 ORDER BY r DESC
   2354   }
   2355 } {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}
   2356 do_test boundary2-2.20.lt.5 {
   2357   db eval {
   2358     SELECT a FROM t1 WHERE r < 4294967295 ORDER BY x
   2359   }
   2360 } {59 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}
   2361 do_test boundary2-2.20.le.1 {
   2362   db eval {
   2363     SELECT a FROM t1 WHERE r <= 4294967295 ORDER BY a
   2364   }
   2365 } {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}
   2366 do_test boundary2-2.20.le.2 {
   2367   db eval {
   2368     SELECT a FROM t1 WHERE r <= 4294967295 ORDER BY a DESC
   2369   }
   2370 } {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}
   2371 do_test boundary2-2.20.le.3 {
   2372   db eval {
   2373     SELECT a FROM t1 WHERE r <= 4294967295 ORDER BY r
   2374   }
   2375 } {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}
   2376 do_test boundary2-2.20.le.4 {
   2377   db eval {
   2378     SELECT a FROM t1 WHERE r <= 4294967295 ORDER BY r DESC
   2379   }
   2380 } {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}
   2381 do_test boundary2-2.20.le.5 {
   2382   db eval {
   2383     SELECT a FROM t1 WHERE r <= 4294967295 ORDER BY x
   2384   }
   2385 } {59 60 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}
   2386 do_test boundary2-2.21.1 {
   2387   db eval {
   2388     SELECT * FROM t1 WHERE r=1099511627775
   2389   }
   2390 } {1099511627775 57 000000ffffffffff}
   2391 do_test boundary2-2.21.2 {
   2392   db eval {
   2393     SELECT r, a FROM t1 WHERE x='000000ffffffffff'
   2394   }
   2395 } {1099511627775 57}
   2396 do_test boundary2-2.21.3 {
   2397   db eval {
   2398     SELECT r, x FROM t1 WHERE a=57
   2399   }
   2400 } {1099511627775 000000ffffffffff}
   2401 do_test boundary2-2.21.gt.1 {
   2402   db eval {
   2403     SELECT a FROM t1 WHERE r > 1099511627775 ORDER BY a
   2404   }
   2405 } {3 7 10 13 17 19 25 26 27 28 34 43 45 56}
   2406 do_test boundary2-2.21.gt.2 {
   2407   db eval {
   2408     SELECT a FROM t1 WHERE r > 1099511627775 ORDER BY a DESC
   2409   }
   2410 } {56 45 43 34 28 27 26 25 19 17 13 10 7 3}
   2411 do_test boundary2-2.21.gt.3 {
   2412   db eval {
   2413     SELECT a FROM t1 WHERE r > 1099511627775 ORDER BY r
   2414   }
   2415 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2416 do_test boundary2-2.21.gt.4 {
   2417   db eval {
   2418     SELECT a FROM t1 WHERE r > 1099511627775 ORDER BY r DESC
   2419   }
   2420 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19}
   2421 do_test boundary2-2.21.gt.5 {
   2422   db eval {
   2423     SELECT a FROM t1 WHERE r > 1099511627775 ORDER BY x
   2424   }
   2425 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2426 do_test boundary2-2.21.ge.1 {
   2427   db eval {
   2428     SELECT a FROM t1 WHERE r >= 1099511627775 ORDER BY a
   2429   }
   2430 } {3 7 10 13 17 19 25 26 27 28 34 43 45 56 57}
   2431 do_test boundary2-2.21.ge.2 {
   2432   db eval {
   2433     SELECT a FROM t1 WHERE r >= 1099511627775 ORDER BY a DESC
   2434   }
   2435 } {57 56 45 43 34 28 27 26 25 19 17 13 10 7 3}
   2436 do_test boundary2-2.21.ge.3 {
   2437   db eval {
   2438     SELECT a FROM t1 WHERE r >= 1099511627775 ORDER BY r
   2439   }
   2440 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2441 do_test boundary2-2.21.ge.4 {
   2442   db eval {
   2443     SELECT a FROM t1 WHERE r >= 1099511627775 ORDER BY r DESC
   2444   }
   2445 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57}
   2446 do_test boundary2-2.21.ge.5 {
   2447   db eval {
   2448     SELECT a FROM t1 WHERE r >= 1099511627775 ORDER BY x
   2449   }
   2450 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2451 do_test boundary2-2.21.lt.1 {
   2452   db eval {
   2453     SELECT a FROM t1 WHERE r < 1099511627775 ORDER BY a
   2454   }
   2455 } {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}
   2456 do_test boundary2-2.21.lt.2 {
   2457   db eval {
   2458     SELECT a FROM t1 WHERE r < 1099511627775 ORDER BY a DESC
   2459   }
   2460 } {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}
   2461 do_test boundary2-2.21.lt.3 {
   2462   db eval {
   2463     SELECT a FROM t1 WHERE r < 1099511627775 ORDER BY r
   2464   }
   2465 } {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}
   2466 do_test boundary2-2.21.lt.4 {
   2467   db eval {
   2468     SELECT a FROM t1 WHERE r < 1099511627775 ORDER BY r DESC
   2469   }
   2470 } {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}
   2471 do_test boundary2-2.21.lt.5 {
   2472   db eval {
   2473     SELECT a FROM t1 WHERE r < 1099511627775 ORDER BY x
   2474   }
   2475 } {59 60 41 5 31 4 49 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}
   2476 do_test boundary2-2.21.le.1 {
   2477   db eval {
   2478     SELECT a FROM t1 WHERE r <= 1099511627775 ORDER BY a
   2479   }
   2480 } {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}
   2481 do_test boundary2-2.21.le.2 {
   2482   db eval {
   2483     SELECT a FROM t1 WHERE r <= 1099511627775 ORDER BY a DESC
   2484   }
   2485 } {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}
   2486 do_test boundary2-2.21.le.3 {
   2487   db eval {
   2488     SELECT a FROM t1 WHERE r <= 1099511627775 ORDER BY r
   2489   }
   2490 } {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}
   2491 do_test boundary2-2.21.le.4 {
   2492   db eval {
   2493     SELECT a FROM t1 WHERE r <= 1099511627775 ORDER BY r DESC
   2494   }
   2495 } {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}
   2496 do_test boundary2-2.21.le.5 {
   2497   db eval {
   2498     SELECT a FROM t1 WHERE r <= 1099511627775 ORDER BY x
   2499   }
   2500 } {59 60 41 5 31 4 49 30 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}
   2501 do_test boundary2-2.22.1 {
   2502   db eval {
   2503     SELECT * FROM t1 WHERE r=-8388608
   2504   }
   2505 } {-8388608 37 ffffffffff800000}
   2506 do_test boundary2-2.22.2 {
   2507   db eval {
   2508     SELECT r, a FROM t1 WHERE x='ffffffffff800000'
   2509   }
   2510 } {-8388608 37}
   2511 do_test boundary2-2.22.3 {
   2512   db eval {
   2513     SELECT r, x FROM t1 WHERE a=37
   2514   }
   2515 } {-8388608 ffffffffff800000}
   2516 do_test boundary2-2.22.gt.1 {
   2517   db eval {
   2518     SELECT a FROM t1 WHERE r > -8388608 ORDER BY a
   2519   }
   2520 } {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}
   2521 do_test boundary2-2.22.gt.2 {
   2522   db eval {
   2523     SELECT a FROM t1 WHERE r > -8388608 ORDER BY a DESC
   2524   }
   2525 } {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}
   2526 do_test boundary2-2.22.gt.3 {
   2527   db eval {
   2528     SELECT a FROM t1 WHERE r > -8388608 ORDER BY r
   2529   }
   2530 } {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}
   2531 do_test boundary2-2.22.gt.4 {
   2532   db eval {
   2533     SELECT a FROM t1 WHERE r > -8388608 ORDER BY r DESC
   2534   }
   2535 } {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}
   2536 do_test boundary2-2.22.gt.5 {
   2537   db eval {
   2538     SELECT a FROM t1 WHERE r > -8388608 ORDER BY x
   2539   }
   2540 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   2541 do_test boundary2-2.22.ge.1 {
   2542   db eval {
   2543     SELECT a FROM t1 WHERE r >= -8388608 ORDER BY a
   2544   }
   2545 } {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}
   2546 do_test boundary2-2.22.ge.2 {
   2547   db eval {
   2548     SELECT a FROM t1 WHERE r >= -8388608 ORDER BY a DESC
   2549   }
   2550 } {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}
   2551 do_test boundary2-2.22.ge.3 {
   2552   db eval {
   2553     SELECT a FROM t1 WHERE r >= -8388608 ORDER BY r
   2554   }
   2555 } {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}
   2556 do_test boundary2-2.22.ge.4 {
   2557   db eval {
   2558     SELECT a FROM t1 WHERE r >= -8388608 ORDER BY r DESC
   2559   }
   2560 } {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}
   2561 do_test boundary2-2.22.ge.5 {
   2562   db eval {
   2563     SELECT a FROM t1 WHERE r >= -8388608 ORDER BY x
   2564   }
   2565 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   2566 do_test boundary2-2.22.lt.1 {
   2567   db eval {
   2568     SELECT a FROM t1 WHERE r < -8388608 ORDER BY a
   2569   }
   2570 } {1 2 11 21 44 47 55 58 63 64}
   2571 do_test boundary2-2.22.lt.2 {
   2572   db eval {
   2573     SELECT a FROM t1 WHERE r < -8388608 ORDER BY a DESC
   2574   }
   2575 } {64 63 58 55 47 44 21 11 2 1}
   2576 do_test boundary2-2.22.lt.3 {
   2577   db eval {
   2578     SELECT a FROM t1 WHERE r < -8388608 ORDER BY r
   2579   }
   2580 } {55 2 64 21 44 58 63 47 11 1}
   2581 do_test boundary2-2.22.lt.4 {
   2582   db eval {
   2583     SELECT a FROM t1 WHERE r < -8388608 ORDER BY r DESC
   2584   }
   2585 } {1 11 47 63 58 44 21 64 2 55}
   2586 do_test boundary2-2.22.lt.5 {
   2587   db eval {
   2588     SELECT a FROM t1 WHERE r < -8388608 ORDER BY x
   2589   }
   2590 } {55 2 64 21 44 58 63 47 11 1}
   2591 do_test boundary2-2.22.le.1 {
   2592   db eval {
   2593     SELECT a FROM t1 WHERE r <= -8388608 ORDER BY a
   2594   }
   2595 } {1 2 11 21 37 44 47 55 58 63 64}
   2596 do_test boundary2-2.22.le.2 {
   2597   db eval {
   2598     SELECT a FROM t1 WHERE r <= -8388608 ORDER BY a DESC
   2599   }
   2600 } {64 63 58 55 47 44 37 21 11 2 1}
   2601 do_test boundary2-2.22.le.3 {
   2602   db eval {
   2603     SELECT a FROM t1 WHERE r <= -8388608 ORDER BY r
   2604   }
   2605 } {55 2 64 21 44 58 63 47 11 1 37}
   2606 do_test boundary2-2.22.le.4 {
   2607   db eval {
   2608     SELECT a FROM t1 WHERE r <= -8388608 ORDER BY r DESC
   2609   }
   2610 } {37 1 11 47 63 58 44 21 64 2 55}
   2611 do_test boundary2-2.22.le.5 {
   2612   db eval {
   2613     SELECT a FROM t1 WHERE r <= -8388608 ORDER BY x
   2614   }
   2615 } {55 2 64 21 44 58 63 47 11 1 37}
   2616 do_test boundary2-2.23.1 {
   2617   db eval {
   2618     SELECT * FROM t1 WHERE r=549755813888
   2619   }
   2620 } {549755813888 35 0000008000000000}
   2621 do_test boundary2-2.23.2 {
   2622   db eval {
   2623     SELECT r, a FROM t1 WHERE x='0000008000000000'
   2624   }
   2625 } {549755813888 35}
   2626 do_test boundary2-2.23.3 {
   2627   db eval {
   2628     SELECT r, x FROM t1 WHERE a=35
   2629   }
   2630 } {549755813888 0000008000000000}
   2631 do_test boundary2-2.23.gt.1 {
   2632   db eval {
   2633     SELECT a FROM t1 WHERE r > 549755813888 ORDER BY a
   2634   }
   2635 } {3 7 10 13 17 19 25 26 27 28 34 43 45 56 57}
   2636 do_test boundary2-2.23.gt.2 {
   2637   db eval {
   2638     SELECT a FROM t1 WHERE r > 549755813888 ORDER BY a DESC
   2639   }
   2640 } {57 56 45 43 34 28 27 26 25 19 17 13 10 7 3}
   2641 do_test boundary2-2.23.gt.3 {
   2642   db eval {
   2643     SELECT a FROM t1 WHERE r > 549755813888 ORDER BY r
   2644   }
   2645 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2646 do_test boundary2-2.23.gt.4 {
   2647   db eval {
   2648     SELECT a FROM t1 WHERE r > 549755813888 ORDER BY r DESC
   2649   }
   2650 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57}
   2651 do_test boundary2-2.23.gt.5 {
   2652   db eval {
   2653     SELECT a FROM t1 WHERE r > 549755813888 ORDER BY x
   2654   }
   2655 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2656 do_test boundary2-2.23.ge.1 {
   2657   db eval {
   2658     SELECT a FROM t1 WHERE r >= 549755813888 ORDER BY a
   2659   }
   2660 } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 56 57}
   2661 do_test boundary2-2.23.ge.2 {
   2662   db eval {
   2663     SELECT a FROM t1 WHERE r >= 549755813888 ORDER BY a DESC
   2664   }
   2665 } {57 56 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
   2666 do_test boundary2-2.23.ge.3 {
   2667   db eval {
   2668     SELECT a FROM t1 WHERE r >= 549755813888 ORDER BY r
   2669   }
   2670 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2671 do_test boundary2-2.23.ge.4 {
   2672   db eval {
   2673     SELECT a FROM t1 WHERE r >= 549755813888 ORDER BY r DESC
   2674   }
   2675 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35}
   2676 do_test boundary2-2.23.ge.5 {
   2677   db eval {
   2678     SELECT a FROM t1 WHERE r >= 549755813888 ORDER BY x
   2679   }
   2680 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2681 do_test boundary2-2.23.lt.1 {
   2682   db eval {
   2683     SELECT a FROM t1 WHERE r < 549755813888 ORDER BY a
   2684   }
   2685 } {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}
   2686 do_test boundary2-2.23.lt.2 {
   2687   db eval {
   2688     SELECT a FROM t1 WHERE r < 549755813888 ORDER BY a DESC
   2689   }
   2690 } {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}
   2691 do_test boundary2-2.23.lt.3 {
   2692   db eval {
   2693     SELECT a FROM t1 WHERE r < 549755813888 ORDER BY r
   2694   }
   2695 } {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}
   2696 do_test boundary2-2.23.lt.4 {
   2697   db eval {
   2698     SELECT a FROM t1 WHERE r < 549755813888 ORDER BY r DESC
   2699   }
   2700 } {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}
   2701 do_test boundary2-2.23.lt.5 {
   2702   db eval {
   2703     SELECT a FROM t1 WHERE r < 549755813888 ORDER BY x
   2704   }
   2705 } {59 60 41 5 31 4 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}
   2706 do_test boundary2-2.23.le.1 {
   2707   db eval {
   2708     SELECT a FROM t1 WHERE r <= 549755813888 ORDER BY a
   2709   }
   2710 } {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}
   2711 do_test boundary2-2.23.le.2 {
   2712   db eval {
   2713     SELECT a FROM t1 WHERE r <= 549755813888 ORDER BY a DESC
   2714   }
   2715 } {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}
   2716 do_test boundary2-2.23.le.3 {
   2717   db eval {
   2718     SELECT a FROM t1 WHERE r <= 549755813888 ORDER BY r
   2719   }
   2720 } {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}
   2721 do_test boundary2-2.23.le.4 {
   2722   db eval {
   2723     SELECT a FROM t1 WHERE r <= 549755813888 ORDER BY r DESC
   2724   }
   2725 } {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}
   2726 do_test boundary2-2.23.le.5 {
   2727   db eval {
   2728     SELECT a FROM t1 WHERE r <= 549755813888 ORDER BY x
   2729   }
   2730 } {59 60 41 5 31 4 49 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}
   2731 do_test boundary2-2.24.1 {
   2732   db eval {
   2733     SELECT * FROM t1 WHERE r=8388607
   2734   }
   2735 } {8388607 18 00000000007fffff}
   2736 do_test boundary2-2.24.2 {
   2737   db eval {
   2738     SELECT r, a FROM t1 WHERE x='00000000007fffff'
   2739   }
   2740 } {8388607 18}
   2741 do_test boundary2-2.24.3 {
   2742   db eval {
   2743     SELECT r, x FROM t1 WHERE a=18
   2744   }
   2745 } {8388607 00000000007fffff}
   2746 do_test boundary2-2.24.gt.1 {
   2747   db eval {
   2748     SELECT a FROM t1 WHERE r > 8388607 ORDER BY a
   2749   }
   2750 } {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}
   2751 do_test boundary2-2.24.gt.2 {
   2752   db eval {
   2753     SELECT a FROM t1 WHERE r > 8388607 ORDER BY a DESC
   2754   }
   2755 } {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}
   2756 do_test boundary2-2.24.gt.3 {
   2757   db eval {
   2758     SELECT a FROM t1 WHERE r > 8388607 ORDER BY r
   2759   }
   2760 } {24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2761 do_test boundary2-2.24.gt.4 {
   2762   db eval {
   2763     SELECT a FROM t1 WHERE r > 8388607 ORDER BY r DESC
   2764   }
   2765 } {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}
   2766 do_test boundary2-2.24.gt.5 {
   2767   db eval {
   2768     SELECT a FROM t1 WHERE r > 8388607 ORDER BY x
   2769   }
   2770 } {24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2771 do_test boundary2-2.24.ge.1 {
   2772   db eval {
   2773     SELECT a FROM t1 WHERE r >= 8388607 ORDER BY a
   2774   }
   2775 } {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}
   2776 do_test boundary2-2.24.ge.2 {
   2777   db eval {
   2778     SELECT a FROM t1 WHERE r >= 8388607 ORDER BY a DESC
   2779   }
   2780 } {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}
   2781 do_test boundary2-2.24.ge.3 {
   2782   db eval {
   2783     SELECT a FROM t1 WHERE r >= 8388607 ORDER BY r
   2784   }
   2785 } {18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2786 do_test boundary2-2.24.ge.4 {
   2787   db eval {
   2788     SELECT a FROM t1 WHERE r >= 8388607 ORDER BY r DESC
   2789   }
   2790 } {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}
   2791 do_test boundary2-2.24.ge.5 {
   2792   db eval {
   2793     SELECT a FROM t1 WHERE r >= 8388607 ORDER BY x
   2794   }
   2795 } {18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2796 do_test boundary2-2.24.lt.1 {
   2797   db eval {
   2798     SELECT a FROM t1 WHERE r < 8388607 ORDER BY a
   2799   }
   2800 } {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}
   2801 do_test boundary2-2.24.lt.2 {
   2802   db eval {
   2803     SELECT a FROM t1 WHERE r < 8388607 ORDER BY a DESC
   2804   }
   2805 } {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}
   2806 do_test boundary2-2.24.lt.3 {
   2807   db eval {
   2808     SELECT a FROM t1 WHERE r < 8388607 ORDER BY r
   2809   }
   2810 } {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}
   2811 do_test boundary2-2.24.lt.4 {
   2812   db eval {
   2813     SELECT a FROM t1 WHERE r < 8388607 ORDER BY r DESC
   2814   }
   2815 } {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}
   2816 do_test boundary2-2.24.lt.5 {
   2817   db eval {
   2818     SELECT a FROM t1 WHERE r < 8388607 ORDER BY x
   2819   }
   2820 } {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}
   2821 do_test boundary2-2.24.le.1 {
   2822   db eval {
   2823     SELECT a FROM t1 WHERE r <= 8388607 ORDER BY a
   2824   }
   2825 } {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}
   2826 do_test boundary2-2.24.le.2 {
   2827   db eval {
   2828     SELECT a FROM t1 WHERE r <= 8388607 ORDER BY a DESC
   2829   }
   2830 } {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}
   2831 do_test boundary2-2.24.le.3 {
   2832   db eval {
   2833     SELECT a FROM t1 WHERE r <= 8388607 ORDER BY r
   2834   }
   2835 } {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}
   2836 do_test boundary2-2.24.le.4 {
   2837   db eval {
   2838     SELECT a FROM t1 WHERE r <= 8388607 ORDER BY r DESC
   2839   }
   2840 } {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}
   2841 do_test boundary2-2.24.le.5 {
   2842   db eval {
   2843     SELECT a FROM t1 WHERE r <= 8388607 ORDER BY x
   2844   }
   2845 } {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}
   2846 do_test boundary2-2.25.1 {
   2847   db eval {
   2848     SELECT * FROM t1 WHERE r=-3
   2849   }
   2850 } {-3 52 fffffffffffffffd}
   2851 do_test boundary2-2.25.2 {
   2852   db eval {
   2853     SELECT r, a FROM t1 WHERE x='fffffffffffffffd'
   2854   }
   2855 } {-3 52}
   2856 do_test boundary2-2.25.3 {
   2857   db eval {
   2858     SELECT r, x FROM t1 WHERE a=52
   2859   }
   2860 } {-3 fffffffffffffffd}
   2861 do_test boundary2-2.25.gt.1 {
   2862   db eval {
   2863     SELECT a FROM t1 WHERE r > -3 ORDER BY a
   2864   }
   2865 } {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}
   2866 do_test boundary2-2.25.gt.2 {
   2867   db eval {
   2868     SELECT a FROM t1 WHERE r > -3 ORDER BY a DESC
   2869   }
   2870 } {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}
   2871 do_test boundary2-2.25.gt.3 {
   2872   db eval {
   2873     SELECT a FROM t1 WHERE r > -3 ORDER BY r
   2874   }
   2875 } {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}
   2876 do_test boundary2-2.25.gt.4 {
   2877   db eval {
   2878     SELECT a FROM t1 WHERE r > -3 ORDER BY r DESC
   2879   }
   2880 } {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}
   2881 do_test boundary2-2.25.gt.5 {
   2882   db eval {
   2883     SELECT a FROM t1 WHERE r > -3 ORDER BY x
   2884   }
   2885 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   2886 do_test boundary2-2.25.ge.1 {
   2887   db eval {
   2888     SELECT a FROM t1 WHERE r >= -3 ORDER BY a
   2889   }
   2890 } {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}
   2891 do_test boundary2-2.25.ge.2 {
   2892   db eval {
   2893     SELECT a FROM t1 WHERE r >= -3 ORDER BY a DESC
   2894   }
   2895 } {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}
   2896 do_test boundary2-2.25.ge.3 {
   2897   db eval {
   2898     SELECT a FROM t1 WHERE r >= -3 ORDER BY r
   2899   }
   2900 } {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}
   2901 do_test boundary2-2.25.ge.4 {
   2902   db eval {
   2903     SELECT a FROM t1 WHERE r >= -3 ORDER BY r DESC
   2904   }
   2905 } {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}
   2906 do_test boundary2-2.25.ge.5 {
   2907   db eval {
   2908     SELECT a FROM t1 WHERE r >= -3 ORDER BY x
   2909   }
   2910 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   2911 do_test boundary2-2.25.lt.1 {
   2912   db eval {
   2913     SELECT a FROM t1 WHERE r < -3 ORDER BY a
   2914   }
   2915 } {1 2 11 21 29 32 37 44 47 53 54 55 58 63 64}
   2916 do_test boundary2-2.25.lt.2 {
   2917   db eval {
   2918     SELECT a FROM t1 WHERE r < -3 ORDER BY a DESC
   2919   }
   2920 } {64 63 58 55 54 53 47 44 37 32 29 21 11 2 1}
   2921 do_test boundary2-2.25.lt.3 {
   2922   db eval {
   2923     SELECT a FROM t1 WHERE r < -3 ORDER BY r
   2924   }
   2925 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
   2926 do_test boundary2-2.25.lt.4 {
   2927   db eval {
   2928     SELECT a FROM t1 WHERE r < -3 ORDER BY r DESC
   2929   }
   2930 } {53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   2931 do_test boundary2-2.25.lt.5 {
   2932   db eval {
   2933     SELECT a FROM t1 WHERE r < -3 ORDER BY x
   2934   }
   2935 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
   2936 do_test boundary2-2.25.le.1 {
   2937   db eval {
   2938     SELECT a FROM t1 WHERE r <= -3 ORDER BY a
   2939   }
   2940 } {1 2 11 21 29 32 37 44 47 52 53 54 55 58 63 64}
   2941 do_test boundary2-2.25.le.2 {
   2942   db eval {
   2943     SELECT a FROM t1 WHERE r <= -3 ORDER BY a DESC
   2944   }
   2945 } {64 63 58 55 54 53 52 47 44 37 32 29 21 11 2 1}
   2946 do_test boundary2-2.25.le.3 {
   2947   db eval {
   2948     SELECT a FROM t1 WHERE r <= -3 ORDER BY r
   2949   }
   2950 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
   2951 do_test boundary2-2.25.le.4 {
   2952   db eval {
   2953     SELECT a FROM t1 WHERE r <= -3 ORDER BY r DESC
   2954   }
   2955 } {52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   2956 do_test boundary2-2.25.le.5 {
   2957   db eval {
   2958     SELECT a FROM t1 WHERE r <= -3 ORDER BY x
   2959   }
   2960 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
   2961 do_test boundary2-2.26.1 {
   2962   db eval {
   2963     SELECT * FROM t1 WHERE r=0
   2964   }
   2965 } {0 59 0000000000000000}
   2966 do_test boundary2-2.26.2 {
   2967   db eval {
   2968     SELECT r, a FROM t1 WHERE x='0000000000000000'
   2969   }
   2970 } {0 59}
   2971 do_test boundary2-2.26.3 {
   2972   db eval {
   2973     SELECT r, x FROM t1 WHERE a=59
   2974   }
   2975 } {0 0000000000000000}
   2976 do_test boundary2-2.26.gt.1 {
   2977   db eval {
   2978     SELECT a FROM t1 WHERE r > 0 ORDER BY a
   2979   }
   2980 } {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}
   2981 do_test boundary2-2.26.gt.2 {
   2982   db eval {
   2983     SELECT a FROM t1 WHERE r > 0 ORDER BY a DESC
   2984   }
   2985 } {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}
   2986 do_test boundary2-2.26.gt.3 {
   2987   db eval {
   2988     SELECT a FROM t1 WHERE r > 0 ORDER BY r
   2989   }
   2990 } {60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   2991 do_test boundary2-2.26.gt.4 {
   2992   db eval {
   2993     SELECT a FROM t1 WHERE r > 0 ORDER BY r DESC
   2994   }
   2995 } {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}
   2996 do_test boundary2-2.26.gt.5 {
   2997   db eval {
   2998     SELECT a FROM t1 WHERE r > 0 ORDER BY x
   2999   }
   3000 } {60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3001 do_test boundary2-2.26.ge.1 {
   3002   db eval {
   3003     SELECT a FROM t1 WHERE r >= 0 ORDER BY a
   3004   }
   3005 } {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}
   3006 do_test boundary2-2.26.ge.2 {
   3007   db eval {
   3008     SELECT a FROM t1 WHERE r >= 0 ORDER BY a DESC
   3009   }
   3010 } {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}
   3011 do_test boundary2-2.26.ge.3 {
   3012   db eval {
   3013     SELECT a FROM t1 WHERE r >= 0 ORDER BY r
   3014   }
   3015 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3016 do_test boundary2-2.26.ge.4 {
   3017   db eval {
   3018     SELECT a FROM t1 WHERE r >= 0 ORDER BY r DESC
   3019   }
   3020 } {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}
   3021 do_test boundary2-2.26.ge.5 {
   3022   db eval {
   3023     SELECT a FROM t1 WHERE r >= 0 ORDER BY x
   3024   }
   3025 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3026 do_test boundary2-2.26.lt.1 {
   3027   db eval {
   3028     SELECT a FROM t1 WHERE r < 0 ORDER BY a
   3029   }
   3030 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 63 64}
   3031 do_test boundary2-2.26.lt.2 {
   3032   db eval {
   3033     SELECT a FROM t1 WHERE r < 0 ORDER BY a DESC
   3034   }
   3035 } {64 63 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
   3036 do_test boundary2-2.26.lt.3 {
   3037   db eval {
   3038     SELECT a FROM t1 WHERE r < 0 ORDER BY r
   3039   }
   3040 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   3041 do_test boundary2-2.26.lt.4 {
   3042   db eval {
   3043     SELECT a FROM t1 WHERE r < 0 ORDER BY r DESC
   3044   }
   3045 } {38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   3046 do_test boundary2-2.26.lt.5 {
   3047   db eval {
   3048     SELECT a FROM t1 WHERE r < 0 ORDER BY x
   3049   }
   3050 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   3051 do_test boundary2-2.26.le.1 {
   3052   db eval {
   3053     SELECT a FROM t1 WHERE r <= 0 ORDER BY a
   3054   }
   3055 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 63 64}
   3056 do_test boundary2-2.26.le.2 {
   3057   db eval {
   3058     SELECT a FROM t1 WHERE r <= 0 ORDER BY a DESC
   3059   }
   3060 } {64 63 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
   3061 do_test boundary2-2.26.le.3 {
   3062   db eval {
   3063     SELECT a FROM t1 WHERE r <= 0 ORDER BY r
   3064   }
   3065 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59}
   3066 do_test boundary2-2.26.le.4 {
   3067   db eval {
   3068     SELECT a FROM t1 WHERE r <= 0 ORDER BY r DESC
   3069   }
   3070 } {59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   3071 do_test boundary2-2.26.le.5 {
   3072   db eval {
   3073     SELECT a FROM t1 WHERE r <= 0 ORDER BY x
   3074   }
   3075 } {59 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   3076 do_test boundary2-2.27.1 {
   3077   db eval {
   3078     SELECT * FROM t1 WHERE r=-1
   3079   }
   3080 } {-1 38 ffffffffffffffff}
   3081 do_test boundary2-2.27.2 {
   3082   db eval {
   3083     SELECT r, a FROM t1 WHERE x='ffffffffffffffff'
   3084   }
   3085 } {-1 38}
   3086 do_test boundary2-2.27.3 {
   3087   db eval {
   3088     SELECT r, x FROM t1 WHERE a=38
   3089   }
   3090 } {-1 ffffffffffffffff}
   3091 do_test boundary2-2.27.gt.1 {
   3092   db eval {
   3093     SELECT a FROM t1 WHERE r > -1 ORDER BY a
   3094   }
   3095 } {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}
   3096 do_test boundary2-2.27.gt.2 {
   3097   db eval {
   3098     SELECT a FROM t1 WHERE r > -1 ORDER BY a DESC
   3099   }
   3100 } {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}
   3101 do_test boundary2-2.27.gt.3 {
   3102   db eval {
   3103     SELECT a FROM t1 WHERE r > -1 ORDER BY r
   3104   }
   3105 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3106 do_test boundary2-2.27.gt.4 {
   3107   db eval {
   3108     SELECT a FROM t1 WHERE r > -1 ORDER BY r DESC
   3109   }
   3110 } {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}
   3111 do_test boundary2-2.27.gt.5 {
   3112   db eval {
   3113     SELECT a FROM t1 WHERE r > -1 ORDER BY x
   3114   }
   3115 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3116 do_test boundary2-2.27.ge.1 {
   3117   db eval {
   3118     SELECT a FROM t1 WHERE r >= -1 ORDER BY a
   3119   }
   3120 } {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}
   3121 do_test boundary2-2.27.ge.2 {
   3122   db eval {
   3123     SELECT a FROM t1 WHERE r >= -1 ORDER BY a DESC
   3124   }
   3125 } {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}
   3126 do_test boundary2-2.27.ge.3 {
   3127   db eval {
   3128     SELECT a FROM t1 WHERE r >= -1 ORDER BY r
   3129   }
   3130 } {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}
   3131 do_test boundary2-2.27.ge.4 {
   3132   db eval {
   3133     SELECT a FROM t1 WHERE r >= -1 ORDER BY r DESC
   3134   }
   3135 } {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}
   3136 do_test boundary2-2.27.ge.5 {
   3137   db eval {
   3138     SELECT a FROM t1 WHERE r >= -1 ORDER BY x
   3139   }
   3140 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   3141 do_test boundary2-2.27.lt.1 {
   3142   db eval {
   3143     SELECT a FROM t1 WHERE r < -1 ORDER BY a
   3144   }
   3145 } {1 2 11 21 29 32 33 37 44 47 52 53 54 55 58 63 64}
   3146 do_test boundary2-2.27.lt.2 {
   3147   db eval {
   3148     SELECT a FROM t1 WHERE r < -1 ORDER BY a DESC
   3149   }
   3150 } {64 63 58 55 54 53 52 47 44 37 33 32 29 21 11 2 1}
   3151 do_test boundary2-2.27.lt.3 {
   3152   db eval {
   3153     SELECT a FROM t1 WHERE r < -1 ORDER BY r
   3154   }
   3155 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
   3156 do_test boundary2-2.27.lt.4 {
   3157   db eval {
   3158     SELECT a FROM t1 WHERE r < -1 ORDER BY r DESC
   3159   }
   3160 } {33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   3161 do_test boundary2-2.27.lt.5 {
   3162   db eval {
   3163     SELECT a FROM t1 WHERE r < -1 ORDER BY x
   3164   }
   3165 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
   3166 do_test boundary2-2.27.le.1 {
   3167   db eval {
   3168     SELECT a FROM t1 WHERE r <= -1 ORDER BY a
   3169   }
   3170 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 63 64}
   3171 do_test boundary2-2.27.le.2 {
   3172   db eval {
   3173     SELECT a FROM t1 WHERE r <= -1 ORDER BY a DESC
   3174   }
   3175 } {64 63 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
   3176 do_test boundary2-2.27.le.3 {
   3177   db eval {
   3178     SELECT a FROM t1 WHERE r <= -1 ORDER BY r
   3179   }
   3180 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   3181 do_test boundary2-2.27.le.4 {
   3182   db eval {
   3183     SELECT a FROM t1 WHERE r <= -1 ORDER BY r DESC
   3184   }
   3185 } {38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   3186 do_test boundary2-2.27.le.5 {
   3187   db eval {
   3188     SELECT a FROM t1 WHERE r <= -1 ORDER BY x
   3189   }
   3190 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   3191 do_test boundary2-2.28.1 {
   3192   db eval {
   3193     SELECT * FROM t1 WHERE r=-2
   3194   }
   3195 } {-2 33 fffffffffffffffe}
   3196 do_test boundary2-2.28.2 {
   3197   db eval {
   3198     SELECT r, a FROM t1 WHERE x='fffffffffffffffe'
   3199   }
   3200 } {-2 33}
   3201 do_test boundary2-2.28.3 {
   3202   db eval {
   3203     SELECT r, x FROM t1 WHERE a=33
   3204   }
   3205 } {-2 fffffffffffffffe}
   3206 do_test boundary2-2.28.gt.1 {
   3207   db eval {
   3208     SELECT a FROM t1 WHERE r > -2 ORDER BY a
   3209   }
   3210 } {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}
   3211 do_test boundary2-2.28.gt.2 {
   3212   db eval {
   3213     SELECT a FROM t1 WHERE r > -2 ORDER BY a DESC
   3214   }
   3215 } {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}
   3216 do_test boundary2-2.28.gt.3 {
   3217   db eval {
   3218     SELECT a FROM t1 WHERE r > -2 ORDER BY r
   3219   }
   3220 } {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}
   3221 do_test boundary2-2.28.gt.4 {
   3222   db eval {
   3223     SELECT a FROM t1 WHERE r > -2 ORDER BY r DESC
   3224   }
   3225 } {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}
   3226 do_test boundary2-2.28.gt.5 {
   3227   db eval {
   3228     SELECT a FROM t1 WHERE r > -2 ORDER BY x
   3229   }
   3230 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   3231 do_test boundary2-2.28.ge.1 {
   3232   db eval {
   3233     SELECT a FROM t1 WHERE r >= -2 ORDER BY a
   3234   }
   3235 } {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}
   3236 do_test boundary2-2.28.ge.2 {
   3237   db eval {
   3238     SELECT a FROM t1 WHERE r >= -2 ORDER BY a DESC
   3239   }
   3240 } {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}
   3241 do_test boundary2-2.28.ge.3 {
   3242   db eval {
   3243     SELECT a FROM t1 WHERE r >= -2 ORDER BY r
   3244   }
   3245 } {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}
   3246 do_test boundary2-2.28.ge.4 {
   3247   db eval {
   3248     SELECT a FROM t1 WHERE r >= -2 ORDER BY r DESC
   3249   }
   3250 } {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}
   3251 do_test boundary2-2.28.ge.5 {
   3252   db eval {
   3253     SELECT a FROM t1 WHERE r >= -2 ORDER BY x
   3254   }
   3255 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   3256 do_test boundary2-2.28.lt.1 {
   3257   db eval {
   3258     SELECT a FROM t1 WHERE r < -2 ORDER BY a
   3259   }
   3260 } {1 2 11 21 29 32 37 44 47 52 53 54 55 58 63 64}
   3261 do_test boundary2-2.28.lt.2 {
   3262   db eval {
   3263     SELECT a FROM t1 WHERE r < -2 ORDER BY a DESC
   3264   }
   3265 } {64 63 58 55 54 53 52 47 44 37 32 29 21 11 2 1}
   3266 do_test boundary2-2.28.lt.3 {
   3267   db eval {
   3268     SELECT a FROM t1 WHERE r < -2 ORDER BY r
   3269   }
   3270 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
   3271 do_test boundary2-2.28.lt.4 {
   3272   db eval {
   3273     SELECT a FROM t1 WHERE r < -2 ORDER BY r DESC
   3274   }
   3275 } {52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   3276 do_test boundary2-2.28.lt.5 {
   3277   db eval {
   3278     SELECT a FROM t1 WHERE r < -2 ORDER BY x
   3279   }
   3280 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
   3281 do_test boundary2-2.28.le.1 {
   3282   db eval {
   3283     SELECT a FROM t1 WHERE r <= -2 ORDER BY a
   3284   }
   3285 } {1 2 11 21 29 32 33 37 44 47 52 53 54 55 58 63 64}
   3286 do_test boundary2-2.28.le.2 {
   3287   db eval {
   3288     SELECT a FROM t1 WHERE r <= -2 ORDER BY a DESC
   3289   }
   3290 } {64 63 58 55 54 53 52 47 44 37 33 32 29 21 11 2 1}
   3291 do_test boundary2-2.28.le.3 {
   3292   db eval {
   3293     SELECT a FROM t1 WHERE r <= -2 ORDER BY r
   3294   }
   3295 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
   3296 do_test boundary2-2.28.le.4 {
   3297   db eval {
   3298     SELECT a FROM t1 WHERE r <= -2 ORDER BY r DESC
   3299   }
   3300 } {33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   3301 do_test boundary2-2.28.le.5 {
   3302   db eval {
   3303     SELECT a FROM t1 WHERE r <= -2 ORDER BY x
   3304   }
   3305 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
   3306 do_test boundary2-2.29.1 {
   3307   db eval {
   3308     SELECT * FROM t1 WHERE r=2097152
   3309   }
   3310 } {2097152 42 0000000000200000}
   3311 do_test boundary2-2.29.2 {
   3312   db eval {
   3313     SELECT r, a FROM t1 WHERE x='0000000000200000'
   3314   }
   3315 } {2097152 42}
   3316 do_test boundary2-2.29.3 {
   3317   db eval {
   3318     SELECT r, x FROM t1 WHERE a=42
   3319   }
   3320 } {2097152 0000000000200000}
   3321 do_test boundary2-2.29.gt.1 {
   3322   db eval {
   3323     SELECT a FROM t1 WHERE r > 2097152 ORDER BY a
   3324   }
   3325 } {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}
   3326 do_test boundary2-2.29.gt.2 {
   3327   db eval {
   3328     SELECT a FROM t1 WHERE r > 2097152 ORDER BY a DESC
   3329   }
   3330 } {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}
   3331 do_test boundary2-2.29.gt.3 {
   3332   db eval {
   3333     SELECT a FROM t1 WHERE r > 2097152 ORDER BY r
   3334   }
   3335 } {18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3336 do_test boundary2-2.29.gt.4 {
   3337   db eval {
   3338     SELECT a FROM t1 WHERE r > 2097152 ORDER BY r DESC
   3339   }
   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}
   3341 do_test boundary2-2.29.gt.5 {
   3342   db eval {
   3343     SELECT a FROM t1 WHERE r > 2097152 ORDER BY x
   3344   }
   3345 } {18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3346 do_test boundary2-2.29.ge.1 {
   3347   db eval {
   3348     SELECT a FROM t1 WHERE r >= 2097152 ORDER BY a
   3349   }
   3350 } {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}
   3351 do_test boundary2-2.29.ge.2 {
   3352   db eval {
   3353     SELECT a FROM t1 WHERE r >= 2097152 ORDER BY a DESC
   3354   }
   3355 } {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}
   3356 do_test boundary2-2.29.ge.3 {
   3357   db eval {
   3358     SELECT a FROM t1 WHERE r >= 2097152 ORDER BY r
   3359   }
   3360 } {42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3361 do_test boundary2-2.29.ge.4 {
   3362   db eval {
   3363     SELECT a FROM t1 WHERE r >= 2097152 ORDER BY r DESC
   3364   }
   3365 } {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}
   3366 do_test boundary2-2.29.ge.5 {
   3367   db eval {
   3368     SELECT a FROM t1 WHERE r >= 2097152 ORDER BY x
   3369   }
   3370 } {42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3371 do_test boundary2-2.29.lt.1 {
   3372   db eval {
   3373     SELECT a FROM t1 WHERE r < 2097152 ORDER BY a
   3374   }
   3375 } {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}
   3376 do_test boundary2-2.29.lt.2 {
   3377   db eval {
   3378     SELECT a FROM t1 WHERE r < 2097152 ORDER BY a DESC
   3379   }
   3380 } {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}
   3381 do_test boundary2-2.29.lt.3 {
   3382   db eval {
   3383     SELECT a FROM t1 WHERE r < 2097152 ORDER BY r
   3384   }
   3385 } {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}
   3386 do_test boundary2-2.29.lt.4 {
   3387   db eval {
   3388     SELECT a FROM t1 WHERE r < 2097152 ORDER BY r DESC
   3389   }
   3390 } {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}
   3391 do_test boundary2-2.29.lt.5 {
   3392   db eval {
   3393     SELECT a FROM t1 WHERE r < 2097152 ORDER BY x
   3394   }
   3395 } {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}
   3396 do_test boundary2-2.29.le.1 {
   3397   db eval {
   3398     SELECT a FROM t1 WHERE r <= 2097152 ORDER BY a
   3399   }
   3400 } {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}
   3401 do_test boundary2-2.29.le.2 {
   3402   db eval {
   3403     SELECT a FROM t1 WHERE r <= 2097152 ORDER BY a DESC
   3404   }
   3405 } {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}
   3406 do_test boundary2-2.29.le.3 {
   3407   db eval {
   3408     SELECT a FROM t1 WHERE r <= 2097152 ORDER BY r
   3409   }
   3410 } {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}
   3411 do_test boundary2-2.29.le.4 {
   3412   db eval {
   3413     SELECT a FROM t1 WHERE r <= 2097152 ORDER BY r DESC
   3414   }
   3415 } {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}
   3416 do_test boundary2-2.29.le.5 {
   3417   db eval {
   3418     SELECT a FROM t1 WHERE r <= 2097152 ORDER BY x
   3419   }
   3420 } {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}
   3421 do_test boundary2-2.30.1 {
   3422   db eval {
   3423     SELECT * FROM t1 WHERE r=128
   3424   }
   3425 } {128 49 0000000000000080}
   3426 do_test boundary2-2.30.2 {
   3427   db eval {
   3428     SELECT r, a FROM t1 WHERE x='0000000000000080'
   3429   }
   3430 } {128 49}
   3431 do_test boundary2-2.30.3 {
   3432   db eval {
   3433     SELECT r, x FROM t1 WHERE a=49
   3434   }
   3435 } {128 0000000000000080}
   3436 do_test boundary2-2.30.gt.1 {
   3437   db eval {
   3438     SELECT a FROM t1 WHERE r > 128 ORDER BY a
   3439   }
   3440 } {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}
   3441 do_test boundary2-2.30.gt.2 {
   3442   db eval {
   3443     SELECT a FROM t1 WHERE r > 128 ORDER BY a DESC
   3444   }
   3445 } {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}
   3446 do_test boundary2-2.30.gt.3 {
   3447   db eval {
   3448     SELECT a FROM t1 WHERE r > 128 ORDER BY r
   3449   }
   3450 } {30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3451 do_test boundary2-2.30.gt.4 {
   3452   db eval {
   3453     SELECT a FROM t1 WHERE r > 128 ORDER BY r DESC
   3454   }
   3455 } {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}
   3456 do_test boundary2-2.30.gt.5 {
   3457   db eval {
   3458     SELECT a FROM t1 WHERE r > 128 ORDER BY x
   3459   }
   3460 } {30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3461 do_test boundary2-2.30.ge.1 {
   3462   db eval {
   3463     SELECT a FROM t1 WHERE r >= 128 ORDER BY a
   3464   }
   3465 } {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}
   3466 do_test boundary2-2.30.ge.2 {
   3467   db eval {
   3468     SELECT a FROM t1 WHERE r >= 128 ORDER BY a DESC
   3469   }
   3470 } {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}
   3471 do_test boundary2-2.30.ge.3 {
   3472   db eval {
   3473     SELECT a FROM t1 WHERE r >= 128 ORDER BY r
   3474   }
   3475 } {49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3476 do_test boundary2-2.30.ge.4 {
   3477   db eval {
   3478     SELECT a FROM t1 WHERE r >= 128 ORDER BY r DESC
   3479   }
   3480 } {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}
   3481 do_test boundary2-2.30.ge.5 {
   3482   db eval {
   3483     SELECT a FROM t1 WHERE r >= 128 ORDER BY x
   3484   }
   3485 } {49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3486 do_test boundary2-2.30.lt.1 {
   3487   db eval {
   3488     SELECT a FROM t1 WHERE r < 128 ORDER BY a
   3489   }
   3490 } {1 2 4 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
   3491 do_test boundary2-2.30.lt.2 {
   3492   db eval {
   3493     SELECT a FROM t1 WHERE r < 128 ORDER BY a DESC
   3494   }
   3495 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 4 2 1}
   3496 do_test boundary2-2.30.lt.3 {
   3497   db eval {
   3498     SELECT a FROM t1 WHERE r < 128 ORDER BY r
   3499   }
   3500 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4}
   3501 do_test boundary2-2.30.lt.4 {
   3502   db eval {
   3503     SELECT a FROM t1 WHERE r < 128 ORDER BY r DESC
   3504   }
   3505 } {4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   3506 do_test boundary2-2.30.lt.5 {
   3507   db eval {
   3508     SELECT a FROM t1 WHERE r < 128 ORDER BY x
   3509   }
   3510 } {59 60 41 5 31 4 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   3511 do_test boundary2-2.30.le.1 {
   3512   db eval {
   3513     SELECT a FROM t1 WHERE r <= 128 ORDER BY a
   3514   }
   3515 } {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}
   3516 do_test boundary2-2.30.le.2 {
   3517   db eval {
   3518     SELECT a FROM t1 WHERE r <= 128 ORDER BY a DESC
   3519   }
   3520 } {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}
   3521 do_test boundary2-2.30.le.3 {
   3522   db eval {
   3523     SELECT a FROM t1 WHERE r <= 128 ORDER BY r
   3524   }
   3525 } {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}
   3526 do_test boundary2-2.30.le.4 {
   3527   db eval {
   3528     SELECT a FROM t1 WHERE r <= 128 ORDER BY r DESC
   3529   }
   3530 } {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}
   3531 do_test boundary2-2.30.le.5 {
   3532   db eval {
   3533     SELECT a FROM t1 WHERE r <= 128 ORDER BY x
   3534   }
   3535 } {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}
   3536 do_test boundary2-2.31.1 {
   3537   db eval {
   3538     SELECT * FROM t1 WHERE r=255
   3539   }
   3540 } {255 30 00000000000000ff}
   3541 do_test boundary2-2.31.2 {
   3542   db eval {
   3543     SELECT r, a FROM t1 WHERE x='00000000000000ff'
   3544   }
   3545 } {255 30}
   3546 do_test boundary2-2.31.3 {
   3547   db eval {
   3548     SELECT r, x FROM t1 WHERE a=30
   3549   }
   3550 } {255 00000000000000ff}
   3551 do_test boundary2-2.31.gt.1 {
   3552   db eval {
   3553     SELECT a FROM t1 WHERE r > 255 ORDER BY a
   3554   }
   3555 } {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}
   3556 do_test boundary2-2.31.gt.2 {
   3557   db eval {
   3558     SELECT a FROM t1 WHERE r > 255 ORDER BY a DESC
   3559   }
   3560 } {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}
   3561 do_test boundary2-2.31.gt.3 {
   3562   db eval {
   3563     SELECT a FROM t1 WHERE r > 255 ORDER BY r
   3564   }
   3565 } {61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3566 do_test boundary2-2.31.gt.4 {
   3567   db eval {
   3568     SELECT a FROM t1 WHERE r > 255 ORDER BY r DESC
   3569   }
   3570 } {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}
   3571 do_test boundary2-2.31.gt.5 {
   3572   db eval {
   3573     SELECT a FROM t1 WHERE r > 255 ORDER BY x
   3574   }
   3575 } {61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3576 do_test boundary2-2.31.ge.1 {
   3577   db eval {
   3578     SELECT a FROM t1 WHERE r >= 255 ORDER BY a
   3579   }
   3580 } {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}
   3581 do_test boundary2-2.31.ge.2 {
   3582   db eval {
   3583     SELECT a FROM t1 WHERE r >= 255 ORDER BY a DESC
   3584   }
   3585 } {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}
   3586 do_test boundary2-2.31.ge.3 {
   3587   db eval {
   3588     SELECT a FROM t1 WHERE r >= 255 ORDER BY r
   3589   }
   3590 } {30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3591 do_test boundary2-2.31.ge.4 {
   3592   db eval {
   3593     SELECT a FROM t1 WHERE r >= 255 ORDER BY r DESC
   3594   }
   3595 } {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}
   3596 do_test boundary2-2.31.ge.5 {
   3597   db eval {
   3598     SELECT a FROM t1 WHERE r >= 255 ORDER BY x
   3599   }
   3600 } {30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3601 do_test boundary2-2.31.lt.1 {
   3602   db eval {
   3603     SELECT a FROM t1 WHERE r < 255 ORDER BY a
   3604   }
   3605 } {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}
   3606 do_test boundary2-2.31.lt.2 {
   3607   db eval {
   3608     SELECT a FROM t1 WHERE r < 255 ORDER BY a DESC
   3609   }
   3610 } {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}
   3611 do_test boundary2-2.31.lt.3 {
   3612   db eval {
   3613     SELECT a FROM t1 WHERE r < 255 ORDER BY r
   3614   }
   3615 } {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}
   3616 do_test boundary2-2.31.lt.4 {
   3617   db eval {
   3618     SELECT a FROM t1 WHERE r < 255 ORDER BY r DESC
   3619   }
   3620 } {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}
   3621 do_test boundary2-2.31.lt.5 {
   3622   db eval {
   3623     SELECT a FROM t1 WHERE r < 255 ORDER BY x
   3624   }
   3625 } {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}
   3626 do_test boundary2-2.31.le.1 {
   3627   db eval {
   3628     SELECT a FROM t1 WHERE r <= 255 ORDER BY a
   3629   }
   3630 } {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}
   3631 do_test boundary2-2.31.le.2 {
   3632   db eval {
   3633     SELECT a FROM t1 WHERE r <= 255 ORDER BY a DESC
   3634   }
   3635 } {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}
   3636 do_test boundary2-2.31.le.3 {
   3637   db eval {
   3638     SELECT a FROM t1 WHERE r <= 255 ORDER BY r
   3639   }
   3640 } {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}
   3641 do_test boundary2-2.31.le.4 {
   3642   db eval {
   3643     SELECT a FROM t1 WHERE r <= 255 ORDER BY r DESC
   3644   }
   3645 } {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}
   3646 do_test boundary2-2.31.le.5 {
   3647   db eval {
   3648     SELECT a FROM t1 WHERE r <= 255 ORDER BY x
   3649   }
   3650 } {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}
   3651 do_test boundary2-2.32.1 {
   3652   db eval {
   3653     SELECT * FROM t1 WHERE r=-2147483648
   3654   }
   3655 } {-2147483648 11 ffffffff80000000}
   3656 do_test boundary2-2.32.2 {
   3657   db eval {
   3658     SELECT r, a FROM t1 WHERE x='ffffffff80000000'
   3659   }
   3660 } {-2147483648 11}
   3661 do_test boundary2-2.32.3 {
   3662   db eval {
   3663     SELECT r, x FROM t1 WHERE a=11
   3664   }
   3665 } {-2147483648 ffffffff80000000}
   3666 do_test boundary2-2.32.gt.1 {
   3667   db eval {
   3668     SELECT a FROM t1 WHERE r > -2147483648 ORDER BY a
   3669   }
   3670 } {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}
   3671 do_test boundary2-2.32.gt.2 {
   3672   db eval {
   3673     SELECT a FROM t1 WHERE r > -2147483648 ORDER BY a DESC
   3674   }
   3675 } {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}
   3676 do_test boundary2-2.32.gt.3 {
   3677   db eval {
   3678     SELECT a FROM t1 WHERE r > -2147483648 ORDER BY r
   3679   }
   3680 } {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}
   3681 do_test boundary2-2.32.gt.4 {
   3682   db eval {
   3683     SELECT a FROM t1 WHERE r > -2147483648 ORDER BY r DESC
   3684   }
   3685 } {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}
   3686 do_test boundary2-2.32.gt.5 {
   3687   db eval {
   3688     SELECT a FROM t1 WHERE r > -2147483648 ORDER BY x
   3689   }
   3690 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   3691 do_test boundary2-2.32.ge.1 {
   3692   db eval {
   3693     SELECT a FROM t1 WHERE r >= -2147483648 ORDER BY a
   3694   }
   3695 } {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}
   3696 do_test boundary2-2.32.ge.2 {
   3697   db eval {
   3698     SELECT a FROM t1 WHERE r >= -2147483648 ORDER BY a DESC
   3699   }
   3700 } {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}
   3701 do_test boundary2-2.32.ge.3 {
   3702   db eval {
   3703     SELECT a FROM t1 WHERE r >= -2147483648 ORDER BY r
   3704   }
   3705 } {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}
   3706 do_test boundary2-2.32.ge.4 {
   3707   db eval {
   3708     SELECT a FROM t1 WHERE r >= -2147483648 ORDER BY r DESC
   3709   }
   3710 } {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}
   3711 do_test boundary2-2.32.ge.5 {
   3712   db eval {
   3713     SELECT a FROM t1 WHERE r >= -2147483648 ORDER BY x
   3714   }
   3715 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   3716 do_test boundary2-2.32.lt.1 {
   3717   db eval {
   3718     SELECT a FROM t1 WHERE r < -2147483648 ORDER BY a
   3719   }
   3720 } {2 21 44 47 55 58 63 64}
   3721 do_test boundary2-2.32.lt.2 {
   3722   db eval {
   3723     SELECT a FROM t1 WHERE r < -2147483648 ORDER BY a DESC
   3724   }
   3725 } {64 63 58 55 47 44 21 2}
   3726 do_test boundary2-2.32.lt.3 {
   3727   db eval {
   3728     SELECT a FROM t1 WHERE r < -2147483648 ORDER BY r
   3729   }
   3730 } {55 2 64 21 44 58 63 47}
   3731 do_test boundary2-2.32.lt.4 {
   3732   db eval {
   3733     SELECT a FROM t1 WHERE r < -2147483648 ORDER BY r DESC
   3734   }
   3735 } {47 63 58 44 21 64 2 55}
   3736 do_test boundary2-2.32.lt.5 {
   3737   db eval {
   3738     SELECT a FROM t1 WHERE r < -2147483648 ORDER BY x
   3739   }
   3740 } {55 2 64 21 44 58 63 47}
   3741 do_test boundary2-2.32.le.1 {
   3742   db eval {
   3743     SELECT a FROM t1 WHERE r <= -2147483648 ORDER BY a
   3744   }
   3745 } {2 11 21 44 47 55 58 63 64}
   3746 do_test boundary2-2.32.le.2 {
   3747   db eval {
   3748     SELECT a FROM t1 WHERE r <= -2147483648 ORDER BY a DESC
   3749   }
   3750 } {64 63 58 55 47 44 21 11 2}
   3751 do_test boundary2-2.32.le.3 {
   3752   db eval {
   3753     SELECT a FROM t1 WHERE r <= -2147483648 ORDER BY r
   3754   }
   3755 } {55 2 64 21 44 58 63 47 11}
   3756 do_test boundary2-2.32.le.4 {
   3757   db eval {
   3758     SELECT a FROM t1 WHERE r <= -2147483648 ORDER BY r DESC
   3759   }
   3760 } {11 47 63 58 44 21 64 2 55}
   3761 do_test boundary2-2.32.le.5 {
   3762   db eval {
   3763     SELECT a FROM t1 WHERE r <= -2147483648 ORDER BY x
   3764   }
   3765 } {55 2 64 21 44 58 63 47 11}
   3766 do_test boundary2-2.33.1 {
   3767   db eval {
   3768     SELECT * FROM t1 WHERE r=34359738367
   3769   }
   3770 } {34359738367 39 00000007ffffffff}
   3771 do_test boundary2-2.33.2 {
   3772   db eval {
   3773     SELECT r, a FROM t1 WHERE x='00000007ffffffff'
   3774   }
   3775 } {34359738367 39}
   3776 do_test boundary2-2.33.3 {
   3777   db eval {
   3778     SELECT r, x FROM t1 WHERE a=39
   3779   }
   3780 } {34359738367 00000007ffffffff}
   3781 do_test boundary2-2.33.gt.1 {
   3782   db eval {
   3783     SELECT a FROM t1 WHERE r > 34359738367 ORDER BY a
   3784   }
   3785 } {3 7 10 13 17 19 22 25 26 27 28 34 35 43 45 46 56 57}
   3786 do_test boundary2-2.33.gt.2 {
   3787   db eval {
   3788     SELECT a FROM t1 WHERE r > 34359738367 ORDER BY a DESC
   3789   }
   3790 } {57 56 46 45 43 35 34 28 27 26 25 22 19 17 13 10 7 3}
   3791 do_test boundary2-2.33.gt.3 {
   3792   db eval {
   3793     SELECT a FROM t1 WHERE r > 34359738367 ORDER BY r
   3794   }
   3795 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3796 do_test boundary2-2.33.gt.4 {
   3797   db eval {
   3798     SELECT a FROM t1 WHERE r > 34359738367 ORDER BY r DESC
   3799   }
   3800 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22}
   3801 do_test boundary2-2.33.gt.5 {
   3802   db eval {
   3803     SELECT a FROM t1 WHERE r > 34359738367 ORDER BY x
   3804   }
   3805 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3806 do_test boundary2-2.33.ge.1 {
   3807   db eval {
   3808     SELECT a FROM t1 WHERE r >= 34359738367 ORDER BY a
   3809   }
   3810 } {3 7 10 13 17 19 22 25 26 27 28 34 35 39 43 45 46 56 57}
   3811 do_test boundary2-2.33.ge.2 {
   3812   db eval {
   3813     SELECT a FROM t1 WHERE r >= 34359738367 ORDER BY a DESC
   3814   }
   3815 } {57 56 46 45 43 39 35 34 28 27 26 25 22 19 17 13 10 7 3}
   3816 do_test boundary2-2.33.ge.3 {
   3817   db eval {
   3818     SELECT a FROM t1 WHERE r >= 34359738367 ORDER BY r
   3819   }
   3820 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3821 do_test boundary2-2.33.ge.4 {
   3822   db eval {
   3823     SELECT a FROM t1 WHERE r >= 34359738367 ORDER BY r DESC
   3824   }
   3825 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39}
   3826 do_test boundary2-2.33.ge.5 {
   3827   db eval {
   3828     SELECT a FROM t1 WHERE r >= 34359738367 ORDER BY x
   3829   }
   3830 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   3831 do_test boundary2-2.33.lt.1 {
   3832   db eval {
   3833     SELECT a FROM t1 WHERE r < 34359738367 ORDER BY a
   3834   }
   3835 } {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}
   3836 do_test boundary2-2.33.lt.2 {
   3837   db eval {
   3838     SELECT a FROM t1 WHERE r < 34359738367 ORDER BY a DESC
   3839   }
   3840 } {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}
   3841 do_test boundary2-2.33.lt.3 {
   3842   db eval {
   3843     SELECT a FROM t1 WHERE r < 34359738367 ORDER BY r
   3844   }
   3845 } {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}
   3846 do_test boundary2-2.33.lt.4 {
   3847   db eval {
   3848     SELECT a FROM t1 WHERE r < 34359738367 ORDER BY r DESC
   3849   }
   3850 } {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}
   3851 do_test boundary2-2.33.lt.5 {
   3852   db eval {
   3853     SELECT a FROM t1 WHERE r < 34359738367 ORDER BY x
   3854   }
   3855 } {59 60 41 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}
   3856 do_test boundary2-2.33.le.1 {
   3857   db eval {
   3858     SELECT a FROM t1 WHERE r <= 34359738367 ORDER BY a
   3859   }
   3860 } {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}
   3861 do_test boundary2-2.33.le.2 {
   3862   db eval {
   3863     SELECT a FROM t1 WHERE r <= 34359738367 ORDER BY a DESC
   3864   }
   3865 } {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}
   3866 do_test boundary2-2.33.le.3 {
   3867   db eval {
   3868     SELECT a FROM t1 WHERE r <= 34359738367 ORDER BY r
   3869   }
   3870 } {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}
   3871 do_test boundary2-2.33.le.4 {
   3872   db eval {
   3873     SELECT a FROM t1 WHERE r <= 34359738367 ORDER BY r DESC
   3874   }
   3875 } {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}
   3876 do_test boundary2-2.33.le.5 {
   3877   db eval {
   3878     SELECT a FROM t1 WHERE r <= 34359738367 ORDER BY x
   3879   }
   3880 } {59 60 41 5 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}
   3881 do_test boundary2-2.34.1 {
   3882   db eval {
   3883     SELECT * FROM t1 WHERE r=-549755813889
   3884   }
   3885 } {-549755813889 58 ffffff7fffffffff}
   3886 do_test boundary2-2.34.2 {
   3887   db eval {
   3888     SELECT r, a FROM t1 WHERE x='ffffff7fffffffff'
   3889   }
   3890 } {-549755813889 58}
   3891 do_test boundary2-2.34.3 {
   3892   db eval {
   3893     SELECT r, x FROM t1 WHERE a=58
   3894   }
   3895 } {-549755813889 ffffff7fffffffff}
   3896 do_test boundary2-2.34.gt.1 {
   3897   db eval {
   3898     SELECT a FROM t1 WHERE r > -549755813889 ORDER BY a
   3899   }
   3900 } {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}
   3901 do_test boundary2-2.34.gt.2 {
   3902   db eval {
   3903     SELECT a FROM t1 WHERE r > -549755813889 ORDER BY a DESC
   3904   }
   3905 } {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}
   3906 do_test boundary2-2.34.gt.3 {
   3907   db eval {
   3908     SELECT a FROM t1 WHERE r > -549755813889 ORDER BY r
   3909   }
   3910 } {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}
   3911 do_test boundary2-2.34.gt.4 {
   3912   db eval {
   3913     SELECT a FROM t1 WHERE r > -549755813889 ORDER BY r DESC
   3914   }
   3915 } {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}
   3916 do_test boundary2-2.34.gt.5 {
   3917   db eval {
   3918     SELECT a FROM t1 WHERE r > -549755813889 ORDER BY x
   3919   }
   3920 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   3921 do_test boundary2-2.34.ge.1 {
   3922   db eval {
   3923     SELECT a FROM t1 WHERE r >= -549755813889 ORDER BY a
   3924   }
   3925 } {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}
   3926 do_test boundary2-2.34.ge.2 {
   3927   db eval {
   3928     SELECT a FROM t1 WHERE r >= -549755813889 ORDER BY a DESC
   3929   }
   3930 } {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}
   3931 do_test boundary2-2.34.ge.3 {
   3932   db eval {
   3933     SELECT a FROM t1 WHERE r >= -549755813889 ORDER BY r
   3934   }
   3935 } {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}
   3936 do_test boundary2-2.34.ge.4 {
   3937   db eval {
   3938     SELECT a FROM t1 WHERE r >= -549755813889 ORDER BY r DESC
   3939   }
   3940 } {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}
   3941 do_test boundary2-2.34.ge.5 {
   3942   db eval {
   3943     SELECT a FROM t1 WHERE r >= -549755813889 ORDER BY x
   3944   }
   3945 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   3946 do_test boundary2-2.34.lt.1 {
   3947   db eval {
   3948     SELECT a FROM t1 WHERE r < -549755813889 ORDER BY a
   3949   }
   3950 } {2 21 44 55 64}
   3951 do_test boundary2-2.34.lt.2 {
   3952   db eval {
   3953     SELECT a FROM t1 WHERE r < -549755813889 ORDER BY a DESC
   3954   }
   3955 } {64 55 44 21 2}
   3956 do_test boundary2-2.34.lt.3 {
   3957   db eval {
   3958     SELECT a FROM t1 WHERE r < -549755813889 ORDER BY r
   3959   }
   3960 } {55 2 64 21 44}
   3961 do_test boundary2-2.34.lt.4 {
   3962   db eval {
   3963     SELECT a FROM t1 WHERE r < -549755813889 ORDER BY r DESC
   3964   }
   3965 } {44 21 64 2 55}
   3966 do_test boundary2-2.34.lt.5 {
   3967   db eval {
   3968     SELECT a FROM t1 WHERE r < -549755813889 ORDER BY x
   3969   }
   3970 } {55 2 64 21 44}
   3971 do_test boundary2-2.34.le.1 {
   3972   db eval {
   3973     SELECT a FROM t1 WHERE r <= -549755813889 ORDER BY a
   3974   }
   3975 } {2 21 44 55 58 64}
   3976 do_test boundary2-2.34.le.2 {
   3977   db eval {
   3978     SELECT a FROM t1 WHERE r <= -549755813889 ORDER BY a DESC
   3979   }
   3980 } {64 58 55 44 21 2}
   3981 do_test boundary2-2.34.le.3 {
   3982   db eval {
   3983     SELECT a FROM t1 WHERE r <= -549755813889 ORDER BY r
   3984   }
   3985 } {55 2 64 21 44 58}
   3986 do_test boundary2-2.34.le.4 {
   3987   db eval {
   3988     SELECT a FROM t1 WHERE r <= -549755813889 ORDER BY r DESC
   3989   }
   3990 } {58 44 21 64 2 55}
   3991 do_test boundary2-2.34.le.5 {
   3992   db eval {
   3993     SELECT a FROM t1 WHERE r <= -549755813889 ORDER BY x
   3994   }
   3995 } {55 2 64 21 44 58}
   3996 do_test boundary2-2.35.1 {
   3997   db eval {
   3998     SELECT * FROM t1 WHERE r=-32768
   3999   }
   4000 } {-32768 32 ffffffffffff8000}
   4001 do_test boundary2-2.35.2 {
   4002   db eval {
   4003     SELECT r, a FROM t1 WHERE x='ffffffffffff8000'
   4004   }
   4005 } {-32768 32}
   4006 do_test boundary2-2.35.3 {
   4007   db eval {
   4008     SELECT r, x FROM t1 WHERE a=32
   4009   }
   4010 } {-32768 ffffffffffff8000}
   4011 do_test boundary2-2.35.gt.1 {
   4012   db eval {
   4013     SELECT a FROM t1 WHERE r > -32768 ORDER BY a
   4014   }
   4015 } {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}
   4016 do_test boundary2-2.35.gt.2 {
   4017   db eval {
   4018     SELECT a FROM t1 WHERE r > -32768 ORDER BY a DESC
   4019   }
   4020 } {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}
   4021 do_test boundary2-2.35.gt.3 {
   4022   db eval {
   4023     SELECT a FROM t1 WHERE r > -32768 ORDER BY r
   4024   }
   4025 } {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}
   4026 do_test boundary2-2.35.gt.4 {
   4027   db eval {
   4028     SELECT a FROM t1 WHERE r > -32768 ORDER BY r DESC
   4029   }
   4030 } {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}
   4031 do_test boundary2-2.35.gt.5 {
   4032   db eval {
   4033     SELECT a FROM t1 WHERE r > -32768 ORDER BY x
   4034   }
   4035 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   4036 do_test boundary2-2.35.ge.1 {
   4037   db eval {
   4038     SELECT a FROM t1 WHERE r >= -32768 ORDER BY a
   4039   }
   4040 } {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}
   4041 do_test boundary2-2.35.ge.2 {
   4042   db eval {
   4043     SELECT a FROM t1 WHERE r >= -32768 ORDER BY a DESC
   4044   }
   4045 } {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}
   4046 do_test boundary2-2.35.ge.3 {
   4047   db eval {
   4048     SELECT a FROM t1 WHERE r >= -32768 ORDER BY r
   4049   }
   4050 } {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}
   4051 do_test boundary2-2.35.ge.4 {
   4052   db eval {
   4053     SELECT a FROM t1 WHERE r >= -32768 ORDER BY r DESC
   4054   }
   4055 } {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}
   4056 do_test boundary2-2.35.ge.5 {
   4057   db eval {
   4058     SELECT a FROM t1 WHERE r >= -32768 ORDER BY x
   4059   }
   4060 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   4061 do_test boundary2-2.35.lt.1 {
   4062   db eval {
   4063     SELECT a FROM t1 WHERE r < -32768 ORDER BY a
   4064   }
   4065 } {1 2 11 21 29 37 44 47 55 58 63 64}
   4066 do_test boundary2-2.35.lt.2 {
   4067   db eval {
   4068     SELECT a FROM t1 WHERE r < -32768 ORDER BY a DESC
   4069   }
   4070 } {64 63 58 55 47 44 37 29 21 11 2 1}
   4071 do_test boundary2-2.35.lt.3 {
   4072   db eval {
   4073     SELECT a FROM t1 WHERE r < -32768 ORDER BY r
   4074   }
   4075 } {55 2 64 21 44 58 63 47 11 1 37 29}
   4076 do_test boundary2-2.35.lt.4 {
   4077   db eval {
   4078     SELECT a FROM t1 WHERE r < -32768 ORDER BY r DESC
   4079   }
   4080 } {29 37 1 11 47 63 58 44 21 64 2 55}
   4081 do_test boundary2-2.35.lt.5 {
   4082   db eval {
   4083     SELECT a FROM t1 WHERE r < -32768 ORDER BY x
   4084   }
   4085 } {55 2 64 21 44 58 63 47 11 1 37 29}
   4086 do_test boundary2-2.35.le.1 {
   4087   db eval {
   4088     SELECT a FROM t1 WHERE r <= -32768 ORDER BY a
   4089   }
   4090 } {1 2 11 21 29 32 37 44 47 55 58 63 64}
   4091 do_test boundary2-2.35.le.2 {
   4092   db eval {
   4093     SELECT a FROM t1 WHERE r <= -32768 ORDER BY a DESC
   4094   }
   4095 } {64 63 58 55 47 44 37 32 29 21 11 2 1}
   4096 do_test boundary2-2.35.le.3 {
   4097   db eval {
   4098     SELECT a FROM t1 WHERE r <= -32768 ORDER BY r
   4099   }
   4100 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
   4101 do_test boundary2-2.35.le.4 {
   4102   db eval {
   4103     SELECT a FROM t1 WHERE r <= -32768 ORDER BY r DESC
   4104   }
   4105 } {32 29 37 1 11 47 63 58 44 21 64 2 55}
   4106 do_test boundary2-2.35.le.5 {
   4107   db eval {
   4108     SELECT a FROM t1 WHERE r <= -32768 ORDER BY x
   4109   }
   4110 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
   4111 do_test boundary2-2.36.1 {
   4112   db eval {
   4113     SELECT * FROM t1 WHERE r=2147483647
   4114   }
   4115 } {2147483647 20 000000007fffffff}
   4116 do_test boundary2-2.36.2 {
   4117   db eval {
   4118     SELECT r, a FROM t1 WHERE x='000000007fffffff'
   4119   }
   4120 } {2147483647 20}
   4121 do_test boundary2-2.36.3 {
   4122   db eval {
   4123     SELECT r, x FROM t1 WHERE a=20
   4124   }
   4125 } {2147483647 000000007fffffff}
   4126 do_test boundary2-2.36.gt.1 {
   4127   db eval {
   4128     SELECT a FROM t1 WHERE r > 2147483647 ORDER BY a
   4129   }
   4130 } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
   4131 do_test boundary2-2.36.gt.2 {
   4132   db eval {
   4133     SELECT a FROM t1 WHERE r > 2147483647 ORDER BY a DESC
   4134   }
   4135 } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
   4136 do_test boundary2-2.36.gt.3 {
   4137   db eval {
   4138     SELECT a FROM t1 WHERE r > 2147483647 ORDER BY r
   4139   }
   4140 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   4141 do_test boundary2-2.36.gt.4 {
   4142   db eval {
   4143     SELECT a FROM t1 WHERE r > 2147483647 ORDER BY r DESC
   4144   }
   4145 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51}
   4146 do_test boundary2-2.36.gt.5 {
   4147   db eval {
   4148     SELECT a FROM t1 WHERE r > 2147483647 ORDER BY x
   4149   }
   4150 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   4151 do_test boundary2-2.36.ge.1 {
   4152   db eval {
   4153     SELECT a FROM t1 WHERE r >= 2147483647 ORDER BY a
   4154   }
   4155 } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
   4156 do_test boundary2-2.36.ge.2 {
   4157   db eval {
   4158     SELECT a FROM t1 WHERE r >= 2147483647 ORDER BY a DESC
   4159   }
   4160 } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
   4161 do_test boundary2-2.36.ge.3 {
   4162   db eval {
   4163     SELECT a FROM t1 WHERE r >= 2147483647 ORDER BY r
   4164   }
   4165 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   4166 do_test boundary2-2.36.ge.4 {
   4167   db eval {
   4168     SELECT a FROM t1 WHERE r >= 2147483647 ORDER BY r DESC
   4169   }
   4170 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20}
   4171 do_test boundary2-2.36.ge.5 {
   4172   db eval {
   4173     SELECT a FROM t1 WHERE r >= 2147483647 ORDER BY x
   4174   }
   4175 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   4176 do_test boundary2-2.36.lt.1 {
   4177   db eval {
   4178     SELECT a FROM t1 WHERE r < 2147483647 ORDER BY a
   4179   }
   4180 } {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}
   4181 do_test boundary2-2.36.lt.2 {
   4182   db eval {
   4183     SELECT a FROM t1 WHERE r < 2147483647 ORDER BY a DESC
   4184   }
   4185 } {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}
   4186 do_test boundary2-2.36.lt.3 {
   4187   db eval {
   4188     SELECT a FROM t1 WHERE r < 2147483647 ORDER BY r
   4189   }
   4190 } {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}
   4191 do_test boundary2-2.36.lt.4 {
   4192   db eval {
   4193     SELECT a FROM t1 WHERE r < 2147483647 ORDER BY r DESC
   4194   }
   4195 } {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}
   4196 do_test boundary2-2.36.lt.5 {
   4197   db eval {
   4198     SELECT a FROM t1 WHERE r < 2147483647 ORDER BY x
   4199   }
   4200 } {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}
   4201 do_test boundary2-2.36.le.1 {
   4202   db eval {
   4203     SELECT a FROM t1 WHERE r <= 2147483647 ORDER BY a
   4204   }
   4205 } {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}
   4206 do_test boundary2-2.36.le.2 {
   4207   db eval {
   4208     SELECT a FROM t1 WHERE r <= 2147483647 ORDER BY a DESC
   4209   }
   4210 } {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}
   4211 do_test boundary2-2.36.le.3 {
   4212   db eval {
   4213     SELECT a FROM t1 WHERE r <= 2147483647 ORDER BY r
   4214   }
   4215 } {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}
   4216 do_test boundary2-2.36.le.4 {
   4217   db eval {
   4218     SELECT a FROM t1 WHERE r <= 2147483647 ORDER BY r DESC
   4219   }
   4220 } {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}
   4221 do_test boundary2-2.36.le.5 {
   4222   db eval {
   4223     SELECT a FROM t1 WHERE r <= 2147483647 ORDER BY x
   4224   }
   4225 } {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}
   4226 do_test boundary2-2.37.1 {
   4227   db eval {
   4228     SELECT * FROM t1 WHERE r=-129
   4229   }
   4230 } {-129 54 ffffffffffffff7f}
   4231 do_test boundary2-2.37.2 {
   4232   db eval {
   4233     SELECT r, a FROM t1 WHERE x='ffffffffffffff7f'
   4234   }
   4235 } {-129 54}
   4236 do_test boundary2-2.37.3 {
   4237   db eval {
   4238     SELECT r, x FROM t1 WHERE a=54
   4239   }
   4240 } {-129 ffffffffffffff7f}
   4241 do_test boundary2-2.37.gt.1 {
   4242   db eval {
   4243     SELECT a FROM t1 WHERE r > -129 ORDER BY a
   4244   }
   4245 } {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}
   4246 do_test boundary2-2.37.gt.2 {
   4247   db eval {
   4248     SELECT a FROM t1 WHERE r > -129 ORDER BY a DESC
   4249   }
   4250 } {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}
   4251 do_test boundary2-2.37.gt.3 {
   4252   db eval {
   4253     SELECT a FROM t1 WHERE r > -129 ORDER BY r
   4254   }
   4255 } {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}
   4256 do_test boundary2-2.37.gt.4 {
   4257   db eval {
   4258     SELECT a FROM t1 WHERE r > -129 ORDER BY r DESC
   4259   }
   4260 } {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}
   4261 do_test boundary2-2.37.gt.5 {
   4262   db eval {
   4263     SELECT a FROM t1 WHERE r > -129 ORDER BY x
   4264   }
   4265 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   4266 do_test boundary2-2.37.ge.1 {
   4267   db eval {
   4268     SELECT a FROM t1 WHERE r >= -129 ORDER BY a
   4269   }
   4270 } {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}
   4271 do_test boundary2-2.37.ge.2 {
   4272   db eval {
   4273     SELECT a FROM t1 WHERE r >= -129 ORDER BY a DESC
   4274   }
   4275 } {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}
   4276 do_test boundary2-2.37.ge.3 {
   4277   db eval {
   4278     SELECT a FROM t1 WHERE r >= -129 ORDER BY r
   4279   }
   4280 } {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}
   4281 do_test boundary2-2.37.ge.4 {
   4282   db eval {
   4283     SELECT a FROM t1 WHERE r >= -129 ORDER BY r DESC
   4284   }
   4285 } {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}
   4286 do_test boundary2-2.37.ge.5 {
   4287   db eval {
   4288     SELECT a FROM t1 WHERE r >= -129 ORDER BY x
   4289   }
   4290 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   4291 do_test boundary2-2.37.lt.1 {
   4292   db eval {
   4293     SELECT a FROM t1 WHERE r < -129 ORDER BY a
   4294   }
   4295 } {1 2 11 21 29 32 37 44 47 55 58 63 64}
   4296 do_test boundary2-2.37.lt.2 {
   4297   db eval {
   4298     SELECT a FROM t1 WHERE r < -129 ORDER BY a DESC
   4299   }
   4300 } {64 63 58 55 47 44 37 32 29 21 11 2 1}
   4301 do_test boundary2-2.37.lt.3 {
   4302   db eval {
   4303     SELECT a FROM t1 WHERE r < -129 ORDER BY r
   4304   }
   4305 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
   4306 do_test boundary2-2.37.lt.4 {
   4307   db eval {
   4308     SELECT a FROM t1 WHERE r < -129 ORDER BY r DESC
   4309   }
   4310 } {32 29 37 1 11 47 63 58 44 21 64 2 55}
   4311 do_test boundary2-2.37.lt.5 {
   4312   db eval {
   4313     SELECT a FROM t1 WHERE r < -129 ORDER BY x
   4314   }
   4315 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
   4316 do_test boundary2-2.37.le.1 {
   4317   db eval {
   4318     SELECT a FROM t1 WHERE r <= -129 ORDER BY a
   4319   }
   4320 } {1 2 11 21 29 32 37 44 47 54 55 58 63 64}
   4321 do_test boundary2-2.37.le.2 {
   4322   db eval {
   4323     SELECT a FROM t1 WHERE r <= -129 ORDER BY a DESC
   4324   }
   4325 } {64 63 58 55 54 47 44 37 32 29 21 11 2 1}
   4326 do_test boundary2-2.37.le.3 {
   4327   db eval {
   4328     SELECT a FROM t1 WHERE r <= -129 ORDER BY r
   4329   }
   4330 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
   4331 do_test boundary2-2.37.le.4 {
   4332   db eval {
   4333     SELECT a FROM t1 WHERE r <= -129 ORDER BY r DESC
   4334   }
   4335 } {54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   4336 do_test boundary2-2.37.le.5 {
   4337   db eval {
   4338     SELECT a FROM t1 WHERE r <= -129 ORDER BY x
   4339   }
   4340 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
   4341 do_test boundary2-2.38.1 {
   4342   db eval {
   4343     SELECT * FROM t1 WHERE r=-128
   4344   }
   4345 } {-128 53 ffffffffffffff80}
   4346 do_test boundary2-2.38.2 {
   4347   db eval {
   4348     SELECT r, a FROM t1 WHERE x='ffffffffffffff80'
   4349   }
   4350 } {-128 53}
   4351 do_test boundary2-2.38.3 {
   4352   db eval {
   4353     SELECT r, x FROM t1 WHERE a=53
   4354   }
   4355 } {-128 ffffffffffffff80}
   4356 do_test boundary2-2.38.gt.1 {
   4357   db eval {
   4358     SELECT a FROM t1 WHERE r > -128 ORDER BY a
   4359   }
   4360 } {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}
   4361 do_test boundary2-2.38.gt.2 {
   4362   db eval {
   4363     SELECT a FROM t1 WHERE r > -128 ORDER BY a DESC
   4364   }
   4365 } {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}
   4366 do_test boundary2-2.38.gt.3 {
   4367   db eval {
   4368     SELECT a FROM t1 WHERE r > -128 ORDER BY r
   4369   }
   4370 } {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}
   4371 do_test boundary2-2.38.gt.4 {
   4372   db eval {
   4373     SELECT a FROM t1 WHERE r > -128 ORDER BY r DESC
   4374   }
   4375 } {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}
   4376 do_test boundary2-2.38.gt.5 {
   4377   db eval {
   4378     SELECT a FROM t1 WHERE r > -128 ORDER BY x
   4379   }
   4380 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   4381 do_test boundary2-2.38.ge.1 {
   4382   db eval {
   4383     SELECT a FROM t1 WHERE r >= -128 ORDER BY a
   4384   }
   4385 } {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}
   4386 do_test boundary2-2.38.ge.2 {
   4387   db eval {
   4388     SELECT a FROM t1 WHERE r >= -128 ORDER BY a DESC
   4389   }
   4390 } {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}
   4391 do_test boundary2-2.38.ge.3 {
   4392   db eval {
   4393     SELECT a FROM t1 WHERE r >= -128 ORDER BY r
   4394   }
   4395 } {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}
   4396 do_test boundary2-2.38.ge.4 {
   4397   db eval {
   4398     SELECT a FROM t1 WHERE r >= -128 ORDER BY r DESC
   4399   }
   4400 } {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}
   4401 do_test boundary2-2.38.ge.5 {
   4402   db eval {
   4403     SELECT a FROM t1 WHERE r >= -128 ORDER BY x
   4404   }
   4405 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   4406 do_test boundary2-2.38.lt.1 {
   4407   db eval {
   4408     SELECT a FROM t1 WHERE r < -128 ORDER BY a
   4409   }
   4410 } {1 2 11 21 29 32 37 44 47 54 55 58 63 64}
   4411 do_test boundary2-2.38.lt.2 {
   4412   db eval {
   4413     SELECT a FROM t1 WHERE r < -128 ORDER BY a DESC
   4414   }
   4415 } {64 63 58 55 54 47 44 37 32 29 21 11 2 1}
   4416 do_test boundary2-2.38.lt.3 {
   4417   db eval {
   4418     SELECT a FROM t1 WHERE r < -128 ORDER BY r
   4419   }
   4420 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
   4421 do_test boundary2-2.38.lt.4 {
   4422   db eval {
   4423     SELECT a FROM t1 WHERE r < -128 ORDER BY r DESC
   4424   }
   4425 } {54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   4426 do_test boundary2-2.38.lt.5 {
   4427   db eval {
   4428     SELECT a FROM t1 WHERE r < -128 ORDER BY x
   4429   }
   4430 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
   4431 do_test boundary2-2.38.le.1 {
   4432   db eval {
   4433     SELECT a FROM t1 WHERE r <= -128 ORDER BY a
   4434   }
   4435 } {1 2 11 21 29 32 37 44 47 53 54 55 58 63 64}
   4436 do_test boundary2-2.38.le.2 {
   4437   db eval {
   4438     SELECT a FROM t1 WHERE r <= -128 ORDER BY a DESC
   4439   }
   4440 } {64 63 58 55 54 53 47 44 37 32 29 21 11 2 1}
   4441 do_test boundary2-2.38.le.3 {
   4442   db eval {
   4443     SELECT a FROM t1 WHERE r <= -128 ORDER BY r
   4444   }
   4445 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
   4446 do_test boundary2-2.38.le.4 {
   4447   db eval {
   4448     SELECT a FROM t1 WHERE r <= -128 ORDER BY r DESC
   4449   }
   4450 } {53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   4451 do_test boundary2-2.38.le.5 {
   4452   db eval {
   4453     SELECT a FROM t1 WHERE r <= -128 ORDER BY x
   4454   }
   4455 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
   4456 do_test boundary2-2.39.1 {
   4457   db eval {
   4458     SELECT * FROM t1 WHERE r=72057594037927936
   4459   }
   4460 } {72057594037927936 28 0100000000000000}
   4461 do_test boundary2-2.39.2 {
   4462   db eval {
   4463     SELECT r, a FROM t1 WHERE x='0100000000000000'
   4464   }
   4465 } {72057594037927936 28}
   4466 do_test boundary2-2.39.3 {
   4467   db eval {
   4468     SELECT r, x FROM t1 WHERE a=28
   4469   }
   4470 } {72057594037927936 0100000000000000}
   4471 do_test boundary2-2.39.gt.1 {
   4472   db eval {
   4473     SELECT a FROM t1 WHERE r > 72057594037927936 ORDER BY a
   4474   }
   4475 } {3}
   4476 do_test boundary2-2.39.gt.2 {
   4477   db eval {
   4478     SELECT a FROM t1 WHERE r > 72057594037927936 ORDER BY a DESC
   4479   }
   4480 } {3}
   4481 do_test boundary2-2.39.gt.3 {
   4482   db eval {
   4483     SELECT a FROM t1 WHERE r > 72057594037927936 ORDER BY r
   4484   }
   4485 } {3}
   4486 do_test boundary2-2.39.gt.4 {
   4487   db eval {
   4488     SELECT a FROM t1 WHERE r > 72057594037927936 ORDER BY r DESC
   4489   }
   4490 } {3}
   4491 do_test boundary2-2.39.gt.5 {
   4492   db eval {
   4493     SELECT a FROM t1 WHERE r > 72057594037927936 ORDER BY x
   4494   }
   4495 } {3}
   4496 do_test boundary2-2.39.ge.1 {
   4497   db eval {
   4498     SELECT a FROM t1 WHERE r >= 72057594037927936 ORDER BY a
   4499   }
   4500 } {3 28}
   4501 do_test boundary2-2.39.ge.2 {
   4502   db eval {
   4503     SELECT a FROM t1 WHERE r >= 72057594037927936 ORDER BY a DESC
   4504   }
   4505 } {28 3}
   4506 do_test boundary2-2.39.ge.3 {
   4507   db eval {
   4508     SELECT a FROM t1 WHERE r >= 72057594037927936 ORDER BY r
   4509   }
   4510 } {28 3}
   4511 do_test boundary2-2.39.ge.4 {
   4512   db eval {
   4513     SELECT a FROM t1 WHERE r >= 72057594037927936 ORDER BY r DESC
   4514   }
   4515 } {3 28}
   4516 do_test boundary2-2.39.ge.5 {
   4517   db eval {
   4518     SELECT a FROM t1 WHERE r >= 72057594037927936 ORDER BY x
   4519   }
   4520 } {28 3}
   4521 do_test boundary2-2.39.lt.1 {
   4522   db eval {
   4523     SELECT a FROM t1 WHERE r < 72057594037927936 ORDER BY a
   4524   }
   4525 } {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}
   4526 do_test boundary2-2.39.lt.2 {
   4527   db eval {
   4528     SELECT a FROM t1 WHERE r < 72057594037927936 ORDER BY a DESC
   4529   }
   4530 } {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}
   4531 do_test boundary2-2.39.lt.3 {
   4532   db eval {
   4533     SELECT a FROM t1 WHERE r < 72057594037927936 ORDER BY r
   4534   }
   4535 } {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}
   4536 do_test boundary2-2.39.lt.4 {
   4537   db eval {
   4538     SELECT a FROM t1 WHERE r < 72057594037927936 ORDER BY r DESC
   4539   }
   4540 } {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}
   4541 do_test boundary2-2.39.lt.5 {
   4542   db eval {
   4543     SELECT a FROM t1 WHERE r < 72057594037927936 ORDER BY x
   4544   }
   4545 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 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}
   4546 do_test boundary2-2.39.le.1 {
   4547   db eval {
   4548     SELECT a FROM t1 WHERE r <= 72057594037927936 ORDER BY a
   4549   }
   4550 } {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}
   4551 do_test boundary2-2.39.le.2 {
   4552   db eval {
   4553     SELECT a FROM t1 WHERE r <= 72057594037927936 ORDER BY a DESC
   4554   }
   4555 } {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}
   4556 do_test boundary2-2.39.le.3 {
   4557   db eval {
   4558     SELECT a FROM t1 WHERE r <= 72057594037927936 ORDER BY r
   4559   }
   4560 } {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}
   4561 do_test boundary2-2.39.le.4 {
   4562   db eval {
   4563     SELECT a FROM t1 WHERE r <= 72057594037927936 ORDER BY r DESC
   4564   }
   4565 } {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}
   4566 do_test boundary2-2.39.le.5 {
   4567   db eval {
   4568     SELECT a FROM t1 WHERE r <= 72057594037927936 ORDER BY x
   4569   }
   4570 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 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}
   4571 do_test boundary2-2.40.1 {
   4572   db eval {
   4573     SELECT * FROM t1 WHERE r=2147483648
   4574   }
   4575 } {2147483648 51 0000000080000000}
   4576 do_test boundary2-2.40.2 {
   4577   db eval {
   4578     SELECT r, a FROM t1 WHERE x='0000000080000000'
   4579   }
   4580 } {2147483648 51}
   4581 do_test boundary2-2.40.3 {
   4582   db eval {
   4583     SELECT r, x FROM t1 WHERE a=51
   4584   }
   4585 } {2147483648 0000000080000000}
   4586 do_test boundary2-2.40.gt.1 {
   4587   db eval {
   4588     SELECT a FROM t1 WHERE r > 2147483648 ORDER BY a
   4589   }
   4590 } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
   4591 do_test boundary2-2.40.gt.2 {
   4592   db eval {
   4593     SELECT a FROM t1 WHERE r > 2147483648 ORDER BY a DESC
   4594   }
   4595 } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
   4596 do_test boundary2-2.40.gt.3 {
   4597   db eval {
   4598     SELECT a FROM t1 WHERE r > 2147483648 ORDER BY r
   4599   }
   4600 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   4601 do_test boundary2-2.40.gt.4 {
   4602   db eval {
   4603     SELECT a FROM t1 WHERE r > 2147483648 ORDER BY r DESC
   4604   }
   4605 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14}
   4606 do_test boundary2-2.40.gt.5 {
   4607   db eval {
   4608     SELECT a FROM t1 WHERE r > 2147483648 ORDER BY x
   4609   }
   4610 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   4611 do_test boundary2-2.40.ge.1 {
   4612   db eval {
   4613     SELECT a FROM t1 WHERE r >= 2147483648 ORDER BY a
   4614   }
   4615 } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
   4616 do_test boundary2-2.40.ge.2 {
   4617   db eval {
   4618     SELECT a FROM t1 WHERE r >= 2147483648 ORDER BY a DESC
   4619   }
   4620 } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
   4621 do_test boundary2-2.40.ge.3 {
   4622   db eval {
   4623     SELECT a FROM t1 WHERE r >= 2147483648 ORDER BY r
   4624   }
   4625 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   4626 do_test boundary2-2.40.ge.4 {
   4627   db eval {
   4628     SELECT a FROM t1 WHERE r >= 2147483648 ORDER BY r DESC
   4629   }
   4630 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51}
   4631 do_test boundary2-2.40.ge.5 {
   4632   db eval {
   4633     SELECT a FROM t1 WHERE r >= 2147483648 ORDER BY x
   4634   }
   4635 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   4636 do_test boundary2-2.40.lt.1 {
   4637   db eval {
   4638     SELECT a FROM t1 WHERE r < 2147483648 ORDER BY a
   4639   }
   4640 } {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}
   4641 do_test boundary2-2.40.lt.2 {
   4642   db eval {
   4643     SELECT a FROM t1 WHERE r < 2147483648 ORDER BY a DESC
   4644   }
   4645 } {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}
   4646 do_test boundary2-2.40.lt.3 {
   4647   db eval {
   4648     SELECT a FROM t1 WHERE r < 2147483648 ORDER BY r
   4649   }
   4650 } {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}
   4651 do_test boundary2-2.40.lt.4 {
   4652   db eval {
   4653     SELECT a FROM t1 WHERE r < 2147483648 ORDER BY r DESC
   4654   }
   4655 } {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}
   4656 do_test boundary2-2.40.lt.5 {
   4657   db eval {
   4658     SELECT a FROM t1 WHERE r < 2147483648 ORDER BY x
   4659   }
   4660 } {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}
   4661 do_test boundary2-2.40.le.1 {
   4662   db eval {
   4663     SELECT a FROM t1 WHERE r <= 2147483648 ORDER BY a
   4664   }
   4665 } {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}
   4666 do_test boundary2-2.40.le.2 {
   4667   db eval {
   4668     SELECT a FROM t1 WHERE r <= 2147483648 ORDER BY a DESC
   4669   }
   4670 } {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}
   4671 do_test boundary2-2.40.le.3 {
   4672   db eval {
   4673     SELECT a FROM t1 WHERE r <= 2147483648 ORDER BY r
   4674   }
   4675 } {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}
   4676 do_test boundary2-2.40.le.4 {
   4677   db eval {
   4678     SELECT a FROM t1 WHERE r <= 2147483648 ORDER BY r DESC
   4679   }
   4680 } {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}
   4681 do_test boundary2-2.40.le.5 {
   4682   db eval {
   4683     SELECT a FROM t1 WHERE r <= 2147483648 ORDER BY x
   4684   }
   4685 } {59 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}
   4686 do_test boundary2-2.41.1 {
   4687   db eval {
   4688     SELECT * FROM t1 WHERE r=549755813887
   4689   }
   4690 } {549755813887 46 0000007fffffffff}
   4691 do_test boundary2-2.41.2 {
   4692   db eval {
   4693     SELECT r, a FROM t1 WHERE x='0000007fffffffff'
   4694   }
   4695 } {549755813887 46}
   4696 do_test boundary2-2.41.3 {
   4697   db eval {
   4698     SELECT r, x FROM t1 WHERE a=46
   4699   }
   4700 } {549755813887 0000007fffffffff}
   4701 do_test boundary2-2.41.gt.1 {
   4702   db eval {
   4703     SELECT a FROM t1 WHERE r > 549755813887 ORDER BY a
   4704   }
   4705 } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 56 57}
   4706 do_test boundary2-2.41.gt.2 {
   4707   db eval {
   4708     SELECT a FROM t1 WHERE r > 549755813887 ORDER BY a DESC
   4709   }
   4710 } {57 56 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
   4711 do_test boundary2-2.41.gt.3 {
   4712   db eval {
   4713     SELECT a FROM t1 WHERE r > 549755813887 ORDER BY r
   4714   }
   4715 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   4716 do_test boundary2-2.41.gt.4 {
   4717   db eval {
   4718     SELECT a FROM t1 WHERE r > 549755813887 ORDER BY r DESC
   4719   }
   4720 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35}
   4721 do_test boundary2-2.41.gt.5 {
   4722   db eval {
   4723     SELECT a FROM t1 WHERE r > 549755813887 ORDER BY x
   4724   }
   4725 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   4726 do_test boundary2-2.41.ge.1 {
   4727   db eval {
   4728     SELECT a FROM t1 WHERE r >= 549755813887 ORDER BY a
   4729   }
   4730 } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 46 56 57}
   4731 do_test boundary2-2.41.ge.2 {
   4732   db eval {
   4733     SELECT a FROM t1 WHERE r >= 549755813887 ORDER BY a DESC
   4734   }
   4735 } {57 56 46 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
   4736 do_test boundary2-2.41.ge.3 {
   4737   db eval {
   4738     SELECT a FROM t1 WHERE r >= 549755813887 ORDER BY r
   4739   }
   4740 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   4741 do_test boundary2-2.41.ge.4 {
   4742   db eval {
   4743     SELECT a FROM t1 WHERE r >= 549755813887 ORDER BY r DESC
   4744   }
   4745 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46}
   4746 do_test boundary2-2.41.ge.5 {
   4747   db eval {
   4748     SELECT a FROM t1 WHERE r >= 549755813887 ORDER BY x
   4749   }
   4750 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   4751 do_test boundary2-2.41.lt.1 {
   4752   db eval {
   4753     SELECT a FROM t1 WHERE r < 549755813887 ORDER BY a
   4754   }
   4755 } {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}
   4756 do_test boundary2-2.41.lt.2 {
   4757   db eval {
   4758     SELECT a FROM t1 WHERE r < 549755813887 ORDER BY a DESC
   4759   }
   4760 } {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}
   4761 do_test boundary2-2.41.lt.3 {
   4762   db eval {
   4763     SELECT a FROM t1 WHERE r < 549755813887 ORDER BY r
   4764   }
   4765 } {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}
   4766 do_test boundary2-2.41.lt.4 {
   4767   db eval {
   4768     SELECT a FROM t1 WHERE r < 549755813887 ORDER BY r DESC
   4769   }
   4770 } {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}
   4771 do_test boundary2-2.41.lt.5 {
   4772   db eval {
   4773     SELECT a FROM t1 WHERE r < 549755813887 ORDER BY x
   4774   }
   4775 } {59 60 41 5 31 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}
   4776 do_test boundary2-2.41.le.1 {
   4777   db eval {
   4778     SELECT a FROM t1 WHERE r <= 549755813887 ORDER BY a
   4779   }
   4780 } {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}
   4781 do_test boundary2-2.41.le.2 {
   4782   db eval {
   4783     SELECT a FROM t1 WHERE r <= 549755813887 ORDER BY a DESC
   4784   }
   4785 } {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}
   4786 do_test boundary2-2.41.le.3 {
   4787   db eval {
   4788     SELECT a FROM t1 WHERE r <= 549755813887 ORDER BY r
   4789   }
   4790 } {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}
   4791 do_test boundary2-2.41.le.4 {
   4792   db eval {
   4793     SELECT a FROM t1 WHERE r <= 549755813887 ORDER BY r DESC
   4794   }
   4795 } {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}
   4796 do_test boundary2-2.41.le.5 {
   4797   db eval {
   4798     SELECT a FROM t1 WHERE r <= 549755813887 ORDER BY x
   4799   }
   4800 } {59 60 41 5 31 4 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}
   4801 do_test boundary2-2.42.1 {
   4802   db eval {
   4803     SELECT * FROM t1 WHERE r=-549755813888
   4804   }
   4805 } {-549755813888 63 ffffff8000000000}
   4806 do_test boundary2-2.42.2 {
   4807   db eval {
   4808     SELECT r, a FROM t1 WHERE x='ffffff8000000000'
   4809   }
   4810 } {-549755813888 63}
   4811 do_test boundary2-2.42.3 {
   4812   db eval {
   4813     SELECT r, x FROM t1 WHERE a=63
   4814   }
   4815 } {-549755813888 ffffff8000000000}
   4816 do_test boundary2-2.42.gt.1 {
   4817   db eval {
   4818     SELECT a FROM t1 WHERE r > -549755813888 ORDER BY a
   4819   }
   4820 } {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}
   4821 do_test boundary2-2.42.gt.2 {
   4822   db eval {
   4823     SELECT a FROM t1 WHERE r > -549755813888 ORDER BY a DESC
   4824   }
   4825 } {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}
   4826 do_test boundary2-2.42.gt.3 {
   4827   db eval {
   4828     SELECT a FROM t1 WHERE r > -549755813888 ORDER BY r
   4829   }
   4830 } {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}
   4831 do_test boundary2-2.42.gt.4 {
   4832   db eval {
   4833     SELECT a FROM t1 WHERE r > -549755813888 ORDER BY r DESC
   4834   }
   4835 } {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}
   4836 do_test boundary2-2.42.gt.5 {
   4837   db eval {
   4838     SELECT a FROM t1 WHERE r > -549755813888 ORDER BY x
   4839   }
   4840 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   4841 do_test boundary2-2.42.ge.1 {
   4842   db eval {
   4843     SELECT a FROM t1 WHERE r >= -549755813888 ORDER BY a
   4844   }
   4845 } {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}
   4846 do_test boundary2-2.42.ge.2 {
   4847   db eval {
   4848     SELECT a FROM t1 WHERE r >= -549755813888 ORDER BY a DESC
   4849   }
   4850 } {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}
   4851 do_test boundary2-2.42.ge.3 {
   4852   db eval {
   4853     SELECT a FROM t1 WHERE r >= -549755813888 ORDER BY r
   4854   }
   4855 } {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}
   4856 do_test boundary2-2.42.ge.4 {
   4857   db eval {
   4858     SELECT a FROM t1 WHERE r >= -549755813888 ORDER BY r DESC
   4859   }
   4860 } {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}
   4861 do_test boundary2-2.42.ge.5 {
   4862   db eval {
   4863     SELECT a FROM t1 WHERE r >= -549755813888 ORDER BY x
   4864   }
   4865 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   4866 do_test boundary2-2.42.lt.1 {
   4867   db eval {
   4868     SELECT a FROM t1 WHERE r < -549755813888 ORDER BY a
   4869   }
   4870 } {2 21 44 55 58 64}
   4871 do_test boundary2-2.42.lt.2 {
   4872   db eval {
   4873     SELECT a FROM t1 WHERE r < -549755813888 ORDER BY a DESC
   4874   }
   4875 } {64 58 55 44 21 2}
   4876 do_test boundary2-2.42.lt.3 {
   4877   db eval {
   4878     SELECT a FROM t1 WHERE r < -549755813888 ORDER BY r
   4879   }
   4880 } {55 2 64 21 44 58}
   4881 do_test boundary2-2.42.lt.4 {
   4882   db eval {
   4883     SELECT a FROM t1 WHERE r < -549755813888 ORDER BY r DESC
   4884   }
   4885 } {58 44 21 64 2 55}
   4886 do_test boundary2-2.42.lt.5 {
   4887   db eval {
   4888     SELECT a FROM t1 WHERE r < -549755813888 ORDER BY x
   4889   }
   4890 } {55 2 64 21 44 58}
   4891 do_test boundary2-2.42.le.1 {
   4892   db eval {
   4893     SELECT a FROM t1 WHERE r <= -549755813888 ORDER BY a
   4894   }
   4895 } {2 21 44 55 58 63 64}
   4896 do_test boundary2-2.42.le.2 {
   4897   db eval {
   4898     SELECT a FROM t1 WHERE r <= -549755813888 ORDER BY a DESC
   4899   }
   4900 } {64 63 58 55 44 21 2}
   4901 do_test boundary2-2.42.le.3 {
   4902   db eval {
   4903     SELECT a FROM t1 WHERE r <= -549755813888 ORDER BY r
   4904   }
   4905 } {55 2 64 21 44 58 63}
   4906 do_test boundary2-2.42.le.4 {
   4907   db eval {
   4908     SELECT a FROM t1 WHERE r <= -549755813888 ORDER BY r DESC
   4909   }
   4910 } {63 58 44 21 64 2 55}
   4911 do_test boundary2-2.42.le.5 {
   4912   db eval {
   4913     SELECT a FROM t1 WHERE r <= -549755813888 ORDER BY x
   4914   }
   4915 } {55 2 64 21 44 58 63}
   4916 do_test boundary2-2.43.1 {
   4917   db eval {
   4918     SELECT * FROM t1 WHERE r=281474976710655
   4919   }
   4920 } {281474976710655 10 0000ffffffffffff}
   4921 do_test boundary2-2.43.2 {
   4922   db eval {
   4923     SELECT r, a FROM t1 WHERE x='0000ffffffffffff'
   4924   }
   4925 } {281474976710655 10}
   4926 do_test boundary2-2.43.3 {
   4927   db eval {
   4928     SELECT r, x FROM t1 WHERE a=10
   4929   }
   4930 } {281474976710655 0000ffffffffffff}
   4931 do_test boundary2-2.43.gt.1 {
   4932   db eval {
   4933     SELECT a FROM t1 WHERE r > 281474976710655 ORDER BY a
   4934   }
   4935 } {3 13 17 26 27 28 43 45}
   4936 do_test boundary2-2.43.gt.2 {
   4937   db eval {
   4938     SELECT a FROM t1 WHERE r > 281474976710655 ORDER BY a DESC
   4939   }
   4940 } {45 43 28 27 26 17 13 3}
   4941 do_test boundary2-2.43.gt.3 {
   4942   db eval {
   4943     SELECT a FROM t1 WHERE r > 281474976710655 ORDER BY r
   4944   }
   4945 } {26 13 43 27 45 17 28 3}
   4946 do_test boundary2-2.43.gt.4 {
   4947   db eval {
   4948     SELECT a FROM t1 WHERE r > 281474976710655 ORDER BY r DESC
   4949   }
   4950 } {3 28 17 45 27 43 13 26}
   4951 do_test boundary2-2.43.gt.5 {
   4952   db eval {
   4953     SELECT a FROM t1 WHERE r > 281474976710655 ORDER BY x
   4954   }
   4955 } {26 13 43 27 45 17 28 3}
   4956 do_test boundary2-2.43.ge.1 {
   4957   db eval {
   4958     SELECT a FROM t1 WHERE r >= 281474976710655 ORDER BY a
   4959   }
   4960 } {3 10 13 17 26 27 28 43 45}
   4961 do_test boundary2-2.43.ge.2 {
   4962   db eval {
   4963     SELECT a FROM t1 WHERE r >= 281474976710655 ORDER BY a DESC
   4964   }
   4965 } {45 43 28 27 26 17 13 10 3}
   4966 do_test boundary2-2.43.ge.3 {
   4967   db eval {
   4968     SELECT a FROM t1 WHERE r >= 281474976710655 ORDER BY r
   4969   }
   4970 } {10 26 13 43 27 45 17 28 3}
   4971 do_test boundary2-2.43.ge.4 {
   4972   db eval {
   4973     SELECT a FROM t1 WHERE r >= 281474976710655 ORDER BY r DESC
   4974   }
   4975 } {3 28 17 45 27 43 13 26 10}
   4976 do_test boundary2-2.43.ge.5 {
   4977   db eval {
   4978     SELECT a FROM t1 WHERE r >= 281474976710655 ORDER BY x
   4979   }
   4980 } {10 26 13 43 27 45 17 28 3}
   4981 do_test boundary2-2.43.lt.1 {
   4982   db eval {
   4983     SELECT a FROM t1 WHERE r < 281474976710655 ORDER BY a
   4984   }
   4985 } {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}
   4986 do_test boundary2-2.43.lt.2 {
   4987   db eval {
   4988     SELECT a FROM t1 WHERE r < 281474976710655 ORDER BY a DESC
   4989   }
   4990 } {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}
   4991 do_test boundary2-2.43.lt.3 {
   4992   db eval {
   4993     SELECT a FROM t1 WHERE r < 281474976710655 ORDER BY r
   4994   }
   4995 } {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}
   4996 do_test boundary2-2.43.lt.4 {
   4997   db eval {
   4998     SELECT a FROM t1 WHERE r < 281474976710655 ORDER BY r DESC
   4999   }
   5000 } {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}
   5001 do_test boundary2-2.43.lt.5 {
   5002   db eval {
   5003     SELECT a FROM t1 WHERE r < 281474976710655 ORDER BY x
   5004   }
   5005 } {59 60 41 5 31 4 49 30 61 8 16 23 50 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}
   5006 do_test boundary2-2.43.le.1 {
   5007   db eval {
   5008     SELECT a FROM t1 WHERE r <= 281474976710655 ORDER BY a
   5009   }
   5010 } {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}
   5011 do_test boundary2-2.43.le.2 {
   5012   db eval {
   5013     SELECT a FROM t1 WHERE r <= 281474976710655 ORDER BY a DESC
   5014   }
   5015 } {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}
   5016 do_test boundary2-2.43.le.3 {
   5017   db eval {
   5018     SELECT a FROM t1 WHERE r <= 281474976710655 ORDER BY r
   5019   }
   5020 } {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}
   5021 do_test boundary2-2.43.le.4 {
   5022   db eval {
   5023     SELECT a FROM t1 WHERE r <= 281474976710655 ORDER BY r DESC
   5024   }
   5025 } {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}
   5026 do_test boundary2-2.43.le.5 {
   5027   db eval {
   5028     SELECT a FROM t1 WHERE r <= 281474976710655 ORDER BY x
   5029   }
   5030 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 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}
   5031 do_test boundary2-2.44.1 {
   5032   db eval {
   5033     SELECT * FROM t1 WHERE r=4398046511103
   5034   }
   5035 } {4398046511103 7 000003ffffffffff}
   5036 do_test boundary2-2.44.2 {
   5037   db eval {
   5038     SELECT r, a FROM t1 WHERE x='000003ffffffffff'
   5039   }
   5040 } {4398046511103 7}
   5041 do_test boundary2-2.44.3 {
   5042   db eval {
   5043     SELECT r, x FROM t1 WHERE a=7
   5044   }
   5045 } {4398046511103 000003ffffffffff}
   5046 do_test boundary2-2.44.gt.1 {
   5047   db eval {
   5048     SELECT a FROM t1 WHERE r > 4398046511103 ORDER BY a
   5049   }
   5050 } {3 10 13 17 25 26 27 28 34 43 45 56}
   5051 do_test boundary2-2.44.gt.2 {
   5052   db eval {
   5053     SELECT a FROM t1 WHERE r > 4398046511103 ORDER BY a DESC
   5054   }
   5055 } {56 45 43 34 28 27 26 25 17 13 10 3}
   5056 do_test boundary2-2.44.gt.3 {
   5057   db eval {
   5058     SELECT a FROM t1 WHERE r > 4398046511103 ORDER BY r
   5059   }
   5060 } {56 25 34 10 26 13 43 27 45 17 28 3}
   5061 do_test boundary2-2.44.gt.4 {
   5062   db eval {
   5063     SELECT a FROM t1 WHERE r > 4398046511103 ORDER BY r DESC
   5064   }
   5065 } {3 28 17 45 27 43 13 26 10 34 25 56}
   5066 do_test boundary2-2.44.gt.5 {
   5067   db eval {
   5068     SELECT a FROM t1 WHERE r > 4398046511103 ORDER BY x
   5069   }
   5070 } {56 25 34 10 26 13 43 27 45 17 28 3}
   5071 do_test boundary2-2.44.ge.1 {
   5072   db eval {
   5073     SELECT a FROM t1 WHERE r >= 4398046511103 ORDER BY a
   5074   }
   5075 } {3 7 10 13 17 25 26 27 28 34 43 45 56}
   5076 do_test boundary2-2.44.ge.2 {
   5077   db eval {
   5078     SELECT a FROM t1 WHERE r >= 4398046511103 ORDER BY a DESC
   5079   }
   5080 } {56 45 43 34 28 27 26 25 17 13 10 7 3}
   5081 do_test boundary2-2.44.ge.3 {
   5082   db eval {
   5083     SELECT a FROM t1 WHERE r >= 4398046511103 ORDER BY r
   5084   }
   5085 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
   5086 do_test boundary2-2.44.ge.4 {
   5087   db eval {
   5088     SELECT a FROM t1 WHERE r >= 4398046511103 ORDER BY r DESC
   5089   }
   5090 } {3 28 17 45 27 43 13 26 10 34 25 56 7}
   5091 do_test boundary2-2.44.ge.5 {
   5092   db eval {
   5093     SELECT a FROM t1 WHERE r >= 4398046511103 ORDER BY x
   5094   }
   5095 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
   5096 do_test boundary2-2.44.lt.1 {
   5097   db eval {
   5098     SELECT a FROM t1 WHERE r < 4398046511103 ORDER BY a
   5099   }
   5100 } {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}
   5101 do_test boundary2-2.44.lt.2 {
   5102   db eval {
   5103     SELECT a FROM t1 WHERE r < 4398046511103 ORDER BY a DESC
   5104   }
   5105 } {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}
   5106 do_test boundary2-2.44.lt.3 {
   5107   db eval {
   5108     SELECT a FROM t1 WHERE r < 4398046511103 ORDER BY r
   5109   }
   5110 } {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}
   5111 do_test boundary2-2.44.lt.4 {
   5112   db eval {
   5113     SELECT a FROM t1 WHERE r < 4398046511103 ORDER BY r DESC
   5114   }
   5115 } {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}
   5116 do_test boundary2-2.44.lt.5 {
   5117   db eval {
   5118     SELECT a FROM t1 WHERE r < 4398046511103 ORDER BY x
   5119   }
   5120 } {59 60 41 5 31 4 49 30 61 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}
   5121 do_test boundary2-2.44.le.1 {
   5122   db eval {
   5123     SELECT a FROM t1 WHERE r <= 4398046511103 ORDER BY a
   5124   }
   5125 } {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}
   5126 do_test boundary2-2.44.le.2 {
   5127   db eval {
   5128     SELECT a FROM t1 WHERE r <= 4398046511103 ORDER BY a DESC
   5129   }
   5130 } {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}
   5131 do_test boundary2-2.44.le.3 {
   5132   db eval {
   5133     SELECT a FROM t1 WHERE r <= 4398046511103 ORDER BY r
   5134   }
   5135 } {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}
   5136 do_test boundary2-2.44.le.4 {
   5137   db eval {
   5138     SELECT a FROM t1 WHERE r <= 4398046511103 ORDER BY r DESC
   5139   }
   5140 } {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}
   5141 do_test boundary2-2.44.le.5 {
   5142   db eval {
   5143     SELECT a FROM t1 WHERE r <= 4398046511103 ORDER BY x
   5144   }
   5145 } {59 60 41 5 31 4 49 30 61 8 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}
   5146 do_test boundary2-2.45.1 {
   5147   db eval {
   5148     SELECT * FROM t1 WHERE r=268435455
   5149   }
   5150 } {268435455 12 000000000fffffff}
   5151 do_test boundary2-2.45.2 {
   5152   db eval {
   5153     SELECT r, a FROM t1 WHERE x='000000000fffffff'
   5154   }
   5155 } {268435455 12}
   5156 do_test boundary2-2.45.3 {
   5157   db eval {
   5158     SELECT r, x FROM t1 WHERE a=12
   5159   }
   5160 } {268435455 000000000fffffff}
   5161 do_test boundary2-2.45.gt.1 {
   5162   db eval {
   5163     SELECT a FROM t1 WHERE r > 268435455 ORDER BY a
   5164   }
   5165 } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
   5166 do_test boundary2-2.45.gt.2 {
   5167   db eval {
   5168     SELECT a FROM t1 WHERE r > 268435455 ORDER BY a DESC
   5169   }
   5170 } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
   5171 do_test boundary2-2.45.gt.3 {
   5172   db eval {
   5173     SELECT a FROM t1 WHERE r > 268435455 ORDER BY r
   5174   }
   5175 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   5176 do_test boundary2-2.45.gt.4 {
   5177   db eval {
   5178     SELECT a FROM t1 WHERE r > 268435455 ORDER BY r DESC
   5179   }
   5180 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40}
   5181 do_test boundary2-2.45.gt.5 {
   5182   db eval {
   5183     SELECT a FROM t1 WHERE r > 268435455 ORDER BY x
   5184   }
   5185 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   5186 do_test boundary2-2.45.ge.1 {
   5187   db eval {
   5188     SELECT a FROM t1 WHERE r >= 268435455 ORDER BY a
   5189   }
   5190 } {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}
   5191 do_test boundary2-2.45.ge.2 {
   5192   db eval {
   5193     SELECT a FROM t1 WHERE r >= 268435455 ORDER BY a DESC
   5194   }
   5195 } {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}
   5196 do_test boundary2-2.45.ge.3 {
   5197   db eval {
   5198     SELECT a FROM t1 WHERE r >= 268435455 ORDER BY r
   5199   }
   5200 } {12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   5201 do_test boundary2-2.45.ge.4 {
   5202   db eval {
   5203     SELECT a FROM t1 WHERE r >= 268435455 ORDER BY r DESC
   5204   }
   5205 } {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}
   5206 do_test boundary2-2.45.ge.5 {
   5207   db eval {
   5208     SELECT a FROM t1 WHERE r >= 268435455 ORDER BY x
   5209   }
   5210 } {12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   5211 do_test boundary2-2.45.lt.1 {
   5212   db eval {
   5213     SELECT a FROM t1 WHERE r < 268435455 ORDER BY a
   5214   }
   5215 } {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}
   5216 do_test boundary2-2.45.lt.2 {
   5217   db eval {
   5218     SELECT a FROM t1 WHERE r < 268435455 ORDER BY a DESC
   5219   }
   5220 } {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}
   5221 do_test boundary2-2.45.lt.3 {
   5222   db eval {
   5223     SELECT a FROM t1 WHERE r < 268435455 ORDER BY r
   5224   }
   5225 } {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}
   5226 do_test boundary2-2.45.lt.4 {
   5227   db eval {
   5228     SELECT a FROM t1 WHERE r < 268435455 ORDER BY r DESC
   5229   }
   5230 } {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}
   5231 do_test boundary2-2.45.lt.5 {
   5232   db eval {
   5233     SELECT a FROM t1 WHERE r < 268435455 ORDER BY x
   5234   }
   5235 } {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}
   5236 do_test boundary2-2.45.le.1 {
   5237   db eval {
   5238     SELECT a FROM t1 WHERE r <= 268435455 ORDER BY a
   5239   }
   5240 } {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}
   5241 do_test boundary2-2.45.le.2 {
   5242   db eval {
   5243     SELECT a FROM t1 WHERE r <= 268435455 ORDER BY a DESC
   5244   }
   5245 } {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}
   5246 do_test boundary2-2.45.le.3 {
   5247   db eval {
   5248     SELECT a FROM t1 WHERE r <= 268435455 ORDER BY r
   5249   }
   5250 } {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}
   5251 do_test boundary2-2.45.le.4 {
   5252   db eval {
   5253     SELECT a FROM t1 WHERE r <= 268435455 ORDER BY r DESC
   5254   }
   5255 } {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}
   5256 do_test boundary2-2.45.le.5 {
   5257   db eval {
   5258     SELECT a FROM t1 WHERE r <= 268435455 ORDER BY x
   5259   }
   5260 } {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}
   5261 do_test boundary2-2.46.1 {
   5262   db eval {
   5263     SELECT * FROM t1 WHERE r=-9223372036854775808
   5264   }
   5265 } {-9223372036854775808 55 8000000000000000}
   5266 do_test boundary2-2.46.2 {
   5267   db eval {
   5268     SELECT r, a FROM t1 WHERE x='8000000000000000'
   5269   }
   5270 } {-9223372036854775808 55}
   5271 do_test boundary2-2.46.3 {
   5272   db eval {
   5273     SELECT r, x FROM t1 WHERE a=55
   5274   }
   5275 } {-9223372036854775808 8000000000000000}
   5276 do_test boundary2-2.46.gt.1 {
   5277   db eval {
   5278     SELECT a FROM t1 WHERE r > -9223372036854775808 ORDER BY a
   5279   }
   5280 } {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}
   5281 do_test boundary2-2.46.gt.2 {
   5282   db eval {
   5283     SELECT a FROM t1 WHERE r > -9223372036854775808 ORDER BY a DESC
   5284   }
   5285 } {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}
   5286 do_test boundary2-2.46.gt.3 {
   5287   db eval {
   5288     SELECT a FROM t1 WHERE r > -9223372036854775808 ORDER BY r
   5289   }
   5290 } {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}
   5291 do_test boundary2-2.46.gt.4 {
   5292   db eval {
   5293     SELECT a FROM t1 WHERE r > -9223372036854775808 ORDER BY r DESC
   5294   }
   5295 } {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}
   5296 do_test boundary2-2.46.gt.5 {
   5297   db eval {
   5298     SELECT a FROM t1 WHERE r > -9223372036854775808 ORDER BY x
   5299   }
   5300 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   5301 do_test boundary2-2.46.ge.1 {
   5302   db eval {
   5303     SELECT a FROM t1 WHERE r >= -9223372036854775808 ORDER BY a
   5304   }
   5305 } {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}
   5306 do_test boundary2-2.46.ge.2 {
   5307   db eval {
   5308     SELECT a FROM t1 WHERE r >= -9223372036854775808 ORDER BY a DESC
   5309   }
   5310 } {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}
   5311 do_test boundary2-2.46.ge.3 {
   5312   db eval {
   5313     SELECT a FROM t1 WHERE r >= -9223372036854775808 ORDER BY r
   5314   }
   5315 } {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}
   5316 do_test boundary2-2.46.ge.4 {
   5317   db eval {
   5318     SELECT a FROM t1 WHERE r >= -9223372036854775808 ORDER BY r DESC
   5319   }
   5320 } {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}
   5321 do_test boundary2-2.46.ge.5 {
   5322   db eval {
   5323     SELECT a FROM t1 WHERE r >= -9223372036854775808 ORDER BY x
   5324   }
   5325 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   5326 do_test boundary2-2.46.lt.1 {
   5327   db eval {
   5328     SELECT a FROM t1 WHERE r < -9223372036854775808 ORDER BY a
   5329   }
   5330 } {}
   5331 do_test boundary2-2.46.lt.2 {
   5332   db eval {
   5333     SELECT a FROM t1 WHERE r < -9223372036854775808 ORDER BY a DESC
   5334   }
   5335 } {}
   5336 do_test boundary2-2.46.lt.3 {
   5337   db eval {
   5338     SELECT a FROM t1 WHERE r < -9223372036854775808 ORDER BY r
   5339   }
   5340 } {}
   5341 do_test boundary2-2.46.lt.4 {
   5342   db eval {
   5343     SELECT a FROM t1 WHERE r < -9223372036854775808 ORDER BY r DESC
   5344   }
   5345 } {}
   5346 do_test boundary2-2.46.lt.5 {
   5347   db eval {
   5348     SELECT a FROM t1 WHERE r < -9223372036854775808 ORDER BY x
   5349   }
   5350 } {}
   5351 do_test boundary2-2.46.le.1 {
   5352   db eval {
   5353     SELECT a FROM t1 WHERE r <= -9223372036854775808 ORDER BY a
   5354   }
   5355 } {55}
   5356 do_test boundary2-2.46.le.2 {
   5357   db eval {
   5358     SELECT a FROM t1 WHERE r <= -9223372036854775808 ORDER BY a DESC
   5359   }
   5360 } {55}
   5361 do_test boundary2-2.46.le.3 {
   5362   db eval {
   5363     SELECT a FROM t1 WHERE r <= -9223372036854775808 ORDER BY r
   5364   }
   5365 } {55}
   5366 do_test boundary2-2.46.le.4 {
   5367   db eval {
   5368     SELECT a FROM t1 WHERE r <= -9223372036854775808 ORDER BY r DESC
   5369   }
   5370 } {55}
   5371 do_test boundary2-2.46.le.5 {
   5372   db eval {
   5373     SELECT a FROM t1 WHERE r <= -9223372036854775808 ORDER BY x
   5374   }
   5375 } {55}
   5376 do_test boundary2-2.47.1 {
   5377   db eval {
   5378     SELECT * FROM t1 WHERE r=562949953421312
   5379   }
   5380 } {562949953421312 43 0002000000000000}
   5381 do_test boundary2-2.47.2 {
   5382   db eval {
   5383     SELECT r, a FROM t1 WHERE x='0002000000000000'
   5384   }
   5385 } {562949953421312 43}
   5386 do_test boundary2-2.47.3 {
   5387   db eval {
   5388     SELECT r, x FROM t1 WHERE a=43
   5389   }
   5390 } {562949953421312 0002000000000000}
   5391 do_test boundary2-2.47.gt.1 {
   5392   db eval {
   5393     SELECT a FROM t1 WHERE r > 562949953421312 ORDER BY a
   5394   }
   5395 } {3 17 27 28 45}
   5396 do_test boundary2-2.47.gt.2 {
   5397   db eval {
   5398     SELECT a FROM t1 WHERE r > 562949953421312 ORDER BY a DESC
   5399   }
   5400 } {45 28 27 17 3}
   5401 do_test boundary2-2.47.gt.3 {
   5402   db eval {
   5403     SELECT a FROM t1 WHERE r > 562949953421312 ORDER BY r
   5404   }
   5405 } {27 45 17 28 3}
   5406 do_test boundary2-2.47.gt.4 {
   5407   db eval {
   5408     SELECT a FROM t1 WHERE r > 562949953421312 ORDER BY r DESC
   5409   }
   5410 } {3 28 17 45 27}
   5411 do_test boundary2-2.47.gt.5 {
   5412   db eval {
   5413     SELECT a FROM t1 WHERE r > 562949953421312 ORDER BY x
   5414   }
   5415 } {27 45 17 28 3}
   5416 do_test boundary2-2.47.ge.1 {
   5417   db eval {
   5418     SELECT a FROM t1 WHERE r >= 562949953421312 ORDER BY a
   5419   }
   5420 } {3 17 27 28 43 45}
   5421 do_test boundary2-2.47.ge.2 {
   5422   db eval {
   5423     SELECT a FROM t1 WHERE r >= 562949953421312 ORDER BY a DESC
   5424   }
   5425 } {45 43 28 27 17 3}
   5426 do_test boundary2-2.47.ge.3 {
   5427   db eval {
   5428     SELECT a FROM t1 WHERE r >= 562949953421312 ORDER BY r
   5429   }
   5430 } {43 27 45 17 28 3}
   5431 do_test boundary2-2.47.ge.4 {
   5432   db eval {
   5433     SELECT a FROM t1 WHERE r >= 562949953421312 ORDER BY r DESC
   5434   }
   5435 } {3 28 17 45 27 43}
   5436 do_test boundary2-2.47.ge.5 {
   5437   db eval {
   5438     SELECT a FROM t1 WHERE r >= 562949953421312 ORDER BY x
   5439   }
   5440 } {43 27 45 17 28 3}
   5441 do_test boundary2-2.47.lt.1 {
   5442   db eval {
   5443     SELECT a FROM t1 WHERE r < 562949953421312 ORDER BY a
   5444   }
   5445 } {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}
   5446 do_test boundary2-2.47.lt.2 {
   5447   db eval {
   5448     SELECT a FROM t1 WHERE r < 562949953421312 ORDER BY a DESC
   5449   }
   5450 } {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}
   5451 do_test boundary2-2.47.lt.3 {
   5452   db eval {
   5453     SELECT a FROM t1 WHERE r < 562949953421312 ORDER BY r
   5454   }
   5455 } {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}
   5456 do_test boundary2-2.47.lt.4 {
   5457   db eval {
   5458     SELECT a FROM t1 WHERE r < 562949953421312 ORDER BY r DESC
   5459   }
   5460 } {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}
   5461 do_test boundary2-2.47.lt.5 {
   5462   db eval {
   5463     SELECT a FROM t1 WHERE r < 562949953421312 ORDER BY x
   5464   }
   5465 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 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}
   5466 do_test boundary2-2.47.le.1 {
   5467   db eval {
   5468     SELECT a FROM t1 WHERE r <= 562949953421312 ORDER BY a
   5469   }
   5470 } {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}
   5471 do_test boundary2-2.47.le.2 {
   5472   db eval {
   5473     SELECT a FROM t1 WHERE r <= 562949953421312 ORDER BY a DESC
   5474   }
   5475 } {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}
   5476 do_test boundary2-2.47.le.3 {
   5477   db eval {
   5478     SELECT a FROM t1 WHERE r <= 562949953421312 ORDER BY r
   5479   }
   5480 } {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}
   5481 do_test boundary2-2.47.le.4 {
   5482   db eval {
   5483     SELECT a FROM t1 WHERE r <= 562949953421312 ORDER BY r DESC
   5484   }
   5485 } {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}
   5486 do_test boundary2-2.47.le.5 {
   5487   db eval {
   5488     SELECT a FROM t1 WHERE r <= 562949953421312 ORDER BY x
   5489   }
   5490 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 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}
   5491 do_test boundary2-2.48.1 {
   5492   db eval {
   5493     SELECT * FROM t1 WHERE r=-8388609
   5494   }
   5495 } {-8388609 1 ffffffffff7fffff}
   5496 do_test boundary2-2.48.2 {
   5497   db eval {
   5498     SELECT r, a FROM t1 WHERE x='ffffffffff7fffff'
   5499   }
   5500 } {-8388609 1}
   5501 do_test boundary2-2.48.3 {
   5502   db eval {
   5503     SELECT r, x FROM t1 WHERE a=1
   5504   }
   5505 } {-8388609 ffffffffff7fffff}
   5506 do_test boundary2-2.48.gt.1 {
   5507   db eval {
   5508     SELECT a FROM t1 WHERE r > -8388609 ORDER BY a
   5509   }
   5510 } {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}
   5511 do_test boundary2-2.48.gt.2 {
   5512   db eval {
   5513     SELECT a FROM t1 WHERE r > -8388609 ORDER BY a DESC
   5514   }
   5515 } {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}
   5516 do_test boundary2-2.48.gt.3 {
   5517   db eval {
   5518     SELECT a FROM t1 WHERE r > -8388609 ORDER BY r
   5519   }
   5520 } {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}
   5521 do_test boundary2-2.48.gt.4 {
   5522   db eval {
   5523     SELECT a FROM t1 WHERE r > -8388609 ORDER BY r DESC
   5524   }
   5525 } {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}
   5526 do_test boundary2-2.48.gt.5 {
   5527   db eval {
   5528     SELECT a FROM t1 WHERE r > -8388609 ORDER BY x
   5529   }
   5530 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   5531 do_test boundary2-2.48.ge.1 {
   5532   db eval {
   5533     SELECT a FROM t1 WHERE r >= -8388609 ORDER BY a
   5534   }
   5535 } {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}
   5536 do_test boundary2-2.48.ge.2 {
   5537   db eval {
   5538     SELECT a FROM t1 WHERE r >= -8388609 ORDER BY a DESC
   5539   }
   5540 } {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}
   5541 do_test boundary2-2.48.ge.3 {
   5542   db eval {
   5543     SELECT a FROM t1 WHERE r >= -8388609 ORDER BY r
   5544   }
   5545 } {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}
   5546 do_test boundary2-2.48.ge.4 {
   5547   db eval {
   5548     SELECT a FROM t1 WHERE r >= -8388609 ORDER BY r DESC
   5549   }
   5550 } {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}
   5551 do_test boundary2-2.48.ge.5 {
   5552   db eval {
   5553     SELECT a FROM t1 WHERE r >= -8388609 ORDER BY x
   5554   }
   5555 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   5556 do_test boundary2-2.48.lt.1 {
   5557   db eval {
   5558     SELECT a FROM t1 WHERE r < -8388609 ORDER BY a
   5559   }
   5560 } {2 11 21 44 47 55 58 63 64}
   5561 do_test boundary2-2.48.lt.2 {
   5562   db eval {
   5563     SELECT a FROM t1 WHERE r < -8388609 ORDER BY a DESC
   5564   }
   5565 } {64 63 58 55 47 44 21 11 2}
   5566 do_test boundary2-2.48.lt.3 {
   5567   db eval {
   5568     SELECT a FROM t1 WHERE r < -8388609 ORDER BY r
   5569   }
   5570 } {55 2 64 21 44 58 63 47 11}
   5571 do_test boundary2-2.48.lt.4 {
   5572   db eval {
   5573     SELECT a FROM t1 WHERE r < -8388609 ORDER BY r DESC
   5574   }
   5575 } {11 47 63 58 44 21 64 2 55}
   5576 do_test boundary2-2.48.lt.5 {
   5577   db eval {
   5578     SELECT a FROM t1 WHERE r < -8388609 ORDER BY x
   5579   }
   5580 } {55 2 64 21 44 58 63 47 11}
   5581 do_test boundary2-2.48.le.1 {
   5582   db eval {
   5583     SELECT a FROM t1 WHERE r <= -8388609 ORDER BY a
   5584   }
   5585 } {1 2 11 21 44 47 55 58 63 64}
   5586 do_test boundary2-2.48.le.2 {
   5587   db eval {
   5588     SELECT a FROM t1 WHERE r <= -8388609 ORDER BY a DESC
   5589   }
   5590 } {64 63 58 55 47 44 21 11 2 1}
   5591 do_test boundary2-2.48.le.3 {
   5592   db eval {
   5593     SELECT a FROM t1 WHERE r <= -8388609 ORDER BY r
   5594   }
   5595 } {55 2 64 21 44 58 63 47 11 1}
   5596 do_test boundary2-2.48.le.4 {
   5597   db eval {
   5598     SELECT a FROM t1 WHERE r <= -8388609 ORDER BY r DESC
   5599   }
   5600 } {1 11 47 63 58 44 21 64 2 55}
   5601 do_test boundary2-2.48.le.5 {
   5602   db eval {
   5603     SELECT a FROM t1 WHERE r <= -8388609 ORDER BY x
   5604   }
   5605 } {55 2 64 21 44 58 63 47 11 1}
   5606 do_test boundary2-2.49.1 {
   5607   db eval {
   5608     SELECT * FROM t1 WHERE r=16777215
   5609   }
   5610 } {16777215 9 0000000000ffffff}
   5611 do_test boundary2-2.49.2 {
   5612   db eval {
   5613     SELECT r, a FROM t1 WHERE x='0000000000ffffff'
   5614   }
   5615 } {16777215 9}
   5616 do_test boundary2-2.49.3 {
   5617   db eval {
   5618     SELECT r, x FROM t1 WHERE a=9
   5619   }
   5620 } {16777215 0000000000ffffff}
   5621 do_test boundary2-2.49.gt.1 {
   5622   db eval {
   5623     SELECT a FROM t1 WHERE r > 16777215 ORDER BY a
   5624   }
   5625 } {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}
   5626 do_test boundary2-2.49.gt.2 {
   5627   db eval {
   5628     SELECT a FROM t1 WHERE r > 16777215 ORDER BY a DESC
   5629   }
   5630 } {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}
   5631 do_test boundary2-2.49.gt.3 {
   5632   db eval {
   5633     SELECT a FROM t1 WHERE r > 16777215 ORDER BY r
   5634   }
   5635 } {6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   5636 do_test boundary2-2.49.gt.4 {
   5637   db eval {
   5638     SELECT a FROM t1 WHERE r > 16777215 ORDER BY r DESC
   5639   }
   5640 } {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}
   5641 do_test boundary2-2.49.gt.5 {
   5642   db eval {
   5643     SELECT a FROM t1 WHERE r > 16777215 ORDER BY x
   5644   }
   5645 } {6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   5646 do_test boundary2-2.49.ge.1 {
   5647   db eval {
   5648     SELECT a FROM t1 WHERE r >= 16777215 ORDER BY a
   5649   }
   5650 } {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}
   5651 do_test boundary2-2.49.ge.2 {
   5652   db eval {
   5653     SELECT a FROM t1 WHERE r >= 16777215 ORDER BY a DESC
   5654   }
   5655 } {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}
   5656 do_test boundary2-2.49.ge.3 {
   5657   db eval {
   5658     SELECT a FROM t1 WHERE r >= 16777215 ORDER BY r
   5659   }
   5660 } {9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   5661 do_test boundary2-2.49.ge.4 {
   5662   db eval {
   5663     SELECT a FROM t1 WHERE r >= 16777215 ORDER BY r DESC
   5664   }
   5665 } {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}
   5666 do_test boundary2-2.49.ge.5 {
   5667   db eval {
   5668     SELECT a FROM t1 WHERE r >= 16777215 ORDER BY x
   5669   }
   5670 } {9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   5671 do_test boundary2-2.49.lt.1 {
   5672   db eval {
   5673     SELECT a FROM t1 WHERE r < 16777215 ORDER BY a
   5674   }
   5675 } {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}
   5676 do_test boundary2-2.49.lt.2 {
   5677   db eval {
   5678     SELECT a FROM t1 WHERE r < 16777215 ORDER BY a DESC
   5679   }
   5680 } {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}
   5681 do_test boundary2-2.49.lt.3 {
   5682   db eval {
   5683     SELECT a FROM t1 WHERE r < 16777215 ORDER BY r
   5684   }
   5685 } {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}
   5686 do_test boundary2-2.49.lt.4 {
   5687   db eval {
   5688     SELECT a FROM t1 WHERE r < 16777215 ORDER BY r DESC
   5689   }
   5690 } {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}
   5691 do_test boundary2-2.49.lt.5 {
   5692   db eval {
   5693     SELECT a FROM t1 WHERE r < 16777215 ORDER BY x
   5694   }
   5695 } {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}
   5696 do_test boundary2-2.49.le.1 {
   5697   db eval {
   5698     SELECT a FROM t1 WHERE r <= 16777215 ORDER BY a
   5699   }
   5700 } {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}
   5701 do_test boundary2-2.49.le.2 {
   5702   db eval {
   5703     SELECT a FROM t1 WHERE r <= 16777215 ORDER BY a DESC
   5704   }
   5705 } {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}
   5706 do_test boundary2-2.49.le.3 {
   5707   db eval {
   5708     SELECT a FROM t1 WHERE r <= 16777215 ORDER BY r
   5709   }
   5710 } {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}
   5711 do_test boundary2-2.49.le.4 {
   5712   db eval {
   5713     SELECT a FROM t1 WHERE r <= 16777215 ORDER BY r DESC
   5714   }
   5715 } {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}
   5716 do_test boundary2-2.49.le.5 {
   5717   db eval {
   5718     SELECT a FROM t1 WHERE r <= 16777215 ORDER BY x
   5719   }
   5720 } {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}
   5721 do_test boundary2-2.50.1 {
   5722   db eval {
   5723     SELECT * FROM t1 WHERE r=8388608
   5724   }
   5725 } {8388608 24 0000000000800000}
   5726 do_test boundary2-2.50.2 {
   5727   db eval {
   5728     SELECT r, a FROM t1 WHERE x='0000000000800000'
   5729   }
   5730 } {8388608 24}
   5731 do_test boundary2-2.50.3 {
   5732   db eval {
   5733     SELECT r, x FROM t1 WHERE a=24
   5734   }
   5735 } {8388608 0000000000800000}
   5736 do_test boundary2-2.50.gt.1 {
   5737   db eval {
   5738     SELECT a FROM t1 WHERE r > 8388608 ORDER BY a
   5739   }
   5740 } {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}
   5741 do_test boundary2-2.50.gt.2 {
   5742   db eval {
   5743     SELECT a FROM t1 WHERE r > 8388608 ORDER BY a DESC
   5744   }
   5745 } {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}
   5746 do_test boundary2-2.50.gt.3 {
   5747   db eval {
   5748     SELECT a FROM t1 WHERE r > 8388608 ORDER BY r
   5749   }
   5750 } {9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   5751 do_test boundary2-2.50.gt.4 {
   5752   db eval {
   5753     SELECT a FROM t1 WHERE r > 8388608 ORDER BY r DESC
   5754   }
   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}
   5756 do_test boundary2-2.50.gt.5 {
   5757   db eval {
   5758     SELECT a FROM t1 WHERE r > 8388608 ORDER BY x
   5759   }
   5760 } {9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   5761 do_test boundary2-2.50.ge.1 {
   5762   db eval {
   5763     SELECT a FROM t1 WHERE r >= 8388608 ORDER BY a
   5764   }
   5765 } {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}
   5766 do_test boundary2-2.50.ge.2 {
   5767   db eval {
   5768     SELECT a FROM t1 WHERE r >= 8388608 ORDER BY a DESC
   5769   }
   5770 } {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}
   5771 do_test boundary2-2.50.ge.3 {
   5772   db eval {
   5773     SELECT a FROM t1 WHERE r >= 8388608 ORDER BY r
   5774   }
   5775 } {24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   5776 do_test boundary2-2.50.ge.4 {
   5777   db eval {
   5778     SELECT a FROM t1 WHERE r >= 8388608 ORDER BY r DESC
   5779   }
   5780 } {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}
   5781 do_test boundary2-2.50.ge.5 {
   5782   db eval {
   5783     SELECT a FROM t1 WHERE r >= 8388608 ORDER BY x
   5784   }
   5785 } {24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   5786 do_test boundary2-2.50.lt.1 {
   5787   db eval {
   5788     SELECT a FROM t1 WHERE r < 8388608 ORDER BY a
   5789   }
   5790 } {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}
   5791 do_test boundary2-2.50.lt.2 {
   5792   db eval {
   5793     SELECT a FROM t1 WHERE r < 8388608 ORDER BY a DESC
   5794   }
   5795 } {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}
   5796 do_test boundary2-2.50.lt.3 {
   5797   db eval {
   5798     SELECT a FROM t1 WHERE r < 8388608 ORDER BY r
   5799   }
   5800 } {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}
   5801 do_test boundary2-2.50.lt.4 {
   5802   db eval {
   5803     SELECT a FROM t1 WHERE r < 8388608 ORDER BY r DESC
   5804   }
   5805 } {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}
   5806 do_test boundary2-2.50.lt.5 {
   5807   db eval {
   5808     SELECT a FROM t1 WHERE r < 8388608 ORDER BY x
   5809   }
   5810 } {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}
   5811 do_test boundary2-2.50.le.1 {
   5812   db eval {
   5813     SELECT a FROM t1 WHERE r <= 8388608 ORDER BY a
   5814   }
   5815 } {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}
   5816 do_test boundary2-2.50.le.2 {
   5817   db eval {
   5818     SELECT a FROM t1 WHERE r <= 8388608 ORDER BY a DESC
   5819   }
   5820 } {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}
   5821 do_test boundary2-2.50.le.3 {
   5822   db eval {
   5823     SELECT a FROM t1 WHERE r <= 8388608 ORDER BY r
   5824   }
   5825 } {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}
   5826 do_test boundary2-2.50.le.4 {
   5827   db eval {
   5828     SELECT a FROM t1 WHERE r <= 8388608 ORDER BY r DESC
   5829   }
   5830 } {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}
   5831 do_test boundary2-2.50.le.5 {
   5832   db eval {
   5833     SELECT a FROM t1 WHERE r <= 8388608 ORDER BY x
   5834   }
   5835 } {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}
   5836 do_test boundary2-2.51.1 {
   5837   db eval {
   5838     SELECT * FROM t1 WHERE r=16383
   5839   }
   5840 } {16383 8 0000000000003fff}
   5841 do_test boundary2-2.51.2 {
   5842   db eval {
   5843     SELECT r, a FROM t1 WHERE x='0000000000003fff'
   5844   }
   5845 } {16383 8}
   5846 do_test boundary2-2.51.3 {
   5847   db eval {
   5848     SELECT r, x FROM t1 WHERE a=8
   5849   }
   5850 } {16383 0000000000003fff}
   5851 do_test boundary2-2.51.gt.1 {
   5852   db eval {
   5853     SELECT a FROM t1 WHERE r > 16383 ORDER BY a
   5854   }
   5855 } {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}
   5856 do_test boundary2-2.51.gt.2 {
   5857   db eval {
   5858     SELECT a FROM t1 WHERE r > 16383 ORDER BY a DESC
   5859   }
   5860 } {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}
   5861 do_test boundary2-2.51.gt.3 {
   5862   db eval {
   5863     SELECT a FROM t1 WHERE r > 16383 ORDER BY r
   5864   }
   5865 } {16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   5866 do_test boundary2-2.51.gt.4 {
   5867   db eval {
   5868     SELECT a FROM t1 WHERE r > 16383 ORDER BY r DESC
   5869   }
   5870 } {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}
   5871 do_test boundary2-2.51.gt.5 {
   5872   db eval {
   5873     SELECT a FROM t1 WHERE r > 16383 ORDER BY x
   5874   }
   5875 } {16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   5876 do_test boundary2-2.51.ge.1 {
   5877   db eval {
   5878     SELECT a FROM t1 WHERE r >= 16383 ORDER BY a
   5879   }
   5880 } {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}
   5881 do_test boundary2-2.51.ge.2 {
   5882   db eval {
   5883     SELECT a FROM t1 WHERE r >= 16383 ORDER BY a DESC
   5884   }
   5885 } {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}
   5886 do_test boundary2-2.51.ge.3 {
   5887   db eval {
   5888     SELECT a FROM t1 WHERE r >= 16383 ORDER BY r
   5889   }
   5890 } {8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   5891 do_test boundary2-2.51.ge.4 {
   5892   db eval {
   5893     SELECT a FROM t1 WHERE r >= 16383 ORDER BY r DESC
   5894   }
   5895 } {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}
   5896 do_test boundary2-2.51.ge.5 {
   5897   db eval {
   5898     SELECT a FROM t1 WHERE r >= 16383 ORDER BY x
   5899   }
   5900 } {8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   5901 do_test boundary2-2.51.lt.1 {
   5902   db eval {
   5903     SELECT a FROM t1 WHERE r < 16383 ORDER BY a
   5904   }
   5905 } {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}
   5906 do_test boundary2-2.51.lt.2 {
   5907   db eval {
   5908     SELECT a FROM t1 WHERE r < 16383 ORDER BY a DESC
   5909   }
   5910 } {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}
   5911 do_test boundary2-2.51.lt.3 {
   5912   db eval {
   5913     SELECT a FROM t1 WHERE r < 16383 ORDER BY r
   5914   }
   5915 } {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}
   5916 do_test boundary2-2.51.lt.4 {
   5917   db eval {
   5918     SELECT a FROM t1 WHERE r < 16383 ORDER BY r DESC
   5919   }
   5920 } {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}
   5921 do_test boundary2-2.51.lt.5 {
   5922   db eval {
   5923     SELECT a FROM t1 WHERE r < 16383 ORDER BY x
   5924   }
   5925 } {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}
   5926 do_test boundary2-2.51.le.1 {
   5927   db eval {
   5928     SELECT a FROM t1 WHERE r <= 16383 ORDER BY a
   5929   }
   5930 } {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}
   5931 do_test boundary2-2.51.le.2 {
   5932   db eval {
   5933     SELECT a FROM t1 WHERE r <= 16383 ORDER BY a DESC
   5934   }
   5935 } {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}
   5936 do_test boundary2-2.51.le.3 {
   5937   db eval {
   5938     SELECT a FROM t1 WHERE r <= 16383 ORDER BY r
   5939   }
   5940 } {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}
   5941 do_test boundary2-2.51.le.4 {
   5942   db eval {
   5943     SELECT a FROM t1 WHERE r <= 16383 ORDER BY r DESC
   5944   }
   5945 } {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}
   5946 do_test boundary2-2.51.le.5 {
   5947   db eval {
   5948     SELECT a FROM t1 WHERE r <= 16383 ORDER BY x
   5949   }
   5950 } {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}
   5951 do_test boundary2-2.52.1 {
   5952   db eval {
   5953     SELECT * FROM t1 WHERE r=140737488355328
   5954   }
   5955 } {140737488355328 34 0000800000000000}
   5956 do_test boundary2-2.52.2 {
   5957   db eval {
   5958     SELECT r, a FROM t1 WHERE x='0000800000000000'
   5959   }
   5960 } {140737488355328 34}
   5961 do_test boundary2-2.52.3 {
   5962   db eval {
   5963     SELECT r, x FROM t1 WHERE a=34
   5964   }
   5965 } {140737488355328 0000800000000000}
   5966 do_test boundary2-2.52.gt.1 {
   5967   db eval {
   5968     SELECT a FROM t1 WHERE r > 140737488355328 ORDER BY a
   5969   }
   5970 } {3 10 13 17 26 27 28 43 45}
   5971 do_test boundary2-2.52.gt.2 {
   5972   db eval {
   5973     SELECT a FROM t1 WHERE r > 140737488355328 ORDER BY a DESC
   5974   }
   5975 } {45 43 28 27 26 17 13 10 3}
   5976 do_test boundary2-2.52.gt.3 {
   5977   db eval {
   5978     SELECT a FROM t1 WHERE r > 140737488355328 ORDER BY r
   5979   }
   5980 } {10 26 13 43 27 45 17 28 3}
   5981 do_test boundary2-2.52.gt.4 {
   5982   db eval {
   5983     SELECT a FROM t1 WHERE r > 140737488355328 ORDER BY r DESC
   5984   }
   5985 } {3 28 17 45 27 43 13 26 10}
   5986 do_test boundary2-2.52.gt.5 {
   5987   db eval {
   5988     SELECT a FROM t1 WHERE r > 140737488355328 ORDER BY x
   5989   }
   5990 } {10 26 13 43 27 45 17 28 3}
   5991 do_test boundary2-2.52.ge.1 {
   5992   db eval {
   5993     SELECT a FROM t1 WHERE r >= 140737488355328 ORDER BY a
   5994   }
   5995 } {3 10 13 17 26 27 28 34 43 45}
   5996 do_test boundary2-2.52.ge.2 {
   5997   db eval {
   5998     SELECT a FROM t1 WHERE r >= 140737488355328 ORDER BY a DESC
   5999   }
   6000 } {45 43 34 28 27 26 17 13 10 3}
   6001 do_test boundary2-2.52.ge.3 {
   6002   db eval {
   6003     SELECT a FROM t1 WHERE r >= 140737488355328 ORDER BY r
   6004   }
   6005 } {34 10 26 13 43 27 45 17 28 3}
   6006 do_test boundary2-2.52.ge.4 {
   6007   db eval {
   6008     SELECT a FROM t1 WHERE r >= 140737488355328 ORDER BY r DESC
   6009   }
   6010 } {3 28 17 45 27 43 13 26 10 34}
   6011 do_test boundary2-2.52.ge.5 {
   6012   db eval {
   6013     SELECT a FROM t1 WHERE r >= 140737488355328 ORDER BY x
   6014   }
   6015 } {34 10 26 13 43 27 45 17 28 3}
   6016 do_test boundary2-2.52.lt.1 {
   6017   db eval {
   6018     SELECT a FROM t1 WHERE r < 140737488355328 ORDER BY a
   6019   }
   6020 } {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}
   6021 do_test boundary2-2.52.lt.2 {
   6022   db eval {
   6023     SELECT a FROM t1 WHERE r < 140737488355328 ORDER BY a DESC
   6024   }
   6025 } {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}
   6026 do_test boundary2-2.52.lt.3 {
   6027   db eval {
   6028     SELECT a FROM t1 WHERE r < 140737488355328 ORDER BY r
   6029   }
   6030 } {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}
   6031 do_test boundary2-2.52.lt.4 {
   6032   db eval {
   6033     SELECT a FROM t1 WHERE r < 140737488355328 ORDER BY r DESC
   6034   }
   6035 } {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}
   6036 do_test boundary2-2.52.lt.5 {
   6037   db eval {
   6038     SELECT a FROM t1 WHERE r < 140737488355328 ORDER BY x
   6039   }
   6040 } {59 60 41 5 31 4 49 30 61 8 16 23 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}
   6041 do_test boundary2-2.52.le.1 {
   6042   db eval {
   6043     SELECT a FROM t1 WHERE r <= 140737488355328 ORDER BY a
   6044   }
   6045 } {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}
   6046 do_test boundary2-2.52.le.2 {
   6047   db eval {
   6048     SELECT a FROM t1 WHERE r <= 140737488355328 ORDER BY a DESC
   6049   }
   6050 } {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}
   6051 do_test boundary2-2.52.le.3 {
   6052   db eval {
   6053     SELECT a FROM t1 WHERE r <= 140737488355328 ORDER BY r
   6054   }
   6055 } {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}
   6056 do_test boundary2-2.52.le.4 {
   6057   db eval {
   6058     SELECT a FROM t1 WHERE r <= 140737488355328 ORDER BY r DESC
   6059   }
   6060 } {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}
   6061 do_test boundary2-2.52.le.5 {
   6062   db eval {
   6063     SELECT a FROM t1 WHERE r <= 140737488355328 ORDER BY x
   6064   }
   6065 } {59 60 41 5 31 4 49 30 61 8 16 23 50 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}
   6066 do_test boundary2-2.53.1 {
   6067   db eval {
   6068     SELECT * FROM t1 WHERE r=2097151
   6069   }
   6070 } {2097151 15 00000000001fffff}
   6071 do_test boundary2-2.53.2 {
   6072   db eval {
   6073     SELECT r, a FROM t1 WHERE x='00000000001fffff'
   6074   }
   6075 } {2097151 15}
   6076 do_test boundary2-2.53.3 {
   6077   db eval {
   6078     SELECT r, x FROM t1 WHERE a=15
   6079   }
   6080 } {2097151 00000000001fffff}
   6081 do_test boundary2-2.53.gt.1 {
   6082   db eval {
   6083     SELECT a FROM t1 WHERE r > 2097151 ORDER BY a
   6084   }
   6085 } {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}
   6086 do_test boundary2-2.53.gt.2 {
   6087   db eval {
   6088     SELECT a FROM t1 WHERE r > 2097151 ORDER BY a DESC
   6089   }
   6090 } {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}
   6091 do_test boundary2-2.53.gt.3 {
   6092   db eval {
   6093     SELECT a FROM t1 WHERE r > 2097151 ORDER BY r
   6094   }
   6095 } {42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   6096 do_test boundary2-2.53.gt.4 {
   6097   db eval {
   6098     SELECT a FROM t1 WHERE r > 2097151 ORDER BY r DESC
   6099   }
   6100 } {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}
   6101 do_test boundary2-2.53.gt.5 {
   6102   db eval {
   6103     SELECT a FROM t1 WHERE r > 2097151 ORDER BY x
   6104   }
   6105 } {42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   6106 do_test boundary2-2.53.ge.1 {
   6107   db eval {
   6108     SELECT a FROM t1 WHERE r >= 2097151 ORDER BY a
   6109   }
   6110 } {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}
   6111 do_test boundary2-2.53.ge.2 {
   6112   db eval {
   6113     SELECT a FROM t1 WHERE r >= 2097151 ORDER BY a DESC
   6114   }
   6115 } {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}
   6116 do_test boundary2-2.53.ge.3 {
   6117   db eval {
   6118     SELECT a FROM t1 WHERE r >= 2097151 ORDER BY r
   6119   }
   6120 } {15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   6121 do_test boundary2-2.53.ge.4 {
   6122   db eval {
   6123     SELECT a FROM t1 WHERE r >= 2097151 ORDER BY r DESC
   6124   }
   6125 } {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}
   6126 do_test boundary2-2.53.ge.5 {
   6127   db eval {
   6128     SELECT a FROM t1 WHERE r >= 2097151 ORDER BY x
   6129   }
   6130 } {15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   6131 do_test boundary2-2.53.lt.1 {
   6132   db eval {
   6133     SELECT a FROM t1 WHERE r < 2097151 ORDER BY a
   6134   }
   6135 } {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}
   6136 do_test boundary2-2.53.lt.2 {
   6137   db eval {
   6138     SELECT a FROM t1 WHERE r < 2097151 ORDER BY a DESC
   6139   }
   6140 } {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}
   6141 do_test boundary2-2.53.lt.3 {
   6142   db eval {
   6143     SELECT a FROM t1 WHERE r < 2097151 ORDER BY r
   6144   }
   6145 } {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}
   6146 do_test boundary2-2.53.lt.4 {
   6147   db eval {
   6148     SELECT a FROM t1 WHERE r < 2097151 ORDER BY r DESC
   6149   }
   6150 } {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}
   6151 do_test boundary2-2.53.lt.5 {
   6152   db eval {
   6153     SELECT a FROM t1 WHERE r < 2097151 ORDER BY x
   6154   }
   6155 } {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}
   6156 do_test boundary2-2.53.le.1 {
   6157   db eval {
   6158     SELECT a FROM t1 WHERE r <= 2097151 ORDER BY a
   6159   }
   6160 } {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}
   6161 do_test boundary2-2.53.le.2 {
   6162   db eval {
   6163     SELECT a FROM t1 WHERE r <= 2097151 ORDER BY a DESC
   6164   }
   6165 } {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}
   6166 do_test boundary2-2.53.le.3 {
   6167   db eval {
   6168     SELECT a FROM t1 WHERE r <= 2097151 ORDER BY r
   6169   }
   6170 } {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}
   6171 do_test boundary2-2.53.le.4 {
   6172   db eval {
   6173     SELECT a FROM t1 WHERE r <= 2097151 ORDER BY r DESC
   6174   }
   6175 } {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}
   6176 do_test boundary2-2.53.le.5 {
   6177   db eval {
   6178     SELECT a FROM t1 WHERE r <= 2097151 ORDER BY x
   6179   }
   6180 } {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}
   6181 do_test boundary2-2.54.1 {
   6182   db eval {
   6183     SELECT * FROM t1 WHERE r=140737488355327
   6184   }
   6185 } {140737488355327 25 00007fffffffffff}
   6186 do_test boundary2-2.54.2 {
   6187   db eval {
   6188     SELECT r, a FROM t1 WHERE x='00007fffffffffff'
   6189   }
   6190 } {140737488355327 25}
   6191 do_test boundary2-2.54.3 {
   6192   db eval {
   6193     SELECT r, x FROM t1 WHERE a=25
   6194   }
   6195 } {140737488355327 00007fffffffffff}
   6196 do_test boundary2-2.54.gt.1 {
   6197   db eval {
   6198     SELECT a FROM t1 WHERE r > 140737488355327 ORDER BY a
   6199   }
   6200 } {3 10 13 17 26 27 28 34 43 45}
   6201 do_test boundary2-2.54.gt.2 {
   6202   db eval {
   6203     SELECT a FROM t1 WHERE r > 140737488355327 ORDER BY a DESC
   6204   }
   6205 } {45 43 34 28 27 26 17 13 10 3}
   6206 do_test boundary2-2.54.gt.3 {
   6207   db eval {
   6208     SELECT a FROM t1 WHERE r > 140737488355327 ORDER BY r
   6209   }
   6210 } {34 10 26 13 43 27 45 17 28 3}
   6211 do_test boundary2-2.54.gt.4 {
   6212   db eval {
   6213     SELECT a FROM t1 WHERE r > 140737488355327 ORDER BY r DESC
   6214   }
   6215 } {3 28 17 45 27 43 13 26 10 34}
   6216 do_test boundary2-2.54.gt.5 {
   6217   db eval {
   6218     SELECT a FROM t1 WHERE r > 140737488355327 ORDER BY x
   6219   }
   6220 } {34 10 26 13 43 27 45 17 28 3}
   6221 do_test boundary2-2.54.ge.1 {
   6222   db eval {
   6223     SELECT a FROM t1 WHERE r >= 140737488355327 ORDER BY a
   6224   }
   6225 } {3 10 13 17 25 26 27 28 34 43 45}
   6226 do_test boundary2-2.54.ge.2 {
   6227   db eval {
   6228     SELECT a FROM t1 WHERE r >= 140737488355327 ORDER BY a DESC
   6229   }
   6230 } {45 43 34 28 27 26 25 17 13 10 3}
   6231 do_test boundary2-2.54.ge.3 {
   6232   db eval {
   6233     SELECT a FROM t1 WHERE r >= 140737488355327 ORDER BY r
   6234   }
   6235 } {25 34 10 26 13 43 27 45 17 28 3}
   6236 do_test boundary2-2.54.ge.4 {
   6237   db eval {
   6238     SELECT a FROM t1 WHERE r >= 140737488355327 ORDER BY r DESC
   6239   }
   6240 } {3 28 17 45 27 43 13 26 10 34 25}
   6241 do_test boundary2-2.54.ge.5 {
   6242   db eval {
   6243     SELECT a FROM t1 WHERE r >= 140737488355327 ORDER BY x
   6244   }
   6245 } {25 34 10 26 13 43 27 45 17 28 3}
   6246 do_test boundary2-2.54.lt.1 {
   6247   db eval {
   6248     SELECT a FROM t1 WHERE r < 140737488355327 ORDER BY a
   6249   }
   6250 } {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}
   6251 do_test boundary2-2.54.lt.2 {
   6252   db eval {
   6253     SELECT a FROM t1 WHERE r < 140737488355327 ORDER BY a DESC
   6254   }
   6255 } {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}
   6256 do_test boundary2-2.54.lt.3 {
   6257   db eval {
   6258     SELECT a FROM t1 WHERE r < 140737488355327 ORDER BY r
   6259   }
   6260 } {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}
   6261 do_test boundary2-2.54.lt.4 {
   6262   db eval {
   6263     SELECT a FROM t1 WHERE r < 140737488355327 ORDER BY r DESC
   6264   }
   6265 } {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}
   6266 do_test boundary2-2.54.lt.5 {
   6267   db eval {
   6268     SELECT a FROM t1 WHERE r < 140737488355327 ORDER BY x
   6269   }
   6270 } {59 60 41 5 31 4 49 30 61 8 16 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}
   6271 do_test boundary2-2.54.le.1 {
   6272   db eval {
   6273     SELECT a FROM t1 WHERE r <= 140737488355327 ORDER BY a
   6274   }
   6275 } {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}
   6276 do_test boundary2-2.54.le.2 {
   6277   db eval {
   6278     SELECT a FROM t1 WHERE r <= 140737488355327 ORDER BY a DESC
   6279   }
   6280 } {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}
   6281 do_test boundary2-2.54.le.3 {
   6282   db eval {
   6283     SELECT a FROM t1 WHERE r <= 140737488355327 ORDER BY r
   6284   }
   6285 } {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}
   6286 do_test boundary2-2.54.le.4 {
   6287   db eval {
   6288     SELECT a FROM t1 WHERE r <= 140737488355327 ORDER BY r DESC
   6289   }
   6290 } {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}
   6291 do_test boundary2-2.54.le.5 {
   6292   db eval {
   6293     SELECT a FROM t1 WHERE r <= 140737488355327 ORDER BY x
   6294   }
   6295 } {59 60 41 5 31 4 49 30 61 8 16 23 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}
   6296 do_test boundary2-2.55.1 {
   6297   db eval {
   6298     SELECT * FROM t1 WHERE r=281474976710656
   6299   }
   6300 } {281474976710656 26 0001000000000000}
   6301 do_test boundary2-2.55.2 {
   6302   db eval {
   6303     SELECT r, a FROM t1 WHERE x='0001000000000000'
   6304   }
   6305 } {281474976710656 26}
   6306 do_test boundary2-2.55.3 {
   6307   db eval {
   6308     SELECT r, x FROM t1 WHERE a=26
   6309   }
   6310 } {281474976710656 0001000000000000}
   6311 do_test boundary2-2.55.gt.1 {
   6312   db eval {
   6313     SELECT a FROM t1 WHERE r > 281474976710656 ORDER BY a
   6314   }
   6315 } {3 13 17 27 28 43 45}
   6316 do_test boundary2-2.55.gt.2 {
   6317   db eval {
   6318     SELECT a FROM t1 WHERE r > 281474976710656 ORDER BY a DESC
   6319   }
   6320 } {45 43 28 27 17 13 3}
   6321 do_test boundary2-2.55.gt.3 {
   6322   db eval {
   6323     SELECT a FROM t1 WHERE r > 281474976710656 ORDER BY r
   6324   }
   6325 } {13 43 27 45 17 28 3}
   6326 do_test boundary2-2.55.gt.4 {
   6327   db eval {
   6328     SELECT a FROM t1 WHERE r > 281474976710656 ORDER BY r DESC
   6329   }
   6330 } {3 28 17 45 27 43 13}
   6331 do_test boundary2-2.55.gt.5 {
   6332   db eval {
   6333     SELECT a FROM t1 WHERE r > 281474976710656 ORDER BY x
   6334   }
   6335 } {13 43 27 45 17 28 3}
   6336 do_test boundary2-2.55.ge.1 {
   6337   db eval {
   6338     SELECT a FROM t1 WHERE r >= 281474976710656 ORDER BY a
   6339   }
   6340 } {3 13 17 26 27 28 43 45}
   6341 do_test boundary2-2.55.ge.2 {
   6342   db eval {
   6343     SELECT a FROM t1 WHERE r >= 281474976710656 ORDER BY a DESC
   6344   }
   6345 } {45 43 28 27 26 17 13 3}
   6346 do_test boundary2-2.55.ge.3 {
   6347   db eval {
   6348     SELECT a FROM t1 WHERE r >= 281474976710656 ORDER BY r
   6349   }
   6350 } {26 13 43 27 45 17 28 3}
   6351 do_test boundary2-2.55.ge.4 {
   6352   db eval {
   6353     SELECT a FROM t1 WHERE r >= 281474976710656 ORDER BY r DESC
   6354   }
   6355 } {3 28 17 45 27 43 13 26}
   6356 do_test boundary2-2.55.ge.5 {
   6357   db eval {
   6358     SELECT a FROM t1 WHERE r >= 281474976710656 ORDER BY x
   6359   }
   6360 } {26 13 43 27 45 17 28 3}
   6361 do_test boundary2-2.55.lt.1 {
   6362   db eval {
   6363     SELECT a FROM t1 WHERE r < 281474976710656 ORDER BY a
   6364   }
   6365 } {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}
   6366 do_test boundary2-2.55.lt.2 {
   6367   db eval {
   6368     SELECT a FROM t1 WHERE r < 281474976710656 ORDER BY a DESC
   6369   }
   6370 } {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}
   6371 do_test boundary2-2.55.lt.3 {
   6372   db eval {
   6373     SELECT a FROM t1 WHERE r < 281474976710656 ORDER BY r
   6374   }
   6375 } {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}
   6376 do_test boundary2-2.55.lt.4 {
   6377   db eval {
   6378     SELECT a FROM t1 WHERE r < 281474976710656 ORDER BY r DESC
   6379   }
   6380 } {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}
   6381 do_test boundary2-2.55.lt.5 {
   6382   db eval {
   6383     SELECT a FROM t1 WHERE r < 281474976710656 ORDER BY x
   6384   }
   6385 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 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}
   6386 do_test boundary2-2.55.le.1 {
   6387   db eval {
   6388     SELECT a FROM t1 WHERE r <= 281474976710656 ORDER BY a
   6389   }
   6390 } {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}
   6391 do_test boundary2-2.55.le.2 {
   6392   db eval {
   6393     SELECT a FROM t1 WHERE r <= 281474976710656 ORDER BY a DESC
   6394   }
   6395 } {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}
   6396 do_test boundary2-2.55.le.3 {
   6397   db eval {
   6398     SELECT a FROM t1 WHERE r <= 281474976710656 ORDER BY r
   6399   }
   6400 } {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}
   6401 do_test boundary2-2.55.le.4 {
   6402   db eval {
   6403     SELECT a FROM t1 WHERE r <= 281474976710656 ORDER BY r DESC
   6404   }
   6405 } {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}
   6406 do_test boundary2-2.55.le.5 {
   6407   db eval {
   6408     SELECT a FROM t1 WHERE r <= 281474976710656 ORDER BY x
   6409   }
   6410 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 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}
   6411 do_test boundary2-2.56.1 {
   6412   db eval {
   6413     SELECT * FROM t1 WHERE r=32767
   6414   }
   6415 } {32767 23 0000000000007fff}
   6416 do_test boundary2-2.56.2 {
   6417   db eval {
   6418     SELECT r, a FROM t1 WHERE x='0000000000007fff'
   6419   }
   6420 } {32767 23}
   6421 do_test boundary2-2.56.3 {
   6422   db eval {
   6423     SELECT r, x FROM t1 WHERE a=23
   6424   }
   6425 } {32767 0000000000007fff}
   6426 do_test boundary2-2.56.gt.1 {
   6427   db eval {
   6428     SELECT a FROM t1 WHERE r > 32767 ORDER BY a
   6429   }
   6430 } {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}
   6431 do_test boundary2-2.56.gt.2 {
   6432   db eval {
   6433     SELECT a FROM t1 WHERE r > 32767 ORDER BY a DESC
   6434   }
   6435 } {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}
   6436 do_test boundary2-2.56.gt.3 {
   6437   db eval {
   6438     SELECT a FROM t1 WHERE r > 32767 ORDER BY r
   6439   }
   6440 } {50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   6441 do_test boundary2-2.56.gt.4 {
   6442   db eval {
   6443     SELECT a FROM t1 WHERE r > 32767 ORDER BY r DESC
   6444   }
   6445 } {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}
   6446 do_test boundary2-2.56.gt.5 {
   6447   db eval {
   6448     SELECT a FROM t1 WHERE r > 32767 ORDER BY x
   6449   }
   6450 } {50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   6451 do_test boundary2-2.56.ge.1 {
   6452   db eval {
   6453     SELECT a FROM t1 WHERE r >= 32767 ORDER BY a
   6454   }
   6455 } {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}
   6456 do_test boundary2-2.56.ge.2 {
   6457   db eval {
   6458     SELECT a FROM t1 WHERE r >= 32767 ORDER BY a DESC
   6459   }
   6460 } {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}
   6461 do_test boundary2-2.56.ge.3 {
   6462   db eval {
   6463     SELECT a FROM t1 WHERE r >= 32767 ORDER BY r
   6464   }
   6465 } {23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   6466 do_test boundary2-2.56.ge.4 {
   6467   db eval {
   6468     SELECT a FROM t1 WHERE r >= 32767 ORDER BY r DESC
   6469   }
   6470 } {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}
   6471 do_test boundary2-2.56.ge.5 {
   6472   db eval {
   6473     SELECT a FROM t1 WHERE r >= 32767 ORDER BY x
   6474   }
   6475 } {23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   6476 do_test boundary2-2.56.lt.1 {
   6477   db eval {
   6478     SELECT a FROM t1 WHERE r < 32767 ORDER BY a
   6479   }
   6480 } {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}
   6481 do_test boundary2-2.56.lt.2 {
   6482   db eval {
   6483     SELECT a FROM t1 WHERE r < 32767 ORDER BY a DESC
   6484   }
   6485 } {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}
   6486 do_test boundary2-2.56.lt.3 {
   6487   db eval {
   6488     SELECT a FROM t1 WHERE r < 32767 ORDER BY r
   6489   }
   6490 } {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}
   6491 do_test boundary2-2.56.lt.4 {
   6492   db eval {
   6493     SELECT a FROM t1 WHERE r < 32767 ORDER BY r DESC
   6494   }
   6495 } {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}
   6496 do_test boundary2-2.56.lt.5 {
   6497   db eval {
   6498     SELECT a FROM t1 WHERE r < 32767 ORDER BY x
   6499   }
   6500 } {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}
   6501 do_test boundary2-2.56.le.1 {
   6502   db eval {
   6503     SELECT a FROM t1 WHERE r <= 32767 ORDER BY a
   6504   }
   6505 } {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}
   6506 do_test boundary2-2.56.le.2 {
   6507   db eval {
   6508     SELECT a FROM t1 WHERE r <= 32767 ORDER BY a DESC
   6509   }
   6510 } {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}
   6511 do_test boundary2-2.56.le.3 {
   6512   db eval {
   6513     SELECT a FROM t1 WHERE r <= 32767 ORDER BY r
   6514   }
   6515 } {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}
   6516 do_test boundary2-2.56.le.4 {
   6517   db eval {
   6518     SELECT a FROM t1 WHERE r <= 32767 ORDER BY r DESC
   6519   }
   6520 } {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}
   6521 do_test boundary2-2.56.le.5 {
   6522   db eval {
   6523     SELECT a FROM t1 WHERE r <= 32767 ORDER BY x
   6524   }
   6525 } {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}
   6526 do_test boundary2-2.57.1 {
   6527   db eval {
   6528     SELECT * FROM t1 WHERE r=127
   6529   }
   6530 } {127 4 000000000000007f}
   6531 do_test boundary2-2.57.2 {
   6532   db eval {
   6533     SELECT r, a FROM t1 WHERE x='000000000000007f'
   6534   }
   6535 } {127 4}
   6536 do_test boundary2-2.57.3 {
   6537   db eval {
   6538     SELECT r, x FROM t1 WHERE a=4
   6539   }
   6540 } {127 000000000000007f}
   6541 do_test boundary2-2.57.gt.1 {
   6542   db eval {
   6543     SELECT a FROM t1 WHERE r > 127 ORDER BY a
   6544   }
   6545 } {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}
   6546 do_test boundary2-2.57.gt.2 {
   6547   db eval {
   6548     SELECT a FROM t1 WHERE r > 127 ORDER BY a DESC
   6549   }
   6550 } {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}
   6551 do_test boundary2-2.57.gt.3 {
   6552   db eval {
   6553     SELECT a FROM t1 WHERE r > 127 ORDER BY r
   6554   }
   6555 } {49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   6556 do_test boundary2-2.57.gt.4 {
   6557   db eval {
   6558     SELECT a FROM t1 WHERE r > 127 ORDER BY r DESC
   6559   }
   6560 } {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}
   6561 do_test boundary2-2.57.gt.5 {
   6562   db eval {
   6563     SELECT a FROM t1 WHERE r > 127 ORDER BY x
   6564   }
   6565 } {49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   6566 do_test boundary2-2.57.ge.1 {
   6567   db eval {
   6568     SELECT a FROM t1 WHERE r >= 127 ORDER BY a
   6569   }
   6570 } {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}
   6571 do_test boundary2-2.57.ge.2 {
   6572   db eval {
   6573     SELECT a FROM t1 WHERE r >= 127 ORDER BY a DESC
   6574   }
   6575 } {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}
   6576 do_test boundary2-2.57.ge.3 {
   6577   db eval {
   6578     SELECT a FROM t1 WHERE r >= 127 ORDER BY r
   6579   }
   6580 } {4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   6581 do_test boundary2-2.57.ge.4 {
   6582   db eval {
   6583     SELECT a FROM t1 WHERE r >= 127 ORDER BY r DESC
   6584   }
   6585 } {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}
   6586 do_test boundary2-2.57.ge.5 {
   6587   db eval {
   6588     SELECT a FROM t1 WHERE r >= 127 ORDER BY x
   6589   }
   6590 } {4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   6591 do_test boundary2-2.57.lt.1 {
   6592   db eval {
   6593     SELECT a FROM t1 WHERE r < 127 ORDER BY a
   6594   }
   6595 } {1 2 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
   6596 do_test boundary2-2.57.lt.2 {
   6597   db eval {
   6598     SELECT a FROM t1 WHERE r < 127 ORDER BY a DESC
   6599   }
   6600 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 2 1}
   6601 do_test boundary2-2.57.lt.3 {
   6602   db eval {
   6603     SELECT a FROM t1 WHERE r < 127 ORDER BY r
   6604   }
   6605 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31}
   6606 do_test boundary2-2.57.lt.4 {
   6607   db eval {
   6608     SELECT a FROM t1 WHERE r < 127 ORDER BY r DESC
   6609   }
   6610 } {31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   6611 do_test boundary2-2.57.lt.5 {
   6612   db eval {
   6613     SELECT a FROM t1 WHERE r < 127 ORDER BY x
   6614   }
   6615 } {59 60 41 5 31 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   6616 do_test boundary2-2.57.le.1 {
   6617   db eval {
   6618     SELECT a FROM t1 WHERE r <= 127 ORDER BY a
   6619   }
   6620 } {1 2 4 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
   6621 do_test boundary2-2.57.le.2 {
   6622   db eval {
   6623     SELECT a FROM t1 WHERE r <= 127 ORDER BY a DESC
   6624   }
   6625 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 4 2 1}
   6626 do_test boundary2-2.57.le.3 {
   6627   db eval {
   6628     SELECT a FROM t1 WHERE r <= 127 ORDER BY r
   6629   }
   6630 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4}
   6631 do_test boundary2-2.57.le.4 {
   6632   db eval {
   6633     SELECT a FROM t1 WHERE r <= 127 ORDER BY r DESC
   6634   }
   6635 } {4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   6636 do_test boundary2-2.57.le.5 {
   6637   db eval {
   6638     SELECT a FROM t1 WHERE r <= 127 ORDER BY x
   6639   }
   6640 } {59 60 41 5 31 4 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   6641 do_test boundary2-2.58.1 {
   6642   db eval {
   6643     SELECT * FROM t1 WHERE r=36028797018963967
   6644   }
   6645 } {36028797018963967 27 007fffffffffffff}
   6646 do_test boundary2-2.58.2 {
   6647   db eval {
   6648     SELECT r, a FROM t1 WHERE x='007fffffffffffff'
   6649   }
   6650 } {36028797018963967 27}
   6651 do_test boundary2-2.58.3 {
   6652   db eval {
   6653     SELECT r, x FROM t1 WHERE a=27
   6654   }
   6655 } {36028797018963967 007fffffffffffff}
   6656 do_test boundary2-2.58.gt.1 {
   6657   db eval {
   6658     SELECT a FROM t1 WHERE r > 36028797018963967 ORDER BY a
   6659   }
   6660 } {3 17 28 45}
   6661 do_test boundary2-2.58.gt.2 {
   6662   db eval {
   6663     SELECT a FROM t1 WHERE r > 36028797018963967 ORDER BY a DESC
   6664   }
   6665 } {45 28 17 3}
   6666 do_test boundary2-2.58.gt.3 {
   6667   db eval {
   6668     SELECT a FROM t1 WHERE r > 36028797018963967 ORDER BY r
   6669   }
   6670 } {45 17 28 3}
   6671 do_test boundary2-2.58.gt.4 {
   6672   db eval {
   6673     SELECT a FROM t1 WHERE r > 36028797018963967 ORDER BY r DESC
   6674   }
   6675 } {3 28 17 45}
   6676 do_test boundary2-2.58.gt.5 {
   6677   db eval {
   6678     SELECT a FROM t1 WHERE r > 36028797018963967 ORDER BY x
   6679   }
   6680 } {45 17 28 3}
   6681 do_test boundary2-2.58.ge.1 {
   6682   db eval {
   6683     SELECT a FROM t1 WHERE r >= 36028797018963967 ORDER BY a
   6684   }
   6685 } {3 17 27 28 45}
   6686 do_test boundary2-2.58.ge.2 {
   6687   db eval {
   6688     SELECT a FROM t1 WHERE r >= 36028797018963967 ORDER BY a DESC
   6689   }
   6690 } {45 28 27 17 3}
   6691 do_test boundary2-2.58.ge.3 {
   6692   db eval {
   6693     SELECT a FROM t1 WHERE r >= 36028797018963967 ORDER BY r
   6694   }
   6695 } {27 45 17 28 3}
   6696 do_test boundary2-2.58.ge.4 {
   6697   db eval {
   6698     SELECT a FROM t1 WHERE r >= 36028797018963967 ORDER BY r DESC
   6699   }
   6700 } {3 28 17 45 27}
   6701 do_test boundary2-2.58.ge.5 {
   6702   db eval {
   6703     SELECT a FROM t1 WHERE r >= 36028797018963967 ORDER BY x
   6704   }
   6705 } {27 45 17 28 3}
   6706 do_test boundary2-2.58.lt.1 {
   6707   db eval {
   6708     SELECT a FROM t1 WHERE r < 36028797018963967 ORDER BY a
   6709   }
   6710 } {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}
   6711 do_test boundary2-2.58.lt.2 {
   6712   db eval {
   6713     SELECT a FROM t1 WHERE r < 36028797018963967 ORDER BY a DESC
   6714   }
   6715 } {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}
   6716 do_test boundary2-2.58.lt.3 {
   6717   db eval {
   6718     SELECT a FROM t1 WHERE r < 36028797018963967 ORDER BY r
   6719   }
   6720 } {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}
   6721 do_test boundary2-2.58.lt.4 {
   6722   db eval {
   6723     SELECT a FROM t1 WHERE r < 36028797018963967 ORDER BY r DESC
   6724   }
   6725 } {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}
   6726 do_test boundary2-2.58.lt.5 {
   6727   db eval {
   6728     SELECT a FROM t1 WHERE r < 36028797018963967 ORDER BY x
   6729   }
   6730 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 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}
   6731 do_test boundary2-2.58.le.1 {
   6732   db eval {
   6733     SELECT a FROM t1 WHERE r <= 36028797018963967 ORDER BY a
   6734   }
   6735 } {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}
   6736 do_test boundary2-2.58.le.2 {
   6737   db eval {
   6738     SELECT a FROM t1 WHERE r <= 36028797018963967 ORDER BY a DESC
   6739   }
   6740 } {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}
   6741 do_test boundary2-2.58.le.3 {
   6742   db eval {
   6743     SELECT a FROM t1 WHERE r <= 36028797018963967 ORDER BY r
   6744   }
   6745 } {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}
   6746 do_test boundary2-2.58.le.4 {
   6747   db eval {
   6748     SELECT a FROM t1 WHERE r <= 36028797018963967 ORDER BY r DESC
   6749   }
   6750 } {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}
   6751 do_test boundary2-2.58.le.5 {
   6752   db eval {
   6753     SELECT a FROM t1 WHERE r <= 36028797018963967 ORDER BY x
   6754   }
   6755 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 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}
   6756 do_test boundary2-2.59.1 {
   6757   db eval {
   6758     SELECT * FROM t1 WHERE r=4398046511104
   6759   }
   6760 } {4398046511104 56 0000040000000000}
   6761 do_test boundary2-2.59.2 {
   6762   db eval {
   6763     SELECT r, a FROM t1 WHERE x='0000040000000000'
   6764   }
   6765 } {4398046511104 56}
   6766 do_test boundary2-2.59.3 {
   6767   db eval {
   6768     SELECT r, x FROM t1 WHERE a=56
   6769   }
   6770 } {4398046511104 0000040000000000}
   6771 do_test boundary2-2.59.gt.1 {
   6772   db eval {
   6773     SELECT a FROM t1 WHERE r > 4398046511104 ORDER BY a
   6774   }
   6775 } {3 10 13 17 25 26 27 28 34 43 45}
   6776 do_test boundary2-2.59.gt.2 {
   6777   db eval {
   6778     SELECT a FROM t1 WHERE r > 4398046511104 ORDER BY a DESC
   6779   }
   6780 } {45 43 34 28 27 26 25 17 13 10 3}
   6781 do_test boundary2-2.59.gt.3 {
   6782   db eval {
   6783     SELECT a FROM t1 WHERE r > 4398046511104 ORDER BY r
   6784   }
   6785 } {25 34 10 26 13 43 27 45 17 28 3}
   6786 do_test boundary2-2.59.gt.4 {
   6787   db eval {
   6788     SELECT a FROM t1 WHERE r > 4398046511104 ORDER BY r DESC
   6789   }
   6790 } {3 28 17 45 27 43 13 26 10 34 25}
   6791 do_test boundary2-2.59.gt.5 {
   6792   db eval {
   6793     SELECT a FROM t1 WHERE r > 4398046511104 ORDER BY x
   6794   }
   6795 } {25 34 10 26 13 43 27 45 17 28 3}
   6796 do_test boundary2-2.59.ge.1 {
   6797   db eval {
   6798     SELECT a FROM t1 WHERE r >= 4398046511104 ORDER BY a
   6799   }
   6800 } {3 10 13 17 25 26 27 28 34 43 45 56}
   6801 do_test boundary2-2.59.ge.2 {
   6802   db eval {
   6803     SELECT a FROM t1 WHERE r >= 4398046511104 ORDER BY a DESC
   6804   }
   6805 } {56 45 43 34 28 27 26 25 17 13 10 3}
   6806 do_test boundary2-2.59.ge.3 {
   6807   db eval {
   6808     SELECT a FROM t1 WHERE r >= 4398046511104 ORDER BY r
   6809   }
   6810 } {56 25 34 10 26 13 43 27 45 17 28 3}
   6811 do_test boundary2-2.59.ge.4 {
   6812   db eval {
   6813     SELECT a FROM t1 WHERE r >= 4398046511104 ORDER BY r DESC
   6814   }
   6815 } {3 28 17 45 27 43 13 26 10 34 25 56}
   6816 do_test boundary2-2.59.ge.5 {
   6817   db eval {
   6818     SELECT a FROM t1 WHERE r >= 4398046511104 ORDER BY x
   6819   }
   6820 } {56 25 34 10 26 13 43 27 45 17 28 3}
   6821 do_test boundary2-2.59.lt.1 {
   6822   db eval {
   6823     SELECT a FROM t1 WHERE r < 4398046511104 ORDER BY a
   6824   }
   6825 } {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}
   6826 do_test boundary2-2.59.lt.2 {
   6827   db eval {
   6828     SELECT a FROM t1 WHERE r < 4398046511104 ORDER BY a DESC
   6829   }
   6830 } {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}
   6831 do_test boundary2-2.59.lt.3 {
   6832   db eval {
   6833     SELECT a FROM t1 WHERE r < 4398046511104 ORDER BY r
   6834   }
   6835 } {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}
   6836 do_test boundary2-2.59.lt.4 {
   6837   db eval {
   6838     SELECT a FROM t1 WHERE r < 4398046511104 ORDER BY r DESC
   6839   }
   6840 } {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}
   6841 do_test boundary2-2.59.lt.5 {
   6842   db eval {
   6843     SELECT a FROM t1 WHERE r < 4398046511104 ORDER BY x
   6844   }
   6845 } {59 60 41 5 31 4 49 30 61 8 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}
   6846 do_test boundary2-2.59.le.1 {
   6847   db eval {
   6848     SELECT a FROM t1 WHERE r <= 4398046511104 ORDER BY a
   6849   }
   6850 } {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}
   6851 do_test boundary2-2.59.le.2 {
   6852   db eval {
   6853     SELECT a FROM t1 WHERE r <= 4398046511104 ORDER BY a DESC
   6854   }
   6855 } {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}
   6856 do_test boundary2-2.59.le.3 {
   6857   db eval {
   6858     SELECT a FROM t1 WHERE r <= 4398046511104 ORDER BY r
   6859   }
   6860 } {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}
   6861 do_test boundary2-2.59.le.4 {
   6862   db eval {
   6863     SELECT a FROM t1 WHERE r <= 4398046511104 ORDER BY r DESC
   6864   }
   6865 } {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}
   6866 do_test boundary2-2.59.le.5 {
   6867   db eval {
   6868     SELECT a FROM t1 WHERE r <= 4398046511104 ORDER BY x
   6869   }
   6870 } {59 60 41 5 31 4 49 30 61 8 16 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}
   6871 do_test boundary2-2.60.1 {
   6872   db eval {
   6873     SELECT * FROM t1 WHERE r=1
   6874   }
   6875 } {1 60 0000000000000001}
   6876 do_test boundary2-2.60.2 {
   6877   db eval {
   6878     SELECT r, a FROM t1 WHERE x='0000000000000001'
   6879   }
   6880 } {1 60}
   6881 do_test boundary2-2.60.3 {
   6882   db eval {
   6883     SELECT r, x FROM t1 WHERE a=60
   6884   }
   6885 } {1 0000000000000001}
   6886 do_test boundary2-2.60.gt.1 {
   6887   db eval {
   6888     SELECT a FROM t1 WHERE r > 1 ORDER BY a
   6889   }
   6890 } {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}
   6891 do_test boundary2-2.60.gt.2 {
   6892   db eval {
   6893     SELECT a FROM t1 WHERE r > 1 ORDER BY a DESC
   6894   }
   6895 } {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}
   6896 do_test boundary2-2.60.gt.3 {
   6897   db eval {
   6898     SELECT a FROM t1 WHERE r > 1 ORDER BY r
   6899   }
   6900 } {41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   6901 do_test boundary2-2.60.gt.4 {
   6902   db eval {
   6903     SELECT a FROM t1 WHERE r > 1 ORDER BY r DESC
   6904   }
   6905 } {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}
   6906 do_test boundary2-2.60.gt.5 {
   6907   db eval {
   6908     SELECT a FROM t1 WHERE r > 1 ORDER BY x
   6909   }
   6910 } {41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   6911 do_test boundary2-2.60.ge.1 {
   6912   db eval {
   6913     SELECT a FROM t1 WHERE r >= 1 ORDER BY a
   6914   }
   6915 } {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}
   6916 do_test boundary2-2.60.ge.2 {
   6917   db eval {
   6918     SELECT a FROM t1 WHERE r >= 1 ORDER BY a DESC
   6919   }
   6920 } {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}
   6921 do_test boundary2-2.60.ge.3 {
   6922   db eval {
   6923     SELECT a FROM t1 WHERE r >= 1 ORDER BY r
   6924   }
   6925 } {60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   6926 do_test boundary2-2.60.ge.4 {
   6927   db eval {
   6928     SELECT a FROM t1 WHERE r >= 1 ORDER BY r DESC
   6929   }
   6930 } {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}
   6931 do_test boundary2-2.60.ge.5 {
   6932   db eval {
   6933     SELECT a FROM t1 WHERE r >= 1 ORDER BY x
   6934   }
   6935 } {60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   6936 do_test boundary2-2.60.lt.1 {
   6937   db eval {
   6938     SELECT a FROM t1 WHERE r < 1 ORDER BY a
   6939   }
   6940 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 63 64}
   6941 do_test boundary2-2.60.lt.2 {
   6942   db eval {
   6943     SELECT a FROM t1 WHERE r < 1 ORDER BY a DESC
   6944   }
   6945 } {64 63 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
   6946 do_test boundary2-2.60.lt.3 {
   6947   db eval {
   6948     SELECT a FROM t1 WHERE r < 1 ORDER BY r
   6949   }
   6950 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59}
   6951 do_test boundary2-2.60.lt.4 {
   6952   db eval {
   6953     SELECT a FROM t1 WHERE r < 1 ORDER BY r DESC
   6954   }
   6955 } {59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   6956 do_test boundary2-2.60.lt.5 {
   6957   db eval {
   6958     SELECT a FROM t1 WHERE r < 1 ORDER BY x
   6959   }
   6960 } {59 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   6961 do_test boundary2-2.60.le.1 {
   6962   db eval {
   6963     SELECT a FROM t1 WHERE r <= 1 ORDER BY a
   6964   }
   6965 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 60 63 64}
   6966 do_test boundary2-2.60.le.2 {
   6967   db eval {
   6968     SELECT a FROM t1 WHERE r <= 1 ORDER BY a DESC
   6969   }
   6970 } {64 63 60 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
   6971 do_test boundary2-2.60.le.3 {
   6972   db eval {
   6973     SELECT a FROM t1 WHERE r <= 1 ORDER BY r
   6974   }
   6975 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60}
   6976 do_test boundary2-2.60.le.4 {
   6977   db eval {
   6978     SELECT a FROM t1 WHERE r <= 1 ORDER BY r DESC
   6979   }
   6980 } {60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   6981 do_test boundary2-2.60.le.5 {
   6982   db eval {
   6983     SELECT a FROM t1 WHERE r <= 1 ORDER BY x
   6984   }
   6985 } {59 60 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   6986 do_test boundary2-2.61.1 {
   6987   db eval {
   6988     SELECT * FROM t1 WHERE r=36028797018963968
   6989   }
   6990 } {36028797018963968 45 0080000000000000}
   6991 do_test boundary2-2.61.2 {
   6992   db eval {
   6993     SELECT r, a FROM t1 WHERE x='0080000000000000'
   6994   }
   6995 } {36028797018963968 45}
   6996 do_test boundary2-2.61.3 {
   6997   db eval {
   6998     SELECT r, x FROM t1 WHERE a=45
   6999   }
   7000 } {36028797018963968 0080000000000000}
   7001 do_test boundary2-2.61.gt.1 {
   7002   db eval {
   7003     SELECT a FROM t1 WHERE r > 36028797018963968 ORDER BY a
   7004   }
   7005 } {3 17 28}
   7006 do_test boundary2-2.61.gt.2 {
   7007   db eval {
   7008     SELECT a FROM t1 WHERE r > 36028797018963968 ORDER BY a DESC
   7009   }
   7010 } {28 17 3}
   7011 do_test boundary2-2.61.gt.3 {
   7012   db eval {
   7013     SELECT a FROM t1 WHERE r > 36028797018963968 ORDER BY r
   7014   }
   7015 } {17 28 3}
   7016 do_test boundary2-2.61.gt.4 {
   7017   db eval {
   7018     SELECT a FROM t1 WHERE r > 36028797018963968 ORDER BY r DESC
   7019   }
   7020 } {3 28 17}
   7021 do_test boundary2-2.61.gt.5 {
   7022   db eval {
   7023     SELECT a FROM t1 WHERE r > 36028797018963968 ORDER BY x
   7024   }
   7025 } {17 28 3}
   7026 do_test boundary2-2.61.ge.1 {
   7027   db eval {
   7028     SELECT a FROM t1 WHERE r >= 36028797018963968 ORDER BY a
   7029   }
   7030 } {3 17 28 45}
   7031 do_test boundary2-2.61.ge.2 {
   7032   db eval {
   7033     SELECT a FROM t1 WHERE r >= 36028797018963968 ORDER BY a DESC
   7034   }
   7035 } {45 28 17 3}
   7036 do_test boundary2-2.61.ge.3 {
   7037   db eval {
   7038     SELECT a FROM t1 WHERE r >= 36028797018963968 ORDER BY r
   7039   }
   7040 } {45 17 28 3}
   7041 do_test boundary2-2.61.ge.4 {
   7042   db eval {
   7043     SELECT a FROM t1 WHERE r >= 36028797018963968 ORDER BY r DESC
   7044   }
   7045 } {3 28 17 45}
   7046 do_test boundary2-2.61.ge.5 {
   7047   db eval {
   7048     SELECT a FROM t1 WHERE r >= 36028797018963968 ORDER BY x
   7049   }
   7050 } {45 17 28 3}
   7051 do_test boundary2-2.61.lt.1 {
   7052   db eval {
   7053     SELECT a FROM t1 WHERE r < 36028797018963968 ORDER BY a
   7054   }
   7055 } {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}
   7056 do_test boundary2-2.61.lt.2 {
   7057   db eval {
   7058     SELECT a FROM t1 WHERE r < 36028797018963968 ORDER BY a DESC
   7059   }
   7060 } {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}
   7061 do_test boundary2-2.61.lt.3 {
   7062   db eval {
   7063     SELECT a FROM t1 WHERE r < 36028797018963968 ORDER BY r
   7064   }
   7065 } {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}
   7066 do_test boundary2-2.61.lt.4 {
   7067   db eval {
   7068     SELECT a FROM t1 WHERE r < 36028797018963968 ORDER BY r DESC
   7069   }
   7070 } {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}
   7071 do_test boundary2-2.61.lt.5 {
   7072   db eval {
   7073     SELECT a FROM t1 WHERE r < 36028797018963968 ORDER BY x
   7074   }
   7075 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 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}
   7076 do_test boundary2-2.61.le.1 {
   7077   db eval {
   7078     SELECT a FROM t1 WHERE r <= 36028797018963968 ORDER BY a
   7079   }
   7080 } {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}
   7081 do_test boundary2-2.61.le.2 {
   7082   db eval {
   7083     SELECT a FROM t1 WHERE r <= 36028797018963968 ORDER BY a DESC
   7084   }
   7085 } {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}
   7086 do_test boundary2-2.61.le.3 {
   7087   db eval {
   7088     SELECT a FROM t1 WHERE r <= 36028797018963968 ORDER BY r
   7089   }
   7090 } {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}
   7091 do_test boundary2-2.61.le.4 {
   7092   db eval {
   7093     SELECT a FROM t1 WHERE r <= 36028797018963968 ORDER BY r DESC
   7094   }
   7095 } {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}
   7096 do_test boundary2-2.61.le.5 {
   7097   db eval {
   7098     SELECT a FROM t1 WHERE r <= 36028797018963968 ORDER BY x
   7099   }
   7100 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 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}
   7101 do_test boundary2-2.62.1 {
   7102   db eval {
   7103     SELECT * FROM t1 WHERE r=-2147483649
   7104   }
   7105 } {-2147483649 47 ffffffff7fffffff}
   7106 do_test boundary2-2.62.2 {
   7107   db eval {
   7108     SELECT r, a FROM t1 WHERE x='ffffffff7fffffff'
   7109   }
   7110 } {-2147483649 47}
   7111 do_test boundary2-2.62.3 {
   7112   db eval {
   7113     SELECT r, x FROM t1 WHERE a=47
   7114   }
   7115 } {-2147483649 ffffffff7fffffff}
   7116 do_test boundary2-2.62.gt.1 {
   7117   db eval {
   7118     SELECT a FROM t1 WHERE r > -2147483649 ORDER BY a
   7119   }
   7120 } {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}
   7121 do_test boundary2-2.62.gt.2 {
   7122   db eval {
   7123     SELECT a FROM t1 WHERE r > -2147483649 ORDER BY a DESC
   7124   }
   7125 } {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}
   7126 do_test boundary2-2.62.gt.3 {
   7127   db eval {
   7128     SELECT a FROM t1 WHERE r > -2147483649 ORDER BY r
   7129   }
   7130 } {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}
   7131 do_test boundary2-2.62.gt.4 {
   7132   db eval {
   7133     SELECT a FROM t1 WHERE r > -2147483649 ORDER BY r DESC
   7134   }
   7135 } {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}
   7136 do_test boundary2-2.62.gt.5 {
   7137   db eval {
   7138     SELECT a FROM t1 WHERE r > -2147483649 ORDER BY x
   7139   }
   7140 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   7141 do_test boundary2-2.62.ge.1 {
   7142   db eval {
   7143     SELECT a FROM t1 WHERE r >= -2147483649 ORDER BY a
   7144   }
   7145 } {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}
   7146 do_test boundary2-2.62.ge.2 {
   7147   db eval {
   7148     SELECT a FROM t1 WHERE r >= -2147483649 ORDER BY a DESC
   7149   }
   7150 } {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}
   7151 do_test boundary2-2.62.ge.3 {
   7152   db eval {
   7153     SELECT a FROM t1 WHERE r >= -2147483649 ORDER BY r
   7154   }
   7155 } {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}
   7156 do_test boundary2-2.62.ge.4 {
   7157   db eval {
   7158     SELECT a FROM t1 WHERE r >= -2147483649 ORDER BY r DESC
   7159   }
   7160 } {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}
   7161 do_test boundary2-2.62.ge.5 {
   7162   db eval {
   7163     SELECT a FROM t1 WHERE r >= -2147483649 ORDER BY x
   7164   }
   7165 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   7166 do_test boundary2-2.62.lt.1 {
   7167   db eval {
   7168     SELECT a FROM t1 WHERE r < -2147483649 ORDER BY a
   7169   }
   7170 } {2 21 44 55 58 63 64}
   7171 do_test boundary2-2.62.lt.2 {
   7172   db eval {
   7173     SELECT a FROM t1 WHERE r < -2147483649 ORDER BY a DESC
   7174   }
   7175 } {64 63 58 55 44 21 2}
   7176 do_test boundary2-2.62.lt.3 {
   7177   db eval {
   7178     SELECT a FROM t1 WHERE r < -2147483649 ORDER BY r
   7179   }
   7180 } {55 2 64 21 44 58 63}
   7181 do_test boundary2-2.62.lt.4 {
   7182   db eval {
   7183     SELECT a FROM t1 WHERE r < -2147483649 ORDER BY r DESC
   7184   }
   7185 } {63 58 44 21 64 2 55}
   7186 do_test boundary2-2.62.lt.5 {
   7187   db eval {
   7188     SELECT a FROM t1 WHERE r < -2147483649 ORDER BY x
   7189   }
   7190 } {55 2 64 21 44 58 63}
   7191 do_test boundary2-2.62.le.1 {
   7192   db eval {
   7193     SELECT a FROM t1 WHERE r <= -2147483649 ORDER BY a
   7194   }
   7195 } {2 21 44 47 55 58 63 64}
   7196 do_test boundary2-2.62.le.2 {
   7197   db eval {
   7198     SELECT a FROM t1 WHERE r <= -2147483649 ORDER BY a DESC
   7199   }
   7200 } {64 63 58 55 47 44 21 2}
   7201 do_test boundary2-2.62.le.3 {
   7202   db eval {
   7203     SELECT a FROM t1 WHERE r <= -2147483649 ORDER BY r
   7204   }
   7205 } {55 2 64 21 44 58 63 47}
   7206 do_test boundary2-2.62.le.4 {
   7207   db eval {
   7208     SELECT a FROM t1 WHERE r <= -2147483649 ORDER BY r DESC
   7209   }
   7210 } {47 63 58 44 21 64 2 55}
   7211 do_test boundary2-2.62.le.5 {
   7212   db eval {
   7213     SELECT a FROM t1 WHERE r <= -2147483649 ORDER BY x
   7214   }
   7215 } {55 2 64 21 44 58 63 47}
   7216 do_test boundary2-2.63.1 {
   7217   db eval {
   7218     SELECT * FROM t1 WHERE r=-36028797018963969
   7219   }
   7220 } {-36028797018963969 2 ff7fffffffffffff}
   7221 do_test boundary2-2.63.2 {
   7222   db eval {
   7223     SELECT r, a FROM t1 WHERE x='ff7fffffffffffff'
   7224   }
   7225 } {-36028797018963969 2}
   7226 do_test boundary2-2.63.3 {
   7227   db eval {
   7228     SELECT r, x FROM t1 WHERE a=2
   7229   }
   7230 } {-36028797018963969 ff7fffffffffffff}
   7231 do_test boundary2-2.63.gt.1 {
   7232   db eval {
   7233     SELECT a FROM t1 WHERE r > -36028797018963969 ORDER BY a
   7234   }
   7235 } {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}
   7236 do_test boundary2-2.63.gt.2 {
   7237   db eval {
   7238     SELECT a FROM t1 WHERE r > -36028797018963969 ORDER BY a DESC
   7239   }
   7240 } {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}
   7241 do_test boundary2-2.63.gt.3 {
   7242   db eval {
   7243     SELECT a FROM t1 WHERE r > -36028797018963969 ORDER BY r
   7244   }
   7245 } {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}
   7246 do_test boundary2-2.63.gt.4 {
   7247   db eval {
   7248     SELECT a FROM t1 WHERE r > -36028797018963969 ORDER BY r DESC
   7249   }
   7250 } {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}
   7251 do_test boundary2-2.63.gt.5 {
   7252   db eval {
   7253     SELECT a FROM t1 WHERE r > -36028797018963969 ORDER BY x
   7254   }
   7255 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   7256 do_test boundary2-2.63.ge.1 {
   7257   db eval {
   7258     SELECT a FROM t1 WHERE r >= -36028797018963969 ORDER BY a
   7259   }
   7260 } {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}
   7261 do_test boundary2-2.63.ge.2 {
   7262   db eval {
   7263     SELECT a FROM t1 WHERE r >= -36028797018963969 ORDER BY a DESC
   7264   }
   7265 } {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}
   7266 do_test boundary2-2.63.ge.3 {
   7267   db eval {
   7268     SELECT a FROM t1 WHERE r >= -36028797018963969 ORDER BY r
   7269   }
   7270 } {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}
   7271 do_test boundary2-2.63.ge.4 {
   7272   db eval {
   7273     SELECT a FROM t1 WHERE r >= -36028797018963969 ORDER BY r DESC
   7274   }
   7275 } {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}
   7276 do_test boundary2-2.63.ge.5 {
   7277   db eval {
   7278     SELECT a FROM t1 WHERE r >= -36028797018963969 ORDER BY x
   7279   }
   7280 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   7281 do_test boundary2-2.63.lt.1 {
   7282   db eval {
   7283     SELECT a FROM t1 WHERE r < -36028797018963969 ORDER BY a
   7284   }
   7285 } {55}
   7286 do_test boundary2-2.63.lt.2 {
   7287   db eval {
   7288     SELECT a FROM t1 WHERE r < -36028797018963969 ORDER BY a DESC
   7289   }
   7290 } {55}
   7291 do_test boundary2-2.63.lt.3 {
   7292   db eval {
   7293     SELECT a FROM t1 WHERE r < -36028797018963969 ORDER BY r
   7294   }
   7295 } {55}
   7296 do_test boundary2-2.63.lt.4 {
   7297   db eval {
   7298     SELECT a FROM t1 WHERE r < -36028797018963969 ORDER BY r DESC
   7299   }
   7300 } {55}
   7301 do_test boundary2-2.63.lt.5 {
   7302   db eval {
   7303     SELECT a FROM t1 WHERE r < -36028797018963969 ORDER BY x
   7304   }
   7305 } {55}
   7306 do_test boundary2-2.63.le.1 {
   7307   db eval {
   7308     SELECT a FROM t1 WHERE r <= -36028797018963969 ORDER BY a
   7309   }
   7310 } {2 55}
   7311 do_test boundary2-2.63.le.2 {
   7312   db eval {
   7313     SELECT a FROM t1 WHERE r <= -36028797018963969 ORDER BY a DESC
   7314   }
   7315 } {55 2}
   7316 do_test boundary2-2.63.le.3 {
   7317   db eval {
   7318     SELECT a FROM t1 WHERE r <= -36028797018963969 ORDER BY r
   7319   }
   7320 } {55 2}
   7321 do_test boundary2-2.63.le.4 {
   7322   db eval {
   7323     SELECT a FROM t1 WHERE r <= -36028797018963969 ORDER BY r DESC
   7324   }
   7325 } {2 55}
   7326 do_test boundary2-2.63.le.5 {
   7327   db eval {
   7328     SELECT a FROM t1 WHERE r <= -36028797018963969 ORDER BY x
   7329   }
   7330 } {55 2}
   7331 do_test boundary2-2.64.1 {
   7332   db eval {
   7333     SELECT * FROM t1 WHERE r=3
   7334   }
   7335 } {3 5 0000000000000003}
   7336 do_test boundary2-2.64.2 {
   7337   db eval {
   7338     SELECT r, a FROM t1 WHERE x='0000000000000003'
   7339   }
   7340 } {3 5}
   7341 do_test boundary2-2.64.3 {
   7342   db eval {
   7343     SELECT r, x FROM t1 WHERE a=5
   7344   }
   7345 } {3 0000000000000003}
   7346 do_test boundary2-2.64.gt.1 {
   7347   db eval {
   7348     SELECT a FROM t1 WHERE r > 3 ORDER BY a
   7349   }
   7350 } {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}
   7351 do_test boundary2-2.64.gt.2 {
   7352   db eval {
   7353     SELECT a FROM t1 WHERE r > 3 ORDER BY a DESC
   7354   }
   7355 } {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}
   7356 do_test boundary2-2.64.gt.3 {
   7357   db eval {
   7358     SELECT a FROM t1 WHERE r > 3 ORDER BY r
   7359   }
   7360 } {31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   7361 do_test boundary2-2.64.gt.4 {
   7362   db eval {
   7363     SELECT a FROM t1 WHERE r > 3 ORDER BY r DESC
   7364   }
   7365 } {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}
   7366 do_test boundary2-2.64.gt.5 {
   7367   db eval {
   7368     SELECT a FROM t1 WHERE r > 3 ORDER BY x
   7369   }
   7370 } {31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   7371 do_test boundary2-2.64.ge.1 {
   7372   db eval {
   7373     SELECT a FROM t1 WHERE r >= 3 ORDER BY a
   7374   }
   7375 } {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}
   7376 do_test boundary2-2.64.ge.2 {
   7377   db eval {
   7378     SELECT a FROM t1 WHERE r >= 3 ORDER BY a DESC
   7379   }
   7380 } {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}
   7381 do_test boundary2-2.64.ge.3 {
   7382   db eval {
   7383     SELECT a FROM t1 WHERE r >= 3 ORDER BY r
   7384   }
   7385 } {5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   7386 do_test boundary2-2.64.ge.4 {
   7387   db eval {
   7388     SELECT a FROM t1 WHERE r >= 3 ORDER BY r DESC
   7389   }
   7390 } {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}
   7391 do_test boundary2-2.64.ge.5 {
   7392   db eval {
   7393     SELECT a FROM t1 WHERE r >= 3 ORDER BY x
   7394   }
   7395 } {5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   7396 do_test boundary2-2.64.lt.1 {
   7397   db eval {
   7398     SELECT a FROM t1 WHERE r < 3 ORDER BY a
   7399   }
   7400 } {1 2 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
   7401 do_test boundary2-2.64.lt.2 {
   7402   db eval {
   7403     SELECT a FROM t1 WHERE r < 3 ORDER BY a DESC
   7404   }
   7405 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 2 1}
   7406 do_test boundary2-2.64.lt.3 {
   7407   db eval {
   7408     SELECT a FROM t1 WHERE r < 3 ORDER BY r
   7409   }
   7410 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41}
   7411 do_test boundary2-2.64.lt.4 {
   7412   db eval {
   7413     SELECT a FROM t1 WHERE r < 3 ORDER BY r DESC
   7414   }
   7415 } {41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   7416 do_test boundary2-2.64.lt.5 {
   7417   db eval {
   7418     SELECT a FROM t1 WHERE r < 3 ORDER BY x
   7419   }
   7420 } {59 60 41 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   7421 do_test boundary2-2.64.le.1 {
   7422   db eval {
   7423     SELECT a FROM t1 WHERE r <= 3 ORDER BY a
   7424   }
   7425 } {1 2 5 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
   7426 do_test boundary2-2.64.le.2 {
   7427   db eval {
   7428     SELECT a FROM t1 WHERE r <= 3 ORDER BY a DESC
   7429   }
   7430 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 5 2 1}
   7431 do_test boundary2-2.64.le.3 {
   7432   db eval {
   7433     SELECT a FROM t1 WHERE r <= 3 ORDER BY r
   7434   }
   7435 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5}
   7436 do_test boundary2-2.64.le.4 {
   7437   db eval {
   7438     SELECT a FROM t1 WHERE r <= 3 ORDER BY r DESC
   7439   }
   7440 } {5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   7441 do_test boundary2-2.64.le.5 {
   7442   db eval {
   7443     SELECT a FROM t1 WHERE r <= 3 ORDER BY x
   7444   }
   7445 } {59 60 41 5 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   7446 do_test boundary2-2.65.gt.1 {
   7447   db eval {
   7448     SELECT a FROM t1 WHERE r > 9.22337303685477580800e+18 ORDER BY a
   7449   }
   7450 } {}
   7451 do_test boundary2-2.65.gt.2 {
   7452   db eval {
   7453     SELECT a FROM t1 WHERE r > 9.22337303685477580800e+18 ORDER BY a DESC
   7454   }
   7455 } {}
   7456 do_test boundary2-2.65.gt.3 {
   7457   db eval {
   7458     SELECT a FROM t1 WHERE r > 9.22337303685477580800e+18 ORDER BY r
   7459   }
   7460 } {}
   7461 do_test boundary2-2.65.gt.4 {
   7462   db eval {
   7463     SELECT a FROM t1 WHERE r > 9.22337303685477580800e+18 ORDER BY r DESC
   7464   }
   7465 } {}
   7466 do_test boundary2-2.65.gt.5 {
   7467   db eval {
   7468     SELECT a FROM t1 WHERE r > 9.22337303685477580800e+18 ORDER BY x
   7469   }
   7470 } {}
   7471 do_test boundary2-2.65.ge.1 {
   7472   db eval {
   7473     SELECT a FROM t1 WHERE r >= 9.22337303685477580800e+18 ORDER BY a
   7474   }
   7475 } {}
   7476 do_test boundary2-2.65.ge.2 {
   7477   db eval {
   7478     SELECT a FROM t1 WHERE r >= 9.22337303685477580800e+18 ORDER BY a DESC
   7479   }
   7480 } {}
   7481 do_test boundary2-2.65.ge.3 {
   7482   db eval {
   7483     SELECT a FROM t1 WHERE r >= 9.22337303685477580800e+18 ORDER BY r
   7484   }
   7485 } {}
   7486 do_test boundary2-2.65.ge.4 {
   7487   db eval {
   7488     SELECT a FROM t1 WHERE r >= 9.22337303685477580800e+18 ORDER BY r DESC
   7489   }
   7490 } {}
   7491 do_test boundary2-2.65.ge.5 {
   7492   db eval {
   7493     SELECT a FROM t1 WHERE r >= 9.22337303685477580800e+18 ORDER BY x
   7494   }
   7495 } {}
   7496 do_test boundary2-2.65.lt.1 {
   7497   db eval {
   7498     SELECT a FROM t1 WHERE r < 9.22337303685477580800e+18 ORDER BY a
   7499   }
   7500 } {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}
   7501 do_test boundary2-2.65.lt.2 {
   7502   db eval {
   7503     SELECT a FROM t1 WHERE r < 9.22337303685477580800e+18 ORDER BY a DESC
   7504   }
   7505 } {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}
   7506 do_test boundary2-2.65.lt.3 {
   7507   db eval {
   7508     SELECT a FROM t1 WHERE r < 9.22337303685477580800e+18 ORDER BY r
   7509   }
   7510 } {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}
   7511 do_test boundary2-2.65.lt.4 {
   7512   db eval {
   7513     SELECT a FROM t1 WHERE r < 9.22337303685477580800e+18 ORDER BY r DESC
   7514   }
   7515 } {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}
   7516 do_test boundary2-2.65.lt.5 {
   7517   db eval {
   7518     SELECT a FROM t1 WHERE r < 9.22337303685477580800e+18 ORDER BY x
   7519   }
   7520 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   7521 do_test boundary2-2.65.le.1 {
   7522   db eval {
   7523     SELECT a FROM t1 WHERE r <= 9.22337303685477580800e+18 ORDER BY a
   7524   }
   7525 } {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}
   7526 do_test boundary2-2.65.le.2 {
   7527   db eval {
   7528     SELECT a FROM t1 WHERE r <= 9.22337303685477580800e+18 ORDER BY a DESC
   7529   }
   7530 } {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}
   7531 do_test boundary2-2.65.le.3 {
   7532   db eval {
   7533     SELECT a FROM t1 WHERE r <= 9.22337303685477580800e+18 ORDER BY r
   7534   }
   7535 } {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}
   7536 do_test boundary2-2.65.le.4 {
   7537   db eval {
   7538     SELECT a FROM t1 WHERE r <= 9.22337303685477580800e+18 ORDER BY r DESC
   7539   }
   7540 } {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}
   7541 do_test boundary2-2.65.le.5 {
   7542   db eval {
   7543     SELECT a FROM t1 WHERE r <= 9.22337303685477580800e+18 ORDER BY x
   7544   }
   7545 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   7546 do_test boundary2-2.66.gt.1 {
   7547   db eval {
   7548     SELECT a FROM t1 WHERE r > -9.22337303685477580800e+18 ORDER BY a
   7549   }
   7550 } {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}
   7551 do_test boundary2-2.66.gt.2 {
   7552   db eval {
   7553     SELECT a FROM t1 WHERE r > -9.22337303685477580800e+18 ORDER BY a DESC
   7554   }
   7555 } {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}
   7556 do_test boundary2-2.66.gt.3 {
   7557   db eval {
   7558     SELECT a FROM t1 WHERE r > -9.22337303685477580800e+18 ORDER BY r
   7559   }
   7560 } {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}
   7561 do_test boundary2-2.66.gt.4 {
   7562   db eval {
   7563     SELECT a FROM t1 WHERE r > -9.22337303685477580800e+18 ORDER BY r DESC
   7564   }
   7565 } {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}
   7566 do_test boundary2-2.66.gt.5 {
   7567   db eval {
   7568     SELECT a FROM t1 WHERE r > -9.22337303685477580800e+18 ORDER BY x
   7569   }
   7570 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   7571 do_test boundary2-2.66.ge.1 {
   7572   db eval {
   7573     SELECT a FROM t1 WHERE r >= -9.22337303685477580800e+18 ORDER BY a
   7574   }
   7575 } {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}
   7576 do_test boundary2-2.66.ge.2 {
   7577   db eval {
   7578     SELECT a FROM t1 WHERE r >= -9.22337303685477580800e+18 ORDER BY a DESC
   7579   }
   7580 } {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}
   7581 do_test boundary2-2.66.ge.3 {
   7582   db eval {
   7583     SELECT a FROM t1 WHERE r >= -9.22337303685477580800e+18 ORDER BY r
   7584   }
   7585 } {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}
   7586 do_test boundary2-2.66.ge.4 {
   7587   db eval {
   7588     SELECT a FROM t1 WHERE r >= -9.22337303685477580800e+18 ORDER BY r DESC
   7589   }
   7590 } {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}
   7591 do_test boundary2-2.66.ge.5 {
   7592   db eval {
   7593     SELECT a FROM t1 WHERE r >= -9.22337303685477580800e+18 ORDER BY x
   7594   }
   7595 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   7596 do_test boundary2-2.66.lt.1 {
   7597   db eval {
   7598     SELECT a FROM t1 WHERE r < -9.22337303685477580800e+18 ORDER BY a
   7599   }
   7600 } {}
   7601 do_test boundary2-2.66.lt.2 {
   7602   db eval {
   7603     SELECT a FROM t1 WHERE r < -9.22337303685477580800e+18 ORDER BY a DESC
   7604   }
   7605 } {}
   7606 do_test boundary2-2.66.lt.3 {
   7607   db eval {
   7608     SELECT a FROM t1 WHERE r < -9.22337303685477580800e+18 ORDER BY r
   7609   }
   7610 } {}
   7611 do_test boundary2-2.66.lt.4 {
   7612   db eval {
   7613     SELECT a FROM t1 WHERE r < -9.22337303685477580800e+18 ORDER BY r DESC
   7614   }
   7615 } {}
   7616 do_test boundary2-2.66.lt.5 {
   7617   db eval {
   7618     SELECT a FROM t1 WHERE r < -9.22337303685477580800e+18 ORDER BY x
   7619   }
   7620 } {}
   7621 do_test boundary2-2.66.le.1 {
   7622   db eval {
   7623     SELECT a FROM t1 WHERE r <= -9.22337303685477580800e+18 ORDER BY a
   7624   }
   7625 } {}
   7626 do_test boundary2-2.66.le.2 {
   7627   db eval {
   7628     SELECT a FROM t1 WHERE r <= -9.22337303685477580800e+18 ORDER BY a DESC
   7629   }
   7630 } {}
   7631 do_test boundary2-2.66.le.3 {
   7632   db eval {
   7633     SELECT a FROM t1 WHERE r <= -9.22337303685477580800e+18 ORDER BY r
   7634   }
   7635 } {}
   7636 do_test boundary2-2.66.le.4 {
   7637   db eval {
   7638     SELECT a FROM t1 WHERE r <= -9.22337303685477580800e+18 ORDER BY r DESC
   7639   }
   7640 } {}
   7641 do_test boundary2-2.66.le.5 {
   7642   db eval {
   7643     SELECT a FROM t1 WHERE r <= -9.22337303685477580800e+18 ORDER BY x
   7644   }
   7645 } {}
   7646 do_test boundary2-3.1 {
   7647   db eval {
   7648     DROP INDEX t1i1;
   7649     DROP INDEX t1i2;
   7650     DROP INDEX t1i3;
   7651   }
   7652 } {}
   7653 do_test boundary2-4.1.1 {
   7654   db eval {
   7655     SELECT * FROM t1 WHERE r=72057594037927935
   7656   }
   7657 } {72057594037927935 17 00ffffffffffffff}
   7658 do_test boundary2-4.1.2 {
   7659   db eval {
   7660     SELECT r, a FROM t1 WHERE x='00ffffffffffffff'
   7661   }
   7662 } {72057594037927935 17}
   7663 do_test boundary2-4.1.3 {
   7664   db eval {
   7665     SELECT r, x FROM t1 WHERE a=17
   7666   }
   7667 } {72057594037927935 00ffffffffffffff}
   7668 do_test boundary2-4.1.gt.1 {
   7669   db eval {
   7670     SELECT a FROM t1 WHERE r > 72057594037927935 ORDER BY a
   7671   }
   7672 } {3 28}
   7673 do_test boundary2-4.1.gt.2 {
   7674   db eval {
   7675     SELECT a FROM t1 WHERE r > 72057594037927935 ORDER BY a DESC
   7676   }
   7677 } {28 3}
   7678 do_test boundary2-4.1.gt.3 {
   7679   db eval {
   7680     SELECT a FROM t1 WHERE r > 72057594037927935 ORDER BY r
   7681   }
   7682 } {28 3}
   7683 do_test boundary2-4.1.gt.4 {
   7684   db eval {
   7685     SELECT a FROM t1 WHERE r > 72057594037927935 ORDER BY r DESC
   7686   }
   7687 } {3 28}
   7688 do_test boundary2-4.1.gt.5 {
   7689   db eval {
   7690     SELECT a FROM t1 WHERE r > 72057594037927935 ORDER BY x
   7691   }
   7692 } {28 3}
   7693 do_test boundary2-4.1.ge.1 {
   7694   db eval {
   7695     SELECT a FROM t1 WHERE r >= 72057594037927935 ORDER BY a
   7696   }
   7697 } {3 17 28}
   7698 do_test boundary2-4.1.ge.2 {
   7699   db eval {
   7700     SELECT a FROM t1 WHERE r >= 72057594037927935 ORDER BY a DESC
   7701   }
   7702 } {28 17 3}
   7703 do_test boundary2-4.1.ge.3 {
   7704   db eval {
   7705     SELECT a FROM t1 WHERE r >= 72057594037927935 ORDER BY r
   7706   }
   7707 } {17 28 3}
   7708 do_test boundary2-4.1.ge.4 {
   7709   db eval {
   7710     SELECT a FROM t1 WHERE r >= 72057594037927935 ORDER BY r DESC
   7711   }
   7712 } {3 28 17}
   7713 do_test boundary2-4.1.ge.5 {
   7714   db eval {
   7715     SELECT a FROM t1 WHERE r >= 72057594037927935 ORDER BY x
   7716   }
   7717 } {17 28 3}
   7718 do_test boundary2-4.1.lt.1 {
   7719   db eval {
   7720     SELECT a FROM t1 WHERE r < 72057594037927935 ORDER BY a
   7721   }
   7722 } {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}
   7723 do_test boundary2-4.1.lt.2 {
   7724   db eval {
   7725     SELECT a FROM t1 WHERE r < 72057594037927935 ORDER BY a DESC
   7726   }
   7727 } {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}
   7728 do_test boundary2-4.1.lt.3 {
   7729   db eval {
   7730     SELECT a FROM t1 WHERE r < 72057594037927935 ORDER BY r
   7731   }
   7732 } {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}
   7733 do_test boundary2-4.1.lt.4 {
   7734   db eval {
   7735     SELECT a FROM t1 WHERE r < 72057594037927935 ORDER BY r DESC
   7736   }
   7737 } {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}
   7738 do_test boundary2-4.1.lt.5 {
   7739   db eval {
   7740     SELECT a FROM t1 WHERE r < 72057594037927935 ORDER BY x
   7741   }
   7742 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 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}
   7743 do_test boundary2-4.1.le.1 {
   7744   db eval {
   7745     SELECT a FROM t1 WHERE r <= 72057594037927935 ORDER BY a
   7746   }
   7747 } {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}
   7748 do_test boundary2-4.1.le.2 {
   7749   db eval {
   7750     SELECT a FROM t1 WHERE r <= 72057594037927935 ORDER BY a DESC
   7751   }
   7752 } {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}
   7753 do_test boundary2-4.1.le.3 {
   7754   db eval {
   7755     SELECT a FROM t1 WHERE r <= 72057594037927935 ORDER BY r
   7756   }
   7757 } {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}
   7758 do_test boundary2-4.1.le.4 {
   7759   db eval {
   7760     SELECT a FROM t1 WHERE r <= 72057594037927935 ORDER BY r DESC
   7761   }
   7762 } {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}
   7763 do_test boundary2-4.1.le.5 {
   7764   db eval {
   7765     SELECT a FROM t1 WHERE r <= 72057594037927935 ORDER BY x
   7766   }
   7767 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 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}
   7768 do_test boundary2-4.2.1 {
   7769   db eval {
   7770     SELECT * FROM t1 WHERE r=16384
   7771   }
   7772 } {16384 16 0000000000004000}
   7773 do_test boundary2-4.2.2 {
   7774   db eval {
   7775     SELECT r, a FROM t1 WHERE x='0000000000004000'
   7776   }
   7777 } {16384 16}
   7778 do_test boundary2-4.2.3 {
   7779   db eval {
   7780     SELECT r, x FROM t1 WHERE a=16
   7781   }
   7782 } {16384 0000000000004000}
   7783 do_test boundary2-4.2.gt.1 {
   7784   db eval {
   7785     SELECT a FROM t1 WHERE r > 16384 ORDER BY a
   7786   }
   7787 } {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}
   7788 do_test boundary2-4.2.gt.2 {
   7789   db eval {
   7790     SELECT a FROM t1 WHERE r > 16384 ORDER BY a DESC
   7791   }
   7792 } {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}
   7793 do_test boundary2-4.2.gt.3 {
   7794   db eval {
   7795     SELECT a FROM t1 WHERE r > 16384 ORDER BY r
   7796   }
   7797 } {23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   7798 do_test boundary2-4.2.gt.4 {
   7799   db eval {
   7800     SELECT a FROM t1 WHERE r > 16384 ORDER BY r DESC
   7801   }
   7802 } {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}
   7803 do_test boundary2-4.2.gt.5 {
   7804   db eval {
   7805     SELECT a FROM t1 WHERE r > 16384 ORDER BY x
   7806   }
   7807 } {23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   7808 do_test boundary2-4.2.ge.1 {
   7809   db eval {
   7810     SELECT a FROM t1 WHERE r >= 16384 ORDER BY a
   7811   }
   7812 } {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}
   7813 do_test boundary2-4.2.ge.2 {
   7814   db eval {
   7815     SELECT a FROM t1 WHERE r >= 16384 ORDER BY a DESC
   7816   }
   7817 } {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}
   7818 do_test boundary2-4.2.ge.3 {
   7819   db eval {
   7820     SELECT a FROM t1 WHERE r >= 16384 ORDER BY r
   7821   }
   7822 } {16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   7823 do_test boundary2-4.2.ge.4 {
   7824   db eval {
   7825     SELECT a FROM t1 WHERE r >= 16384 ORDER BY r DESC
   7826   }
   7827 } {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}
   7828 do_test boundary2-4.2.ge.5 {
   7829   db eval {
   7830     SELECT a FROM t1 WHERE r >= 16384 ORDER BY x
   7831   }
   7832 } {16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   7833 do_test boundary2-4.2.lt.1 {
   7834   db eval {
   7835     SELECT a FROM t1 WHERE r < 16384 ORDER BY a
   7836   }
   7837 } {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}
   7838 do_test boundary2-4.2.lt.2 {
   7839   db eval {
   7840     SELECT a FROM t1 WHERE r < 16384 ORDER BY a DESC
   7841   }
   7842 } {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}
   7843 do_test boundary2-4.2.lt.3 {
   7844   db eval {
   7845     SELECT a FROM t1 WHERE r < 16384 ORDER BY r
   7846   }
   7847 } {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}
   7848 do_test boundary2-4.2.lt.4 {
   7849   db eval {
   7850     SELECT a FROM t1 WHERE r < 16384 ORDER BY r DESC
   7851   }
   7852 } {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}
   7853 do_test boundary2-4.2.lt.5 {
   7854   db eval {
   7855     SELECT a FROM t1 WHERE r < 16384 ORDER BY x
   7856   }
   7857 } {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}
   7858 do_test boundary2-4.2.le.1 {
   7859   db eval {
   7860     SELECT a FROM t1 WHERE r <= 16384 ORDER BY a
   7861   }
   7862 } {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}
   7863 do_test boundary2-4.2.le.2 {
   7864   db eval {
   7865     SELECT a FROM t1 WHERE r <= 16384 ORDER BY a DESC
   7866   }
   7867 } {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}
   7868 do_test boundary2-4.2.le.3 {
   7869   db eval {
   7870     SELECT a FROM t1 WHERE r <= 16384 ORDER BY r
   7871   }
   7872 } {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}
   7873 do_test boundary2-4.2.le.4 {
   7874   db eval {
   7875     SELECT a FROM t1 WHERE r <= 16384 ORDER BY r DESC
   7876   }
   7877 } {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}
   7878 do_test boundary2-4.2.le.5 {
   7879   db eval {
   7880     SELECT a FROM t1 WHERE r <= 16384 ORDER BY x
   7881   }
   7882 } {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}
   7883 do_test boundary2-4.3.1 {
   7884   db eval {
   7885     SELECT * FROM t1 WHERE r=4294967296
   7886   }
   7887 } {4294967296 36 0000000100000000}
   7888 do_test boundary2-4.3.2 {
   7889   db eval {
   7890     SELECT r, a FROM t1 WHERE x='0000000100000000'
   7891   }
   7892 } {4294967296 36}
   7893 do_test boundary2-4.3.3 {
   7894   db eval {
   7895     SELECT r, x FROM t1 WHERE a=36
   7896   }
   7897 } {4294967296 0000000100000000}
   7898 do_test boundary2-4.3.gt.1 {
   7899   db eval {
   7900     SELECT a FROM t1 WHERE r > 4294967296 ORDER BY a
   7901   }
   7902 } {3 7 10 13 17 19 22 25 26 27 28 34 35 39 43 45 46 56 57}
   7903 do_test boundary2-4.3.gt.2 {
   7904   db eval {
   7905     SELECT a FROM t1 WHERE r > 4294967296 ORDER BY a DESC
   7906   }
   7907 } {57 56 46 45 43 39 35 34 28 27 26 25 22 19 17 13 10 7 3}
   7908 do_test boundary2-4.3.gt.3 {
   7909   db eval {
   7910     SELECT a FROM t1 WHERE r > 4294967296 ORDER BY r
   7911   }
   7912 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   7913 do_test boundary2-4.3.gt.4 {
   7914   db eval {
   7915     SELECT a FROM t1 WHERE r > 4294967296 ORDER BY r DESC
   7916   }
   7917 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39}
   7918 do_test boundary2-4.3.gt.5 {
   7919   db eval {
   7920     SELECT a FROM t1 WHERE r > 4294967296 ORDER BY x
   7921   }
   7922 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   7923 do_test boundary2-4.3.ge.1 {
   7924   db eval {
   7925     SELECT a FROM t1 WHERE r >= 4294967296 ORDER BY a
   7926   }
   7927 } {3 7 10 13 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
   7928 do_test boundary2-4.3.ge.2 {
   7929   db eval {
   7930     SELECT a FROM t1 WHERE r >= 4294967296 ORDER BY a DESC
   7931   }
   7932 } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 13 10 7 3}
   7933 do_test boundary2-4.3.ge.3 {
   7934   db eval {
   7935     SELECT a FROM t1 WHERE r >= 4294967296 ORDER BY r
   7936   }
   7937 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   7938 do_test boundary2-4.3.ge.4 {
   7939   db eval {
   7940     SELECT a FROM t1 WHERE r >= 4294967296 ORDER BY r DESC
   7941   }
   7942 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36}
   7943 do_test boundary2-4.3.ge.5 {
   7944   db eval {
   7945     SELECT a FROM t1 WHERE r >= 4294967296 ORDER BY x
   7946   }
   7947 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   7948 do_test boundary2-4.3.lt.1 {
   7949   db eval {
   7950     SELECT a FROM t1 WHERE r < 4294967296 ORDER BY a
   7951   }
   7952 } {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}
   7953 do_test boundary2-4.3.lt.2 {
   7954   db eval {
   7955     SELECT a FROM t1 WHERE r < 4294967296 ORDER BY a DESC
   7956   }
   7957 } {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}
   7958 do_test boundary2-4.3.lt.3 {
   7959   db eval {
   7960     SELECT a FROM t1 WHERE r < 4294967296 ORDER BY r
   7961   }
   7962 } {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}
   7963 do_test boundary2-4.3.lt.4 {
   7964   db eval {
   7965     SELECT a FROM t1 WHERE r < 4294967296 ORDER BY r DESC
   7966   }
   7967 } {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}
   7968 do_test boundary2-4.3.lt.5 {
   7969   db eval {
   7970     SELECT a FROM t1 WHERE r < 4294967296 ORDER BY x
   7971   }
   7972 } {59 60 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}
   7973 do_test boundary2-4.3.le.1 {
   7974   db eval {
   7975     SELECT a FROM t1 WHERE r <= 4294967296 ORDER BY a
   7976   }
   7977 } {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}
   7978 do_test boundary2-4.3.le.2 {
   7979   db eval {
   7980     SELECT a FROM t1 WHERE r <= 4294967296 ORDER BY a DESC
   7981   }
   7982 } {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}
   7983 do_test boundary2-4.3.le.3 {
   7984   db eval {
   7985     SELECT a FROM t1 WHERE r <= 4294967296 ORDER BY r
   7986   }
   7987 } {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}
   7988 do_test boundary2-4.3.le.4 {
   7989   db eval {
   7990     SELECT a FROM t1 WHERE r <= 4294967296 ORDER BY r DESC
   7991   }
   7992 } {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}
   7993 do_test boundary2-4.3.le.5 {
   7994   db eval {
   7995     SELECT a FROM t1 WHERE r <= 4294967296 ORDER BY x
   7996   }
   7997 } {59 60 41 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}
   7998 do_test boundary2-4.4.1 {
   7999   db eval {
   8000     SELECT * FROM t1 WHERE r=16777216
   8001   }
   8002 } {16777216 6 0000000001000000}
   8003 do_test boundary2-4.4.2 {
   8004   db eval {
   8005     SELECT r, a FROM t1 WHERE x='0000000001000000'
   8006   }
   8007 } {16777216 6}
   8008 do_test boundary2-4.4.3 {
   8009   db eval {
   8010     SELECT r, x FROM t1 WHERE a=6
   8011   }
   8012 } {16777216 0000000001000000}
   8013 do_test boundary2-4.4.gt.1 {
   8014   db eval {
   8015     SELECT a FROM t1 WHERE r > 16777216 ORDER BY a
   8016   }
   8017 } {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}
   8018 do_test boundary2-4.4.gt.2 {
   8019   db eval {
   8020     SELECT a FROM t1 WHERE r > 16777216 ORDER BY a DESC
   8021   }
   8022 } {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}
   8023 do_test boundary2-4.4.gt.3 {
   8024   db eval {
   8025     SELECT a FROM t1 WHERE r > 16777216 ORDER BY r
   8026   }
   8027 } {12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8028 do_test boundary2-4.4.gt.4 {
   8029   db eval {
   8030     SELECT a FROM t1 WHERE r > 16777216 ORDER BY r DESC
   8031   }
   8032 } {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}
   8033 do_test boundary2-4.4.gt.5 {
   8034   db eval {
   8035     SELECT a FROM t1 WHERE r > 16777216 ORDER BY x
   8036   }
   8037 } {12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8038 do_test boundary2-4.4.ge.1 {
   8039   db eval {
   8040     SELECT a FROM t1 WHERE r >= 16777216 ORDER BY a
   8041   }
   8042 } {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}
   8043 do_test boundary2-4.4.ge.2 {
   8044   db eval {
   8045     SELECT a FROM t1 WHERE r >= 16777216 ORDER BY a DESC
   8046   }
   8047 } {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}
   8048 do_test boundary2-4.4.ge.3 {
   8049   db eval {
   8050     SELECT a FROM t1 WHERE r >= 16777216 ORDER BY r
   8051   }
   8052 } {6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8053 do_test boundary2-4.4.ge.4 {
   8054   db eval {
   8055     SELECT a FROM t1 WHERE r >= 16777216 ORDER BY r DESC
   8056   }
   8057 } {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}
   8058 do_test boundary2-4.4.ge.5 {
   8059   db eval {
   8060     SELECT a FROM t1 WHERE r >= 16777216 ORDER BY x
   8061   }
   8062 } {6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8063 do_test boundary2-4.4.lt.1 {
   8064   db eval {
   8065     SELECT a FROM t1 WHERE r < 16777216 ORDER BY a
   8066   }
   8067 } {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}
   8068 do_test boundary2-4.4.lt.2 {
   8069   db eval {
   8070     SELECT a FROM t1 WHERE r < 16777216 ORDER BY a DESC
   8071   }
   8072 } {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}
   8073 do_test boundary2-4.4.lt.3 {
   8074   db eval {
   8075     SELECT a FROM t1 WHERE r < 16777216 ORDER BY r
   8076   }
   8077 } {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}
   8078 do_test boundary2-4.4.lt.4 {
   8079   db eval {
   8080     SELECT a FROM t1 WHERE r < 16777216 ORDER BY r DESC
   8081   }
   8082 } {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}
   8083 do_test boundary2-4.4.lt.5 {
   8084   db eval {
   8085     SELECT a FROM t1 WHERE r < 16777216 ORDER BY x
   8086   }
   8087 } {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}
   8088 do_test boundary2-4.4.le.1 {
   8089   db eval {
   8090     SELECT a FROM t1 WHERE r <= 16777216 ORDER BY a
   8091   }
   8092 } {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}
   8093 do_test boundary2-4.4.le.2 {
   8094   db eval {
   8095     SELECT a FROM t1 WHERE r <= 16777216 ORDER BY a DESC
   8096   }
   8097 } {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}
   8098 do_test boundary2-4.4.le.3 {
   8099   db eval {
   8100     SELECT a FROM t1 WHERE r <= 16777216 ORDER BY r
   8101   }
   8102 } {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}
   8103 do_test boundary2-4.4.le.4 {
   8104   db eval {
   8105     SELECT a FROM t1 WHERE r <= 16777216 ORDER BY r DESC
   8106   }
   8107 } {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}
   8108 do_test boundary2-4.4.le.5 {
   8109   db eval {
   8110     SELECT a FROM t1 WHERE r <= 16777216 ORDER BY x
   8111   }
   8112 } {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}
   8113 do_test boundary2-4.5.1 {
   8114   db eval {
   8115     SELECT * FROM t1 WHERE r=-32769
   8116   }
   8117 } {-32769 29 ffffffffffff7fff}
   8118 do_test boundary2-4.5.2 {
   8119   db eval {
   8120     SELECT r, a FROM t1 WHERE x='ffffffffffff7fff'
   8121   }
   8122 } {-32769 29}
   8123 do_test boundary2-4.5.3 {
   8124   db eval {
   8125     SELECT r, x FROM t1 WHERE a=29
   8126   }
   8127 } {-32769 ffffffffffff7fff}
   8128 do_test boundary2-4.5.gt.1 {
   8129   db eval {
   8130     SELECT a FROM t1 WHERE r > -32769 ORDER BY a
   8131   }
   8132 } {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}
   8133 do_test boundary2-4.5.gt.2 {
   8134   db eval {
   8135     SELECT a FROM t1 WHERE r > -32769 ORDER BY a DESC
   8136   }
   8137 } {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}
   8138 do_test boundary2-4.5.gt.3 {
   8139   db eval {
   8140     SELECT a FROM t1 WHERE r > -32769 ORDER BY r
   8141   }
   8142 } {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}
   8143 do_test boundary2-4.5.gt.4 {
   8144   db eval {
   8145     SELECT a FROM t1 WHERE r > -32769 ORDER BY r DESC
   8146   }
   8147 } {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}
   8148 do_test boundary2-4.5.gt.5 {
   8149   db eval {
   8150     SELECT a FROM t1 WHERE r > -32769 ORDER BY x
   8151   }
   8152 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   8153 do_test boundary2-4.5.ge.1 {
   8154   db eval {
   8155     SELECT a FROM t1 WHERE r >= -32769 ORDER BY a
   8156   }
   8157 } {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}
   8158 do_test boundary2-4.5.ge.2 {
   8159   db eval {
   8160     SELECT a FROM t1 WHERE r >= -32769 ORDER BY a DESC
   8161   }
   8162 } {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}
   8163 do_test boundary2-4.5.ge.3 {
   8164   db eval {
   8165     SELECT a FROM t1 WHERE r >= -32769 ORDER BY r
   8166   }
   8167 } {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}
   8168 do_test boundary2-4.5.ge.4 {
   8169   db eval {
   8170     SELECT a FROM t1 WHERE r >= -32769 ORDER BY r DESC
   8171   }
   8172 } {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}
   8173 do_test boundary2-4.5.ge.5 {
   8174   db eval {
   8175     SELECT a FROM t1 WHERE r >= -32769 ORDER BY x
   8176   }
   8177 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   8178 do_test boundary2-4.5.lt.1 {
   8179   db eval {
   8180     SELECT a FROM t1 WHERE r < -32769 ORDER BY a
   8181   }
   8182 } {1 2 11 21 37 44 47 55 58 63 64}
   8183 do_test boundary2-4.5.lt.2 {
   8184   db eval {
   8185     SELECT a FROM t1 WHERE r < -32769 ORDER BY a DESC
   8186   }
   8187 } {64 63 58 55 47 44 37 21 11 2 1}
   8188 do_test boundary2-4.5.lt.3 {
   8189   db eval {
   8190     SELECT a FROM t1 WHERE r < -32769 ORDER BY r
   8191   }
   8192 } {55 2 64 21 44 58 63 47 11 1 37}
   8193 do_test boundary2-4.5.lt.4 {
   8194   db eval {
   8195     SELECT a FROM t1 WHERE r < -32769 ORDER BY r DESC
   8196   }
   8197 } {37 1 11 47 63 58 44 21 64 2 55}
   8198 do_test boundary2-4.5.lt.5 {
   8199   db eval {
   8200     SELECT a FROM t1 WHERE r < -32769 ORDER BY x
   8201   }
   8202 } {55 2 64 21 44 58 63 47 11 1 37}
   8203 do_test boundary2-4.5.le.1 {
   8204   db eval {
   8205     SELECT a FROM t1 WHERE r <= -32769 ORDER BY a
   8206   }
   8207 } {1 2 11 21 29 37 44 47 55 58 63 64}
   8208 do_test boundary2-4.5.le.2 {
   8209   db eval {
   8210     SELECT a FROM t1 WHERE r <= -32769 ORDER BY a DESC
   8211   }
   8212 } {64 63 58 55 47 44 37 29 21 11 2 1}
   8213 do_test boundary2-4.5.le.3 {
   8214   db eval {
   8215     SELECT a FROM t1 WHERE r <= -32769 ORDER BY r
   8216   }
   8217 } {55 2 64 21 44 58 63 47 11 1 37 29}
   8218 do_test boundary2-4.5.le.4 {
   8219   db eval {
   8220     SELECT a FROM t1 WHERE r <= -32769 ORDER BY r DESC
   8221   }
   8222 } {29 37 1 11 47 63 58 44 21 64 2 55}
   8223 do_test boundary2-4.5.le.5 {
   8224   db eval {
   8225     SELECT a FROM t1 WHERE r <= -32769 ORDER BY x
   8226   }
   8227 } {55 2 64 21 44 58 63 47 11 1 37 29}
   8228 do_test boundary2-4.6.1 {
   8229   db eval {
   8230     SELECT * FROM t1 WHERE r=-140737488355329
   8231   }
   8232 } {-140737488355329 21 ffff7fffffffffff}
   8233 do_test boundary2-4.6.2 {
   8234   db eval {
   8235     SELECT r, a FROM t1 WHERE x='ffff7fffffffffff'
   8236   }
   8237 } {-140737488355329 21}
   8238 do_test boundary2-4.6.3 {
   8239   db eval {
   8240     SELECT r, x FROM t1 WHERE a=21
   8241   }
   8242 } {-140737488355329 ffff7fffffffffff}
   8243 do_test boundary2-4.6.gt.1 {
   8244   db eval {
   8245     SELECT a FROM t1 WHERE r > -140737488355329 ORDER BY a
   8246   }
   8247 } {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}
   8248 do_test boundary2-4.6.gt.2 {
   8249   db eval {
   8250     SELECT a FROM t1 WHERE r > -140737488355329 ORDER BY a DESC
   8251   }
   8252 } {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}
   8253 do_test boundary2-4.6.gt.3 {
   8254   db eval {
   8255     SELECT a FROM t1 WHERE r > -140737488355329 ORDER BY r
   8256   }
   8257 } {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}
   8258 do_test boundary2-4.6.gt.4 {
   8259   db eval {
   8260     SELECT a FROM t1 WHERE r > -140737488355329 ORDER BY r DESC
   8261   }
   8262 } {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}
   8263 do_test boundary2-4.6.gt.5 {
   8264   db eval {
   8265     SELECT a FROM t1 WHERE r > -140737488355329 ORDER BY x
   8266   }
   8267 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   8268 do_test boundary2-4.6.ge.1 {
   8269   db eval {
   8270     SELECT a FROM t1 WHERE r >= -140737488355329 ORDER BY a
   8271   }
   8272 } {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}
   8273 do_test boundary2-4.6.ge.2 {
   8274   db eval {
   8275     SELECT a FROM t1 WHERE r >= -140737488355329 ORDER BY a DESC
   8276   }
   8277 } {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}
   8278 do_test boundary2-4.6.ge.3 {
   8279   db eval {
   8280     SELECT a FROM t1 WHERE r >= -140737488355329 ORDER BY r
   8281   }
   8282 } {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}
   8283 do_test boundary2-4.6.ge.4 {
   8284   db eval {
   8285     SELECT a FROM t1 WHERE r >= -140737488355329 ORDER BY r DESC
   8286   }
   8287 } {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}
   8288 do_test boundary2-4.6.ge.5 {
   8289   db eval {
   8290     SELECT a FROM t1 WHERE r >= -140737488355329 ORDER BY x
   8291   }
   8292 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   8293 do_test boundary2-4.6.lt.1 {
   8294   db eval {
   8295     SELECT a FROM t1 WHERE r < -140737488355329 ORDER BY a
   8296   }
   8297 } {2 55 64}
   8298 do_test boundary2-4.6.lt.2 {
   8299   db eval {
   8300     SELECT a FROM t1 WHERE r < -140737488355329 ORDER BY a DESC
   8301   }
   8302 } {64 55 2}
   8303 do_test boundary2-4.6.lt.3 {
   8304   db eval {
   8305     SELECT a FROM t1 WHERE r < -140737488355329 ORDER BY r
   8306   }
   8307 } {55 2 64}
   8308 do_test boundary2-4.6.lt.4 {
   8309   db eval {
   8310     SELECT a FROM t1 WHERE r < -140737488355329 ORDER BY r DESC
   8311   }
   8312 } {64 2 55}
   8313 do_test boundary2-4.6.lt.5 {
   8314   db eval {
   8315     SELECT a FROM t1 WHERE r < -140737488355329 ORDER BY x
   8316   }
   8317 } {55 2 64}
   8318 do_test boundary2-4.6.le.1 {
   8319   db eval {
   8320     SELECT a FROM t1 WHERE r <= -140737488355329 ORDER BY a
   8321   }
   8322 } {2 21 55 64}
   8323 do_test boundary2-4.6.le.2 {
   8324   db eval {
   8325     SELECT a FROM t1 WHERE r <= -140737488355329 ORDER BY a DESC
   8326   }
   8327 } {64 55 21 2}
   8328 do_test boundary2-4.6.le.3 {
   8329   db eval {
   8330     SELECT a FROM t1 WHERE r <= -140737488355329 ORDER BY r
   8331   }
   8332 } {55 2 64 21}
   8333 do_test boundary2-4.6.le.4 {
   8334   db eval {
   8335     SELECT a FROM t1 WHERE r <= -140737488355329 ORDER BY r DESC
   8336   }
   8337 } {21 64 2 55}
   8338 do_test boundary2-4.6.le.5 {
   8339   db eval {
   8340     SELECT a FROM t1 WHERE r <= -140737488355329 ORDER BY x
   8341   }
   8342 } {55 2 64 21}
   8343 do_test boundary2-4.7.1 {
   8344   db eval {
   8345     SELECT * FROM t1 WHERE r=2
   8346   }
   8347 } {2 41 0000000000000002}
   8348 do_test boundary2-4.7.2 {
   8349   db eval {
   8350     SELECT r, a FROM t1 WHERE x='0000000000000002'
   8351   }
   8352 } {2 41}
   8353 do_test boundary2-4.7.3 {
   8354   db eval {
   8355     SELECT r, x FROM t1 WHERE a=41
   8356   }
   8357 } {2 0000000000000002}
   8358 do_test boundary2-4.7.gt.1 {
   8359   db eval {
   8360     SELECT a FROM t1 WHERE r > 2 ORDER BY a
   8361   }
   8362 } {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}
   8363 do_test boundary2-4.7.gt.2 {
   8364   db eval {
   8365     SELECT a FROM t1 WHERE r > 2 ORDER BY a DESC
   8366   }
   8367 } {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}
   8368 do_test boundary2-4.7.gt.3 {
   8369   db eval {
   8370     SELECT a FROM t1 WHERE r > 2 ORDER BY r
   8371   }
   8372 } {5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8373 do_test boundary2-4.7.gt.4 {
   8374   db eval {
   8375     SELECT a FROM t1 WHERE r > 2 ORDER BY r DESC
   8376   }
   8377 } {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}
   8378 do_test boundary2-4.7.gt.5 {
   8379   db eval {
   8380     SELECT a FROM t1 WHERE r > 2 ORDER BY x
   8381   }
   8382 } {5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8383 do_test boundary2-4.7.ge.1 {
   8384   db eval {
   8385     SELECT a FROM t1 WHERE r >= 2 ORDER BY a
   8386   }
   8387 } {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}
   8388 do_test boundary2-4.7.ge.2 {
   8389   db eval {
   8390     SELECT a FROM t1 WHERE r >= 2 ORDER BY a DESC
   8391   }
   8392 } {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}
   8393 do_test boundary2-4.7.ge.3 {
   8394   db eval {
   8395     SELECT a FROM t1 WHERE r >= 2 ORDER BY r
   8396   }
   8397 } {41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8398 do_test boundary2-4.7.ge.4 {
   8399   db eval {
   8400     SELECT a FROM t1 WHERE r >= 2 ORDER BY r DESC
   8401   }
   8402 } {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}
   8403 do_test boundary2-4.7.ge.5 {
   8404   db eval {
   8405     SELECT a FROM t1 WHERE r >= 2 ORDER BY x
   8406   }
   8407 } {41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8408 do_test boundary2-4.7.lt.1 {
   8409   db eval {
   8410     SELECT a FROM t1 WHERE r < 2 ORDER BY a
   8411   }
   8412 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 60 63 64}
   8413 do_test boundary2-4.7.lt.2 {
   8414   db eval {
   8415     SELECT a FROM t1 WHERE r < 2 ORDER BY a DESC
   8416   }
   8417 } {64 63 60 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
   8418 do_test boundary2-4.7.lt.3 {
   8419   db eval {
   8420     SELECT a FROM t1 WHERE r < 2 ORDER BY r
   8421   }
   8422 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60}
   8423 do_test boundary2-4.7.lt.4 {
   8424   db eval {
   8425     SELECT a FROM t1 WHERE r < 2 ORDER BY r DESC
   8426   }
   8427 } {60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   8428 do_test boundary2-4.7.lt.5 {
   8429   db eval {
   8430     SELECT a FROM t1 WHERE r < 2 ORDER BY x
   8431   }
   8432 } {59 60 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   8433 do_test boundary2-4.7.le.1 {
   8434   db eval {
   8435     SELECT a FROM t1 WHERE r <= 2 ORDER BY a
   8436   }
   8437 } {1 2 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
   8438 do_test boundary2-4.7.le.2 {
   8439   db eval {
   8440     SELECT a FROM t1 WHERE r <= 2 ORDER BY a DESC
   8441   }
   8442 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 2 1}
   8443 do_test boundary2-4.7.le.3 {
   8444   db eval {
   8445     SELECT a FROM t1 WHERE r <= 2 ORDER BY r
   8446   }
   8447 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41}
   8448 do_test boundary2-4.7.le.4 {
   8449   db eval {
   8450     SELECT a FROM t1 WHERE r <= 2 ORDER BY r DESC
   8451   }
   8452 } {41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   8453 do_test boundary2-4.7.le.5 {
   8454   db eval {
   8455     SELECT a FROM t1 WHERE r <= 2 ORDER BY x
   8456   }
   8457 } {59 60 41 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   8458 do_test boundary2-4.8.1 {
   8459   db eval {
   8460     SELECT * FROM t1 WHERE r=4
   8461   }
   8462 } {4 31 0000000000000004}
   8463 do_test boundary2-4.8.2 {
   8464   db eval {
   8465     SELECT r, a FROM t1 WHERE x='0000000000000004'
   8466   }
   8467 } {4 31}
   8468 do_test boundary2-4.8.3 {
   8469   db eval {
   8470     SELECT r, x FROM t1 WHERE a=31
   8471   }
   8472 } {4 0000000000000004}
   8473 do_test boundary2-4.8.gt.1 {
   8474   db eval {
   8475     SELECT a FROM t1 WHERE r > 4 ORDER BY a
   8476   }
   8477 } {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}
   8478 do_test boundary2-4.8.gt.2 {
   8479   db eval {
   8480     SELECT a FROM t1 WHERE r > 4 ORDER BY a DESC
   8481   }
   8482 } {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}
   8483 do_test boundary2-4.8.gt.3 {
   8484   db eval {
   8485     SELECT a FROM t1 WHERE r > 4 ORDER BY r
   8486   }
   8487 } {4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8488 do_test boundary2-4.8.gt.4 {
   8489   db eval {
   8490     SELECT a FROM t1 WHERE r > 4 ORDER BY r DESC
   8491   }
   8492 } {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}
   8493 do_test boundary2-4.8.gt.5 {
   8494   db eval {
   8495     SELECT a FROM t1 WHERE r > 4 ORDER BY x
   8496   }
   8497 } {4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8498 do_test boundary2-4.8.ge.1 {
   8499   db eval {
   8500     SELECT a FROM t1 WHERE r >= 4 ORDER BY a
   8501   }
   8502 } {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}
   8503 do_test boundary2-4.8.ge.2 {
   8504   db eval {
   8505     SELECT a FROM t1 WHERE r >= 4 ORDER BY a DESC
   8506   }
   8507 } {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}
   8508 do_test boundary2-4.8.ge.3 {
   8509   db eval {
   8510     SELECT a FROM t1 WHERE r >= 4 ORDER BY r
   8511   }
   8512 } {31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8513 do_test boundary2-4.8.ge.4 {
   8514   db eval {
   8515     SELECT a FROM t1 WHERE r >= 4 ORDER BY r DESC
   8516   }
   8517 } {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}
   8518 do_test boundary2-4.8.ge.5 {
   8519   db eval {
   8520     SELECT a FROM t1 WHERE r >= 4 ORDER BY x
   8521   }
   8522 } {31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8523 do_test boundary2-4.8.lt.1 {
   8524   db eval {
   8525     SELECT a FROM t1 WHERE r < 4 ORDER BY a
   8526   }
   8527 } {1 2 5 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
   8528 do_test boundary2-4.8.lt.2 {
   8529   db eval {
   8530     SELECT a FROM t1 WHERE r < 4 ORDER BY a DESC
   8531   }
   8532 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 5 2 1}
   8533 do_test boundary2-4.8.lt.3 {
   8534   db eval {
   8535     SELECT a FROM t1 WHERE r < 4 ORDER BY r
   8536   }
   8537 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5}
   8538 do_test boundary2-4.8.lt.4 {
   8539   db eval {
   8540     SELECT a FROM t1 WHERE r < 4 ORDER BY r DESC
   8541   }
   8542 } {5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   8543 do_test boundary2-4.8.lt.5 {
   8544   db eval {
   8545     SELECT a FROM t1 WHERE r < 4 ORDER BY x
   8546   }
   8547 } {59 60 41 5 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   8548 do_test boundary2-4.8.le.1 {
   8549   db eval {
   8550     SELECT a FROM t1 WHERE r <= 4 ORDER BY a
   8551   }
   8552 } {1 2 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
   8553 do_test boundary2-4.8.le.2 {
   8554   db eval {
   8555     SELECT a FROM t1 WHERE r <= 4 ORDER BY a DESC
   8556   }
   8557 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 2 1}
   8558 do_test boundary2-4.8.le.3 {
   8559   db eval {
   8560     SELECT a FROM t1 WHERE r <= 4 ORDER BY r
   8561   }
   8562 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31}
   8563 do_test boundary2-4.8.le.4 {
   8564   db eval {
   8565     SELECT a FROM t1 WHERE r <= 4 ORDER BY r DESC
   8566   }
   8567 } {31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   8568 do_test boundary2-4.8.le.5 {
   8569   db eval {
   8570     SELECT a FROM t1 WHERE r <= 4 ORDER BY x
   8571   }
   8572 } {59 60 41 5 31 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   8573 do_test boundary2-4.9.1 {
   8574   db eval {
   8575     SELECT * FROM t1 WHERE r=562949953421311
   8576   }
   8577 } {562949953421311 13 0001ffffffffffff}
   8578 do_test boundary2-4.9.2 {
   8579   db eval {
   8580     SELECT r, a FROM t1 WHERE x='0001ffffffffffff'
   8581   }
   8582 } {562949953421311 13}
   8583 do_test boundary2-4.9.3 {
   8584   db eval {
   8585     SELECT r, x FROM t1 WHERE a=13
   8586   }
   8587 } {562949953421311 0001ffffffffffff}
   8588 do_test boundary2-4.9.gt.1 {
   8589   db eval {
   8590     SELECT a FROM t1 WHERE r > 562949953421311 ORDER BY a
   8591   }
   8592 } {3 17 27 28 43 45}
   8593 do_test boundary2-4.9.gt.2 {
   8594   db eval {
   8595     SELECT a FROM t1 WHERE r > 562949953421311 ORDER BY a DESC
   8596   }
   8597 } {45 43 28 27 17 3}
   8598 do_test boundary2-4.9.gt.3 {
   8599   db eval {
   8600     SELECT a FROM t1 WHERE r > 562949953421311 ORDER BY r
   8601   }
   8602 } {43 27 45 17 28 3}
   8603 do_test boundary2-4.9.gt.4 {
   8604   db eval {
   8605     SELECT a FROM t1 WHERE r > 562949953421311 ORDER BY r DESC
   8606   }
   8607 } {3 28 17 45 27 43}
   8608 do_test boundary2-4.9.gt.5 {
   8609   db eval {
   8610     SELECT a FROM t1 WHERE r > 562949953421311 ORDER BY x
   8611   }
   8612 } {43 27 45 17 28 3}
   8613 do_test boundary2-4.9.ge.1 {
   8614   db eval {
   8615     SELECT a FROM t1 WHERE r >= 562949953421311 ORDER BY a
   8616   }
   8617 } {3 13 17 27 28 43 45}
   8618 do_test boundary2-4.9.ge.2 {
   8619   db eval {
   8620     SELECT a FROM t1 WHERE r >= 562949953421311 ORDER BY a DESC
   8621   }
   8622 } {45 43 28 27 17 13 3}
   8623 do_test boundary2-4.9.ge.3 {
   8624   db eval {
   8625     SELECT a FROM t1 WHERE r >= 562949953421311 ORDER BY r
   8626   }
   8627 } {13 43 27 45 17 28 3}
   8628 do_test boundary2-4.9.ge.4 {
   8629   db eval {
   8630     SELECT a FROM t1 WHERE r >= 562949953421311 ORDER BY r DESC
   8631   }
   8632 } {3 28 17 45 27 43 13}
   8633 do_test boundary2-4.9.ge.5 {
   8634   db eval {
   8635     SELECT a FROM t1 WHERE r >= 562949953421311 ORDER BY x
   8636   }
   8637 } {13 43 27 45 17 28 3}
   8638 do_test boundary2-4.9.lt.1 {
   8639   db eval {
   8640     SELECT a FROM t1 WHERE r < 562949953421311 ORDER BY a
   8641   }
   8642 } {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}
   8643 do_test boundary2-4.9.lt.2 {
   8644   db eval {
   8645     SELECT a FROM t1 WHERE r < 562949953421311 ORDER BY a DESC
   8646   }
   8647 } {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}
   8648 do_test boundary2-4.9.lt.3 {
   8649   db eval {
   8650     SELECT a FROM t1 WHERE r < 562949953421311 ORDER BY r
   8651   }
   8652 } {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}
   8653 do_test boundary2-4.9.lt.4 {
   8654   db eval {
   8655     SELECT a FROM t1 WHERE r < 562949953421311 ORDER BY r DESC
   8656   }
   8657 } {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}
   8658 do_test boundary2-4.9.lt.5 {
   8659   db eval {
   8660     SELECT a FROM t1 WHERE r < 562949953421311 ORDER BY x
   8661   }
   8662 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 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}
   8663 do_test boundary2-4.9.le.1 {
   8664   db eval {
   8665     SELECT a FROM t1 WHERE r <= 562949953421311 ORDER BY a
   8666   }
   8667 } {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}
   8668 do_test boundary2-4.9.le.2 {
   8669   db eval {
   8670     SELECT a FROM t1 WHERE r <= 562949953421311 ORDER BY a DESC
   8671   }
   8672 } {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}
   8673 do_test boundary2-4.9.le.3 {
   8674   db eval {
   8675     SELECT a FROM t1 WHERE r <= 562949953421311 ORDER BY r
   8676   }
   8677 } {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}
   8678 do_test boundary2-4.9.le.4 {
   8679   db eval {
   8680     SELECT a FROM t1 WHERE r <= 562949953421311 ORDER BY r DESC
   8681   }
   8682 } {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}
   8683 do_test boundary2-4.9.le.5 {
   8684   db eval {
   8685     SELECT a FROM t1 WHERE r <= 562949953421311 ORDER BY x
   8686   }
   8687 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 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}
   8688 do_test boundary2-4.10.1 {
   8689   db eval {
   8690     SELECT * FROM t1 WHERE r=256
   8691   }
   8692 } {256 61 0000000000000100}
   8693 do_test boundary2-4.10.2 {
   8694   db eval {
   8695     SELECT r, a FROM t1 WHERE x='0000000000000100'
   8696   }
   8697 } {256 61}
   8698 do_test boundary2-4.10.3 {
   8699   db eval {
   8700     SELECT r, x FROM t1 WHERE a=61
   8701   }
   8702 } {256 0000000000000100}
   8703 do_test boundary2-4.10.gt.1 {
   8704   db eval {
   8705     SELECT a FROM t1 WHERE r > 256 ORDER BY a
   8706   }
   8707 } {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}
   8708 do_test boundary2-4.10.gt.2 {
   8709   db eval {
   8710     SELECT a FROM t1 WHERE r > 256 ORDER BY a DESC
   8711   }
   8712 } {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}
   8713 do_test boundary2-4.10.gt.3 {
   8714   db eval {
   8715     SELECT a FROM t1 WHERE r > 256 ORDER BY r
   8716   }
   8717 } {8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8718 do_test boundary2-4.10.gt.4 {
   8719   db eval {
   8720     SELECT a FROM t1 WHERE r > 256 ORDER BY r DESC
   8721   }
   8722 } {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}
   8723 do_test boundary2-4.10.gt.5 {
   8724   db eval {
   8725     SELECT a FROM t1 WHERE r > 256 ORDER BY x
   8726   }
   8727 } {8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8728 do_test boundary2-4.10.ge.1 {
   8729   db eval {
   8730     SELECT a FROM t1 WHERE r >= 256 ORDER BY a
   8731   }
   8732 } {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}
   8733 do_test boundary2-4.10.ge.2 {
   8734   db eval {
   8735     SELECT a FROM t1 WHERE r >= 256 ORDER BY a DESC
   8736   }
   8737 } {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}
   8738 do_test boundary2-4.10.ge.3 {
   8739   db eval {
   8740     SELECT a FROM t1 WHERE r >= 256 ORDER BY r
   8741   }
   8742 } {61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8743 do_test boundary2-4.10.ge.4 {
   8744   db eval {
   8745     SELECT a FROM t1 WHERE r >= 256 ORDER BY r DESC
   8746   }
   8747 } {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}
   8748 do_test boundary2-4.10.ge.5 {
   8749   db eval {
   8750     SELECT a FROM t1 WHERE r >= 256 ORDER BY x
   8751   }
   8752 } {61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8753 do_test boundary2-4.10.lt.1 {
   8754   db eval {
   8755     SELECT a FROM t1 WHERE r < 256 ORDER BY a
   8756   }
   8757 } {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}
   8758 do_test boundary2-4.10.lt.2 {
   8759   db eval {
   8760     SELECT a FROM t1 WHERE r < 256 ORDER BY a DESC
   8761   }
   8762 } {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}
   8763 do_test boundary2-4.10.lt.3 {
   8764   db eval {
   8765     SELECT a FROM t1 WHERE r < 256 ORDER BY r
   8766   }
   8767 } {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}
   8768 do_test boundary2-4.10.lt.4 {
   8769   db eval {
   8770     SELECT a FROM t1 WHERE r < 256 ORDER BY r DESC
   8771   }
   8772 } {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}
   8773 do_test boundary2-4.10.lt.5 {
   8774   db eval {
   8775     SELECT a FROM t1 WHERE r < 256 ORDER BY x
   8776   }
   8777 } {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}
   8778 do_test boundary2-4.10.le.1 {
   8779   db eval {
   8780     SELECT a FROM t1 WHERE r <= 256 ORDER BY a
   8781   }
   8782 } {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}
   8783 do_test boundary2-4.10.le.2 {
   8784   db eval {
   8785     SELECT a FROM t1 WHERE r <= 256 ORDER BY a DESC
   8786   }
   8787 } {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}
   8788 do_test boundary2-4.10.le.3 {
   8789   db eval {
   8790     SELECT a FROM t1 WHERE r <= 256 ORDER BY r
   8791   }
   8792 } {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}
   8793 do_test boundary2-4.10.le.4 {
   8794   db eval {
   8795     SELECT a FROM t1 WHERE r <= 256 ORDER BY r DESC
   8796   }
   8797 } {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}
   8798 do_test boundary2-4.10.le.5 {
   8799   db eval {
   8800     SELECT a FROM t1 WHERE r <= 256 ORDER BY x
   8801   }
   8802 } {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}
   8803 do_test boundary2-4.11.1 {
   8804   db eval {
   8805     SELECT * FROM t1 WHERE r=34359738368
   8806   }
   8807 } {34359738368 22 0000000800000000}
   8808 do_test boundary2-4.11.2 {
   8809   db eval {
   8810     SELECT r, a FROM t1 WHERE x='0000000800000000'
   8811   }
   8812 } {34359738368 22}
   8813 do_test boundary2-4.11.3 {
   8814   db eval {
   8815     SELECT r, x FROM t1 WHERE a=22
   8816   }
   8817 } {34359738368 0000000800000000}
   8818 do_test boundary2-4.11.gt.1 {
   8819   db eval {
   8820     SELECT a FROM t1 WHERE r > 34359738368 ORDER BY a
   8821   }
   8822 } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 46 56 57}
   8823 do_test boundary2-4.11.gt.2 {
   8824   db eval {
   8825     SELECT a FROM t1 WHERE r > 34359738368 ORDER BY a DESC
   8826   }
   8827 } {57 56 46 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
   8828 do_test boundary2-4.11.gt.3 {
   8829   db eval {
   8830     SELECT a FROM t1 WHERE r > 34359738368 ORDER BY r
   8831   }
   8832 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8833 do_test boundary2-4.11.gt.4 {
   8834   db eval {
   8835     SELECT a FROM t1 WHERE r > 34359738368 ORDER BY r DESC
   8836   }
   8837 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46}
   8838 do_test boundary2-4.11.gt.5 {
   8839   db eval {
   8840     SELECT a FROM t1 WHERE r > 34359738368 ORDER BY x
   8841   }
   8842 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8843 do_test boundary2-4.11.ge.1 {
   8844   db eval {
   8845     SELECT a FROM t1 WHERE r >= 34359738368 ORDER BY a
   8846   }
   8847 } {3 7 10 13 17 19 22 25 26 27 28 34 35 43 45 46 56 57}
   8848 do_test boundary2-4.11.ge.2 {
   8849   db eval {
   8850     SELECT a FROM t1 WHERE r >= 34359738368 ORDER BY a DESC
   8851   }
   8852 } {57 56 46 45 43 35 34 28 27 26 25 22 19 17 13 10 7 3}
   8853 do_test boundary2-4.11.ge.3 {
   8854   db eval {
   8855     SELECT a FROM t1 WHERE r >= 34359738368 ORDER BY r
   8856   }
   8857 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8858 do_test boundary2-4.11.ge.4 {
   8859   db eval {
   8860     SELECT a FROM t1 WHERE r >= 34359738368 ORDER BY r DESC
   8861   }
   8862 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22}
   8863 do_test boundary2-4.11.ge.5 {
   8864   db eval {
   8865     SELECT a FROM t1 WHERE r >= 34359738368 ORDER BY x
   8866   }
   8867 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8868 do_test boundary2-4.11.lt.1 {
   8869   db eval {
   8870     SELECT a FROM t1 WHERE r < 34359738368 ORDER BY a
   8871   }
   8872 } {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}
   8873 do_test boundary2-4.11.lt.2 {
   8874   db eval {
   8875     SELECT a FROM t1 WHERE r < 34359738368 ORDER BY a DESC
   8876   }
   8877 } {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}
   8878 do_test boundary2-4.11.lt.3 {
   8879   db eval {
   8880     SELECT a FROM t1 WHERE r < 34359738368 ORDER BY r
   8881   }
   8882 } {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}
   8883 do_test boundary2-4.11.lt.4 {
   8884   db eval {
   8885     SELECT a FROM t1 WHERE r < 34359738368 ORDER BY r DESC
   8886   }
   8887 } {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}
   8888 do_test boundary2-4.11.lt.5 {
   8889   db eval {
   8890     SELECT a FROM t1 WHERE r < 34359738368 ORDER BY x
   8891   }
   8892 } {59 60 41 5 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}
   8893 do_test boundary2-4.11.le.1 {
   8894   db eval {
   8895     SELECT a FROM t1 WHERE r <= 34359738368 ORDER BY a
   8896   }
   8897 } {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}
   8898 do_test boundary2-4.11.le.2 {
   8899   db eval {
   8900     SELECT a FROM t1 WHERE r <= 34359738368 ORDER BY a DESC
   8901   }
   8902 } {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}
   8903 do_test boundary2-4.11.le.3 {
   8904   db eval {
   8905     SELECT a FROM t1 WHERE r <= 34359738368 ORDER BY r
   8906   }
   8907 } {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}
   8908 do_test boundary2-4.11.le.4 {
   8909   db eval {
   8910     SELECT a FROM t1 WHERE r <= 34359738368 ORDER BY r DESC
   8911   }
   8912 } {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}
   8913 do_test boundary2-4.11.le.5 {
   8914   db eval {
   8915     SELECT a FROM t1 WHERE r <= 34359738368 ORDER BY x
   8916   }
   8917 } {59 60 41 5 31 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}
   8918 do_test boundary2-4.12.1 {
   8919   db eval {
   8920     SELECT * FROM t1 WHERE r=65536
   8921   }
   8922 } {65536 62 0000000000010000}
   8923 do_test boundary2-4.12.2 {
   8924   db eval {
   8925     SELECT r, a FROM t1 WHERE x='0000000000010000'
   8926   }
   8927 } {65536 62}
   8928 do_test boundary2-4.12.3 {
   8929   db eval {
   8930     SELECT r, x FROM t1 WHERE a=62
   8931   }
   8932 } {65536 0000000000010000}
   8933 do_test boundary2-4.12.gt.1 {
   8934   db eval {
   8935     SELECT a FROM t1 WHERE r > 65536 ORDER BY a
   8936   }
   8937 } {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}
   8938 do_test boundary2-4.12.gt.2 {
   8939   db eval {
   8940     SELECT a FROM t1 WHERE r > 65536 ORDER BY a DESC
   8941   }
   8942 } {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}
   8943 do_test boundary2-4.12.gt.3 {
   8944   db eval {
   8945     SELECT a FROM t1 WHERE r > 65536 ORDER BY r
   8946   }
   8947 } {15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8948 do_test boundary2-4.12.gt.4 {
   8949   db eval {
   8950     SELECT a FROM t1 WHERE r > 65536 ORDER BY r DESC
   8951   }
   8952 } {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}
   8953 do_test boundary2-4.12.gt.5 {
   8954   db eval {
   8955     SELECT a FROM t1 WHERE r > 65536 ORDER BY x
   8956   }
   8957 } {15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8958 do_test boundary2-4.12.ge.1 {
   8959   db eval {
   8960     SELECT a FROM t1 WHERE r >= 65536 ORDER BY a
   8961   }
   8962 } {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}
   8963 do_test boundary2-4.12.ge.2 {
   8964   db eval {
   8965     SELECT a FROM t1 WHERE r >= 65536 ORDER BY a DESC
   8966   }
   8967 } {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}
   8968 do_test boundary2-4.12.ge.3 {
   8969   db eval {
   8970     SELECT a FROM t1 WHERE r >= 65536 ORDER BY r
   8971   }
   8972 } {62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8973 do_test boundary2-4.12.ge.4 {
   8974   db eval {
   8975     SELECT a FROM t1 WHERE r >= 65536 ORDER BY r DESC
   8976   }
   8977 } {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}
   8978 do_test boundary2-4.12.ge.5 {
   8979   db eval {
   8980     SELECT a FROM t1 WHERE r >= 65536 ORDER BY x
   8981   }
   8982 } {62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   8983 do_test boundary2-4.12.lt.1 {
   8984   db eval {
   8985     SELECT a FROM t1 WHERE r < 65536 ORDER BY a
   8986   }
   8987 } {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}
   8988 do_test boundary2-4.12.lt.2 {
   8989   db eval {
   8990     SELECT a FROM t1 WHERE r < 65536 ORDER BY a DESC
   8991   }
   8992 } {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}
   8993 do_test boundary2-4.12.lt.3 {
   8994   db eval {
   8995     SELECT a FROM t1 WHERE r < 65536 ORDER BY r
   8996   }
   8997 } {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}
   8998 do_test boundary2-4.12.lt.4 {
   8999   db eval {
   9000     SELECT a FROM t1 WHERE r < 65536 ORDER BY r DESC
   9001   }
   9002 } {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}
   9003 do_test boundary2-4.12.lt.5 {
   9004   db eval {
   9005     SELECT a FROM t1 WHERE r < 65536 ORDER BY x
   9006   }
   9007 } {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}
   9008 do_test boundary2-4.12.le.1 {
   9009   db eval {
   9010     SELECT a FROM t1 WHERE r <= 65536 ORDER BY a
   9011   }
   9012 } {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}
   9013 do_test boundary2-4.12.le.2 {
   9014   db eval {
   9015     SELECT a FROM t1 WHERE r <= 65536 ORDER BY a DESC
   9016   }
   9017 } {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}
   9018 do_test boundary2-4.12.le.3 {
   9019   db eval {
   9020     SELECT a FROM t1 WHERE r <= 65536 ORDER BY r
   9021   }
   9022 } {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}
   9023 do_test boundary2-4.12.le.4 {
   9024   db eval {
   9025     SELECT a FROM t1 WHERE r <= 65536 ORDER BY r DESC
   9026   }
   9027 } {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}
   9028 do_test boundary2-4.12.le.5 {
   9029   db eval {
   9030     SELECT a FROM t1 WHERE r <= 65536 ORDER BY x
   9031   }
   9032 } {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}
   9033 do_test boundary2-4.13.1 {
   9034   db eval {
   9035     SELECT * FROM t1 WHERE r=268435456
   9036   }
   9037 } {268435456 40 0000000010000000}
   9038 do_test boundary2-4.13.2 {
   9039   db eval {
   9040     SELECT r, a FROM t1 WHERE x='0000000010000000'
   9041   }
   9042 } {268435456 40}
   9043 do_test boundary2-4.13.3 {
   9044   db eval {
   9045     SELECT r, x FROM t1 WHERE a=40
   9046   }
   9047 } {268435456 0000000010000000}
   9048 do_test boundary2-4.13.gt.1 {
   9049   db eval {
   9050     SELECT a FROM t1 WHERE r > 268435456 ORDER BY a
   9051   }
   9052 } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
   9053 do_test boundary2-4.13.gt.2 {
   9054   db eval {
   9055     SELECT a FROM t1 WHERE r > 268435456 ORDER BY a DESC
   9056   }
   9057 } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
   9058 do_test boundary2-4.13.gt.3 {
   9059   db eval {
   9060     SELECT a FROM t1 WHERE r > 268435456 ORDER BY r
   9061   }
   9062 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9063 do_test boundary2-4.13.gt.4 {
   9064   db eval {
   9065     SELECT a FROM t1 WHERE r > 268435456 ORDER BY r DESC
   9066   }
   9067 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20}
   9068 do_test boundary2-4.13.gt.5 {
   9069   db eval {
   9070     SELECT a FROM t1 WHERE r > 268435456 ORDER BY x
   9071   }
   9072 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9073 do_test boundary2-4.13.ge.1 {
   9074   db eval {
   9075     SELECT a FROM t1 WHERE r >= 268435456 ORDER BY a
   9076   }
   9077 } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
   9078 do_test boundary2-4.13.ge.2 {
   9079   db eval {
   9080     SELECT a FROM t1 WHERE r >= 268435456 ORDER BY a DESC
   9081   }
   9082 } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
   9083 do_test boundary2-4.13.ge.3 {
   9084   db eval {
   9085     SELECT a FROM t1 WHERE r >= 268435456 ORDER BY r
   9086   }
   9087 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9088 do_test boundary2-4.13.ge.4 {
   9089   db eval {
   9090     SELECT a FROM t1 WHERE r >= 268435456 ORDER BY r DESC
   9091   }
   9092 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40}
   9093 do_test boundary2-4.13.ge.5 {
   9094   db eval {
   9095     SELECT a FROM t1 WHERE r >= 268435456 ORDER BY x
   9096   }
   9097 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9098 do_test boundary2-4.13.lt.1 {
   9099   db eval {
   9100     SELECT a FROM t1 WHERE r < 268435456 ORDER BY a
   9101   }
   9102 } {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}
   9103 do_test boundary2-4.13.lt.2 {
   9104   db eval {
   9105     SELECT a FROM t1 WHERE r < 268435456 ORDER BY a DESC
   9106   }
   9107 } {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}
   9108 do_test boundary2-4.13.lt.3 {
   9109   db eval {
   9110     SELECT a FROM t1 WHERE r < 268435456 ORDER BY r
   9111   }
   9112 } {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}
   9113 do_test boundary2-4.13.lt.4 {
   9114   db eval {
   9115     SELECT a FROM t1 WHERE r < 268435456 ORDER BY r DESC
   9116   }
   9117 } {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}
   9118 do_test boundary2-4.13.lt.5 {
   9119   db eval {
   9120     SELECT a FROM t1 WHERE r < 268435456 ORDER BY x
   9121   }
   9122 } {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}
   9123 do_test boundary2-4.13.le.1 {
   9124   db eval {
   9125     SELECT a FROM t1 WHERE r <= 268435456 ORDER BY a
   9126   }
   9127 } {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}
   9128 do_test boundary2-4.13.le.2 {
   9129   db eval {
   9130     SELECT a FROM t1 WHERE r <= 268435456 ORDER BY a DESC
   9131   }
   9132 } {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}
   9133 do_test boundary2-4.13.le.3 {
   9134   db eval {
   9135     SELECT a FROM t1 WHERE r <= 268435456 ORDER BY r
   9136   }
   9137 } {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}
   9138 do_test boundary2-4.13.le.4 {
   9139   db eval {
   9140     SELECT a FROM t1 WHERE r <= 268435456 ORDER BY r DESC
   9141   }
   9142 } {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}
   9143 do_test boundary2-4.13.le.5 {
   9144   db eval {
   9145     SELECT a FROM t1 WHERE r <= 268435456 ORDER BY x
   9146   }
   9147 } {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}
   9148 do_test boundary2-4.14.1 {
   9149   db eval {
   9150     SELECT * FROM t1 WHERE r=-140737488355328
   9151   }
   9152 } {-140737488355328 44 ffff800000000000}
   9153 do_test boundary2-4.14.2 {
   9154   db eval {
   9155     SELECT r, a FROM t1 WHERE x='ffff800000000000'
   9156   }
   9157 } {-140737488355328 44}
   9158 do_test boundary2-4.14.3 {
   9159   db eval {
   9160     SELECT r, x FROM t1 WHERE a=44
   9161   }
   9162 } {-140737488355328 ffff800000000000}
   9163 do_test boundary2-4.14.gt.1 {
   9164   db eval {
   9165     SELECT a FROM t1 WHERE r > -140737488355328 ORDER BY a
   9166   }
   9167 } {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}
   9168 do_test boundary2-4.14.gt.2 {
   9169   db eval {
   9170     SELECT a FROM t1 WHERE r > -140737488355328 ORDER BY a DESC
   9171   }
   9172 } {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}
   9173 do_test boundary2-4.14.gt.3 {
   9174   db eval {
   9175     SELECT a FROM t1 WHERE r > -140737488355328 ORDER BY r
   9176   }
   9177 } {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}
   9178 do_test boundary2-4.14.gt.4 {
   9179   db eval {
   9180     SELECT a FROM t1 WHERE r > -140737488355328 ORDER BY r DESC
   9181   }
   9182 } {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}
   9183 do_test boundary2-4.14.gt.5 {
   9184   db eval {
   9185     SELECT a FROM t1 WHERE r > -140737488355328 ORDER BY x
   9186   }
   9187 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   9188 do_test boundary2-4.14.ge.1 {
   9189   db eval {
   9190     SELECT a FROM t1 WHERE r >= -140737488355328 ORDER BY a
   9191   }
   9192 } {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}
   9193 do_test boundary2-4.14.ge.2 {
   9194   db eval {
   9195     SELECT a FROM t1 WHERE r >= -140737488355328 ORDER BY a DESC
   9196   }
   9197 } {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}
   9198 do_test boundary2-4.14.ge.3 {
   9199   db eval {
   9200     SELECT a FROM t1 WHERE r >= -140737488355328 ORDER BY r
   9201   }
   9202 } {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}
   9203 do_test boundary2-4.14.ge.4 {
   9204   db eval {
   9205     SELECT a FROM t1 WHERE r >= -140737488355328 ORDER BY r DESC
   9206   }
   9207 } {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}
   9208 do_test boundary2-4.14.ge.5 {
   9209   db eval {
   9210     SELECT a FROM t1 WHERE r >= -140737488355328 ORDER BY x
   9211   }
   9212 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   9213 do_test boundary2-4.14.lt.1 {
   9214   db eval {
   9215     SELECT a FROM t1 WHERE r < -140737488355328 ORDER BY a
   9216   }
   9217 } {2 21 55 64}
   9218 do_test boundary2-4.14.lt.2 {
   9219   db eval {
   9220     SELECT a FROM t1 WHERE r < -140737488355328 ORDER BY a DESC
   9221   }
   9222 } {64 55 21 2}
   9223 do_test boundary2-4.14.lt.3 {
   9224   db eval {
   9225     SELECT a FROM t1 WHERE r < -140737488355328 ORDER BY r
   9226   }
   9227 } {55 2 64 21}
   9228 do_test boundary2-4.14.lt.4 {
   9229   db eval {
   9230     SELECT a FROM t1 WHERE r < -140737488355328 ORDER BY r DESC
   9231   }
   9232 } {21 64 2 55}
   9233 do_test boundary2-4.14.lt.5 {
   9234   db eval {
   9235     SELECT a FROM t1 WHERE r < -140737488355328 ORDER BY x
   9236   }
   9237 } {55 2 64 21}
   9238 do_test boundary2-4.14.le.1 {
   9239   db eval {
   9240     SELECT a FROM t1 WHERE r <= -140737488355328 ORDER BY a
   9241   }
   9242 } {2 21 44 55 64}
   9243 do_test boundary2-4.14.le.2 {
   9244   db eval {
   9245     SELECT a FROM t1 WHERE r <= -140737488355328 ORDER BY a DESC
   9246   }
   9247 } {64 55 44 21 2}
   9248 do_test boundary2-4.14.le.3 {
   9249   db eval {
   9250     SELECT a FROM t1 WHERE r <= -140737488355328 ORDER BY r
   9251   }
   9252 } {55 2 64 21 44}
   9253 do_test boundary2-4.14.le.4 {
   9254   db eval {
   9255     SELECT a FROM t1 WHERE r <= -140737488355328 ORDER BY r DESC
   9256   }
   9257 } {44 21 64 2 55}
   9258 do_test boundary2-4.14.le.5 {
   9259   db eval {
   9260     SELECT a FROM t1 WHERE r <= -140737488355328 ORDER BY x
   9261   }
   9262 } {55 2 64 21 44}
   9263 do_test boundary2-4.15.1 {
   9264   db eval {
   9265     SELECT * FROM t1 WHERE r=1099511627776
   9266   }
   9267 } {1099511627776 19 0000010000000000}
   9268 do_test boundary2-4.15.2 {
   9269   db eval {
   9270     SELECT r, a FROM t1 WHERE x='0000010000000000'
   9271   }
   9272 } {1099511627776 19}
   9273 do_test boundary2-4.15.3 {
   9274   db eval {
   9275     SELECT r, x FROM t1 WHERE a=19
   9276   }
   9277 } {1099511627776 0000010000000000}
   9278 do_test boundary2-4.15.gt.1 {
   9279   db eval {
   9280     SELECT a FROM t1 WHERE r > 1099511627776 ORDER BY a
   9281   }
   9282 } {3 7 10 13 17 25 26 27 28 34 43 45 56}
   9283 do_test boundary2-4.15.gt.2 {
   9284   db eval {
   9285     SELECT a FROM t1 WHERE r > 1099511627776 ORDER BY a DESC
   9286   }
   9287 } {56 45 43 34 28 27 26 25 17 13 10 7 3}
   9288 do_test boundary2-4.15.gt.3 {
   9289   db eval {
   9290     SELECT a FROM t1 WHERE r > 1099511627776 ORDER BY r
   9291   }
   9292 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
   9293 do_test boundary2-4.15.gt.4 {
   9294   db eval {
   9295     SELECT a FROM t1 WHERE r > 1099511627776 ORDER BY r DESC
   9296   }
   9297 } {3 28 17 45 27 43 13 26 10 34 25 56 7}
   9298 do_test boundary2-4.15.gt.5 {
   9299   db eval {
   9300     SELECT a FROM t1 WHERE r > 1099511627776 ORDER BY x
   9301   }
   9302 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
   9303 do_test boundary2-4.15.ge.1 {
   9304   db eval {
   9305     SELECT a FROM t1 WHERE r >= 1099511627776 ORDER BY a
   9306   }
   9307 } {3 7 10 13 17 19 25 26 27 28 34 43 45 56}
   9308 do_test boundary2-4.15.ge.2 {
   9309   db eval {
   9310     SELECT a FROM t1 WHERE r >= 1099511627776 ORDER BY a DESC
   9311   }
   9312 } {56 45 43 34 28 27 26 25 19 17 13 10 7 3}
   9313 do_test boundary2-4.15.ge.3 {
   9314   db eval {
   9315     SELECT a FROM t1 WHERE r >= 1099511627776 ORDER BY r
   9316   }
   9317 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9318 do_test boundary2-4.15.ge.4 {
   9319   db eval {
   9320     SELECT a FROM t1 WHERE r >= 1099511627776 ORDER BY r DESC
   9321   }
   9322 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19}
   9323 do_test boundary2-4.15.ge.5 {
   9324   db eval {
   9325     SELECT a FROM t1 WHERE r >= 1099511627776 ORDER BY x
   9326   }
   9327 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9328 do_test boundary2-4.15.lt.1 {
   9329   db eval {
   9330     SELECT a FROM t1 WHERE r < 1099511627776 ORDER BY a
   9331   }
   9332 } {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}
   9333 do_test boundary2-4.15.lt.2 {
   9334   db eval {
   9335     SELECT a FROM t1 WHERE r < 1099511627776 ORDER BY a DESC
   9336   }
   9337 } {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}
   9338 do_test boundary2-4.15.lt.3 {
   9339   db eval {
   9340     SELECT a FROM t1 WHERE r < 1099511627776 ORDER BY r
   9341   }
   9342 } {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}
   9343 do_test boundary2-4.15.lt.4 {
   9344   db eval {
   9345     SELECT a FROM t1 WHERE r < 1099511627776 ORDER BY r DESC
   9346   }
   9347 } {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}
   9348 do_test boundary2-4.15.lt.5 {
   9349   db eval {
   9350     SELECT a FROM t1 WHERE r < 1099511627776 ORDER BY x
   9351   }
   9352 } {59 60 41 5 31 4 49 30 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}
   9353 do_test boundary2-4.15.le.1 {
   9354   db eval {
   9355     SELECT a FROM t1 WHERE r <= 1099511627776 ORDER BY a
   9356   }
   9357 } {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}
   9358 do_test boundary2-4.15.le.2 {
   9359   db eval {
   9360     SELECT a FROM t1 WHERE r <= 1099511627776 ORDER BY a DESC
   9361   }
   9362 } {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}
   9363 do_test boundary2-4.15.le.3 {
   9364   db eval {
   9365     SELECT a FROM t1 WHERE r <= 1099511627776 ORDER BY r
   9366   }
   9367 } {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}
   9368 do_test boundary2-4.15.le.4 {
   9369   db eval {
   9370     SELECT a FROM t1 WHERE r <= 1099511627776 ORDER BY r DESC
   9371   }
   9372 } {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}
   9373 do_test boundary2-4.15.le.5 {
   9374   db eval {
   9375     SELECT a FROM t1 WHERE r <= 1099511627776 ORDER BY x
   9376   }
   9377 } {59 60 41 5 31 4 49 30 61 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}
   9378 do_test boundary2-4.16.gt.1 {
   9379   db eval {
   9380     SELECT a FROM t1 WHERE r > 9223372036854775807 ORDER BY a
   9381   }
   9382 } {}
   9383 do_test boundary2-4.16.gt.2 {
   9384   db eval {
   9385     SELECT a FROM t1 WHERE r > 9223372036854775807 ORDER BY a DESC
   9386   }
   9387 } {}
   9388 do_test boundary2-4.16.gt.3 {
   9389   db eval {
   9390     SELECT a FROM t1 WHERE r > 9223372036854775807 ORDER BY r
   9391   }
   9392 } {}
   9393 do_test boundary2-4.16.gt.4 {
   9394   db eval {
   9395     SELECT a FROM t1 WHERE r > 9223372036854775807 ORDER BY r DESC
   9396   }
   9397 } {}
   9398 do_test boundary2-4.16.gt.5 {
   9399   db eval {
   9400     SELECT a FROM t1 WHERE r > 9223372036854775807 ORDER BY x
   9401   }
   9402 } {}
   9403 do_test boundary2-4.16.ge.1 {
   9404   db eval {
   9405     SELECT a FROM t1 WHERE r >= 9223372036854775807 ORDER BY a
   9406   }
   9407 } {3}
   9408 do_test boundary2-4.16.ge.2 {
   9409   db eval {
   9410     SELECT a FROM t1 WHERE r >= 9223372036854775807 ORDER BY a DESC
   9411   }
   9412 } {3}
   9413 do_test boundary2-4.16.ge.3 {
   9414   db eval {
   9415     SELECT a FROM t1 WHERE r >= 9223372036854775807 ORDER BY r
   9416   }
   9417 } {3}
   9418 do_test boundary2-4.16.ge.4 {
   9419   db eval {
   9420     SELECT a FROM t1 WHERE r >= 9223372036854775807 ORDER BY r DESC
   9421   }
   9422 } {3}
   9423 do_test boundary2-4.16.ge.5 {
   9424   db eval {
   9425     SELECT a FROM t1 WHERE r >= 9223372036854775807 ORDER BY x
   9426   }
   9427 } {3}
   9428 do_test boundary2-4.16.lt.1 {
   9429   db eval {
   9430     SELECT a FROM t1 WHERE r < 9223372036854775807 ORDER BY a
   9431   }
   9432 } {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}
   9433 do_test boundary2-4.16.lt.2 {
   9434   db eval {
   9435     SELECT a FROM t1 WHERE r < 9223372036854775807 ORDER BY a DESC
   9436   }
   9437 } {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}
   9438 do_test boundary2-4.16.lt.3 {
   9439   db eval {
   9440     SELECT a FROM t1 WHERE r < 9223372036854775807 ORDER BY r
   9441   }
   9442 } {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}
   9443 do_test boundary2-4.16.lt.4 {
   9444   db eval {
   9445     SELECT a FROM t1 WHERE r < 9223372036854775807 ORDER BY r DESC
   9446   }
   9447 } {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}
   9448 do_test boundary2-4.16.lt.5 {
   9449   db eval {
   9450     SELECT a FROM t1 WHERE r < 9223372036854775807 ORDER BY x
   9451   }
   9452 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 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}
   9453 do_test boundary2-4.16.le.1 {
   9454   db eval {
   9455     SELECT a FROM t1 WHERE r <= 9223372036854775807 ORDER BY a
   9456   }
   9457 } {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}
   9458 do_test boundary2-4.16.le.2 {
   9459   db eval {
   9460     SELECT a FROM t1 WHERE r <= 9223372036854775807 ORDER BY a DESC
   9461   }
   9462 } {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}
   9463 do_test boundary2-4.16.le.3 {
   9464   db eval {
   9465     SELECT a FROM t1 WHERE r <= 9223372036854775807 ORDER BY r
   9466   }
   9467 } {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}
   9468 do_test boundary2-4.16.le.4 {
   9469   db eval {
   9470     SELECT a FROM t1 WHERE r <= 9223372036854775807 ORDER BY r DESC
   9471   }
   9472 } {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}
   9473 do_test boundary2-4.16.le.5 {
   9474   db eval {
   9475     SELECT a FROM t1 WHERE r <= 9223372036854775807 ORDER BY x
   9476   }
   9477 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   9478 do_test boundary2-4.17.1 {
   9479   db eval {
   9480     SELECT * FROM t1 WHERE r=32768
   9481   }
   9482 } {32768 50 0000000000008000}
   9483 do_test boundary2-4.17.2 {
   9484   db eval {
   9485     SELECT r, a FROM t1 WHERE x='0000000000008000'
   9486   }
   9487 } {32768 50}
   9488 do_test boundary2-4.17.3 {
   9489   db eval {
   9490     SELECT r, x FROM t1 WHERE a=50
   9491   }
   9492 } {32768 0000000000008000}
   9493 do_test boundary2-4.17.gt.1 {
   9494   db eval {
   9495     SELECT a FROM t1 WHERE r > 32768 ORDER BY a
   9496   }
   9497 } {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}
   9498 do_test boundary2-4.17.gt.2 {
   9499   db eval {
   9500     SELECT a FROM t1 WHERE r > 32768 ORDER BY a DESC
   9501   }
   9502 } {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}
   9503 do_test boundary2-4.17.gt.3 {
   9504   db eval {
   9505     SELECT a FROM t1 WHERE r > 32768 ORDER BY r
   9506   }
   9507 } {48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9508 do_test boundary2-4.17.gt.4 {
   9509   db eval {
   9510     SELECT a FROM t1 WHERE r > 32768 ORDER BY r DESC
   9511   }
   9512 } {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}
   9513 do_test boundary2-4.17.gt.5 {
   9514   db eval {
   9515     SELECT a FROM t1 WHERE r > 32768 ORDER BY x
   9516   }
   9517 } {48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9518 do_test boundary2-4.17.ge.1 {
   9519   db eval {
   9520     SELECT a FROM t1 WHERE r >= 32768 ORDER BY a
   9521   }
   9522 } {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}
   9523 do_test boundary2-4.17.ge.2 {
   9524   db eval {
   9525     SELECT a FROM t1 WHERE r >= 32768 ORDER BY a DESC
   9526   }
   9527 } {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}
   9528 do_test boundary2-4.17.ge.3 {
   9529   db eval {
   9530     SELECT a FROM t1 WHERE r >= 32768 ORDER BY r
   9531   }
   9532 } {50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9533 do_test boundary2-4.17.ge.4 {
   9534   db eval {
   9535     SELECT a FROM t1 WHERE r >= 32768 ORDER BY r DESC
   9536   }
   9537 } {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}
   9538 do_test boundary2-4.17.ge.5 {
   9539   db eval {
   9540     SELECT a FROM t1 WHERE r >= 32768 ORDER BY x
   9541   }
   9542 } {50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9543 do_test boundary2-4.17.lt.1 {
   9544   db eval {
   9545     SELECT a FROM t1 WHERE r < 32768 ORDER BY a
   9546   }
   9547 } {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}
   9548 do_test boundary2-4.17.lt.2 {
   9549   db eval {
   9550     SELECT a FROM t1 WHERE r < 32768 ORDER BY a DESC
   9551   }
   9552 } {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}
   9553 do_test boundary2-4.17.lt.3 {
   9554   db eval {
   9555     SELECT a FROM t1 WHERE r < 32768 ORDER BY r
   9556   }
   9557 } {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}
   9558 do_test boundary2-4.17.lt.4 {
   9559   db eval {
   9560     SELECT a FROM t1 WHERE r < 32768 ORDER BY r DESC
   9561   }
   9562 } {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}
   9563 do_test boundary2-4.17.lt.5 {
   9564   db eval {
   9565     SELECT a FROM t1 WHERE r < 32768 ORDER BY x
   9566   }
   9567 } {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}
   9568 do_test boundary2-4.17.le.1 {
   9569   db eval {
   9570     SELECT a FROM t1 WHERE r <= 32768 ORDER BY a
   9571   }
   9572 } {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}
   9573 do_test boundary2-4.17.le.2 {
   9574   db eval {
   9575     SELECT a FROM t1 WHERE r <= 32768 ORDER BY a DESC
   9576   }
   9577 } {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}
   9578 do_test boundary2-4.17.le.3 {
   9579   db eval {
   9580     SELECT a FROM t1 WHERE r <= 32768 ORDER BY r
   9581   }
   9582 } {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}
   9583 do_test boundary2-4.17.le.4 {
   9584   db eval {
   9585     SELECT a FROM t1 WHERE r <= 32768 ORDER BY r DESC
   9586   }
   9587 } {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}
   9588 do_test boundary2-4.17.le.5 {
   9589   db eval {
   9590     SELECT a FROM t1 WHERE r <= 32768 ORDER BY x
   9591   }
   9592 } {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}
   9593 do_test boundary2-4.18.1 {
   9594   db eval {
   9595     SELECT * FROM t1 WHERE r=-36028797018963968
   9596   }
   9597 } {-36028797018963968 64 ff80000000000000}
   9598 do_test boundary2-4.18.2 {
   9599   db eval {
   9600     SELECT r, a FROM t1 WHERE x='ff80000000000000'
   9601   }
   9602 } {-36028797018963968 64}
   9603 do_test boundary2-4.18.3 {
   9604   db eval {
   9605     SELECT r, x FROM t1 WHERE a=64
   9606   }
   9607 } {-36028797018963968 ff80000000000000}
   9608 do_test boundary2-4.18.gt.1 {
   9609   db eval {
   9610     SELECT a FROM t1 WHERE r > -36028797018963968 ORDER BY a
   9611   }
   9612 } {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}
   9613 do_test boundary2-4.18.gt.2 {
   9614   db eval {
   9615     SELECT a FROM t1 WHERE r > -36028797018963968 ORDER BY a DESC
   9616   }
   9617 } {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}
   9618 do_test boundary2-4.18.gt.3 {
   9619   db eval {
   9620     SELECT a FROM t1 WHERE r > -36028797018963968 ORDER BY r
   9621   }
   9622 } {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}
   9623 do_test boundary2-4.18.gt.4 {
   9624   db eval {
   9625     SELECT a FROM t1 WHERE r > -36028797018963968 ORDER BY r DESC
   9626   }
   9627 } {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}
   9628 do_test boundary2-4.18.gt.5 {
   9629   db eval {
   9630     SELECT a FROM t1 WHERE r > -36028797018963968 ORDER BY x
   9631   }
   9632 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   9633 do_test boundary2-4.18.ge.1 {
   9634   db eval {
   9635     SELECT a FROM t1 WHERE r >= -36028797018963968 ORDER BY a
   9636   }
   9637 } {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}
   9638 do_test boundary2-4.18.ge.2 {
   9639   db eval {
   9640     SELECT a FROM t1 WHERE r >= -36028797018963968 ORDER BY a DESC
   9641   }
   9642 } {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}
   9643 do_test boundary2-4.18.ge.3 {
   9644   db eval {
   9645     SELECT a FROM t1 WHERE r >= -36028797018963968 ORDER BY r
   9646   }
   9647 } {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}
   9648 do_test boundary2-4.18.ge.4 {
   9649   db eval {
   9650     SELECT a FROM t1 WHERE r >= -36028797018963968 ORDER BY r DESC
   9651   }
   9652 } {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}
   9653 do_test boundary2-4.18.ge.5 {
   9654   db eval {
   9655     SELECT a FROM t1 WHERE r >= -36028797018963968 ORDER BY x
   9656   }
   9657 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   9658 do_test boundary2-4.18.lt.1 {
   9659   db eval {
   9660     SELECT a FROM t1 WHERE r < -36028797018963968 ORDER BY a
   9661   }
   9662 } {2 55}
   9663 do_test boundary2-4.18.lt.2 {
   9664   db eval {
   9665     SELECT a FROM t1 WHERE r < -36028797018963968 ORDER BY a DESC
   9666   }
   9667 } {55 2}
   9668 do_test boundary2-4.18.lt.3 {
   9669   db eval {
   9670     SELECT a FROM t1 WHERE r < -36028797018963968 ORDER BY r
   9671   }
   9672 } {55 2}
   9673 do_test boundary2-4.18.lt.4 {
   9674   db eval {
   9675     SELECT a FROM t1 WHERE r < -36028797018963968 ORDER BY r DESC
   9676   }
   9677 } {2 55}
   9678 do_test boundary2-4.18.lt.5 {
   9679   db eval {
   9680     SELECT a FROM t1 WHERE r < -36028797018963968 ORDER BY x
   9681   }
   9682 } {55 2}
   9683 do_test boundary2-4.18.le.1 {
   9684   db eval {
   9685     SELECT a FROM t1 WHERE r <= -36028797018963968 ORDER BY a
   9686   }
   9687 } {2 55 64}
   9688 do_test boundary2-4.18.le.2 {
   9689   db eval {
   9690     SELECT a FROM t1 WHERE r <= -36028797018963968 ORDER BY a DESC
   9691   }
   9692 } {64 55 2}
   9693 do_test boundary2-4.18.le.3 {
   9694   db eval {
   9695     SELECT a FROM t1 WHERE r <= -36028797018963968 ORDER BY r
   9696   }
   9697 } {55 2 64}
   9698 do_test boundary2-4.18.le.4 {
   9699   db eval {
   9700     SELECT a FROM t1 WHERE r <= -36028797018963968 ORDER BY r DESC
   9701   }
   9702 } {64 2 55}
   9703 do_test boundary2-4.18.le.5 {
   9704   db eval {
   9705     SELECT a FROM t1 WHERE r <= -36028797018963968 ORDER BY x
   9706   }
   9707 } {55 2 64}
   9708 do_test boundary2-4.19.1 {
   9709   db eval {
   9710     SELECT * FROM t1 WHERE r=65535
   9711   }
   9712 } {65535 48 000000000000ffff}
   9713 do_test boundary2-4.19.2 {
   9714   db eval {
   9715     SELECT r, a FROM t1 WHERE x='000000000000ffff'
   9716   }
   9717 } {65535 48}
   9718 do_test boundary2-4.19.3 {
   9719   db eval {
   9720     SELECT r, x FROM t1 WHERE a=48
   9721   }
   9722 } {65535 000000000000ffff}
   9723 do_test boundary2-4.19.gt.1 {
   9724   db eval {
   9725     SELECT a FROM t1 WHERE r > 65535 ORDER BY a
   9726   }
   9727 } {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}
   9728 do_test boundary2-4.19.gt.2 {
   9729   db eval {
   9730     SELECT a FROM t1 WHERE r > 65535 ORDER BY a DESC
   9731   }
   9732 } {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}
   9733 do_test boundary2-4.19.gt.3 {
   9734   db eval {
   9735     SELECT a FROM t1 WHERE r > 65535 ORDER BY r
   9736   }
   9737 } {62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9738 do_test boundary2-4.19.gt.4 {
   9739   db eval {
   9740     SELECT a FROM t1 WHERE r > 65535 ORDER BY r DESC
   9741   }
   9742 } {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}
   9743 do_test boundary2-4.19.gt.5 {
   9744   db eval {
   9745     SELECT a FROM t1 WHERE r > 65535 ORDER BY x
   9746   }
   9747 } {62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9748 do_test boundary2-4.19.ge.1 {
   9749   db eval {
   9750     SELECT a FROM t1 WHERE r >= 65535 ORDER BY a
   9751   }
   9752 } {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}
   9753 do_test boundary2-4.19.ge.2 {
   9754   db eval {
   9755     SELECT a FROM t1 WHERE r >= 65535 ORDER BY a DESC
   9756   }
   9757 } {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}
   9758 do_test boundary2-4.19.ge.3 {
   9759   db eval {
   9760     SELECT a FROM t1 WHERE r >= 65535 ORDER BY r
   9761   }
   9762 } {48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9763 do_test boundary2-4.19.ge.4 {
   9764   db eval {
   9765     SELECT a FROM t1 WHERE r >= 65535 ORDER BY r DESC
   9766   }
   9767 } {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}
   9768 do_test boundary2-4.19.ge.5 {
   9769   db eval {
   9770     SELECT a FROM t1 WHERE r >= 65535 ORDER BY x
   9771   }
   9772 } {48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9773 do_test boundary2-4.19.lt.1 {
   9774   db eval {
   9775     SELECT a FROM t1 WHERE r < 65535 ORDER BY a
   9776   }
   9777 } {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}
   9778 do_test boundary2-4.19.lt.2 {
   9779   db eval {
   9780     SELECT a FROM t1 WHERE r < 65535 ORDER BY a DESC
   9781   }
   9782 } {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}
   9783 do_test boundary2-4.19.lt.3 {
   9784   db eval {
   9785     SELECT a FROM t1 WHERE r < 65535 ORDER BY r
   9786   }
   9787 } {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}
   9788 do_test boundary2-4.19.lt.4 {
   9789   db eval {
   9790     SELECT a FROM t1 WHERE r < 65535 ORDER BY r DESC
   9791   }
   9792 } {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}
   9793 do_test boundary2-4.19.lt.5 {
   9794   db eval {
   9795     SELECT a FROM t1 WHERE r < 65535 ORDER BY x
   9796   }
   9797 } {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}
   9798 do_test boundary2-4.19.le.1 {
   9799   db eval {
   9800     SELECT a FROM t1 WHERE r <= 65535 ORDER BY a
   9801   }
   9802 } {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}
   9803 do_test boundary2-4.19.le.2 {
   9804   db eval {
   9805     SELECT a FROM t1 WHERE r <= 65535 ORDER BY a DESC
   9806   }
   9807 } {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}
   9808 do_test boundary2-4.19.le.3 {
   9809   db eval {
   9810     SELECT a FROM t1 WHERE r <= 65535 ORDER BY r
   9811   }
   9812 } {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}
   9813 do_test boundary2-4.19.le.4 {
   9814   db eval {
   9815     SELECT a FROM t1 WHERE r <= 65535 ORDER BY r DESC
   9816   }
   9817 } {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}
   9818 do_test boundary2-4.19.le.5 {
   9819   db eval {
   9820     SELECT a FROM t1 WHERE r <= 65535 ORDER BY x
   9821   }
   9822 } {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}
   9823 do_test boundary2-4.20.1 {
   9824   db eval {
   9825     SELECT * FROM t1 WHERE r=4294967295
   9826   }
   9827 } {4294967295 14 00000000ffffffff}
   9828 do_test boundary2-4.20.2 {
   9829   db eval {
   9830     SELECT r, a FROM t1 WHERE x='00000000ffffffff'
   9831   }
   9832 } {4294967295 14}
   9833 do_test boundary2-4.20.3 {
   9834   db eval {
   9835     SELECT r, x FROM t1 WHERE a=14
   9836   }
   9837 } {4294967295 00000000ffffffff}
   9838 do_test boundary2-4.20.gt.1 {
   9839   db eval {
   9840     SELECT a FROM t1 WHERE r > 4294967295 ORDER BY a
   9841   }
   9842 } {3 7 10 13 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
   9843 do_test boundary2-4.20.gt.2 {
   9844   db eval {
   9845     SELECT a FROM t1 WHERE r > 4294967295 ORDER BY a DESC
   9846   }
   9847 } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 13 10 7 3}
   9848 do_test boundary2-4.20.gt.3 {
   9849   db eval {
   9850     SELECT a FROM t1 WHERE r > 4294967295 ORDER BY r
   9851   }
   9852 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9853 do_test boundary2-4.20.gt.4 {
   9854   db eval {
   9855     SELECT a FROM t1 WHERE r > 4294967295 ORDER BY r DESC
   9856   }
   9857 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36}
   9858 do_test boundary2-4.20.gt.5 {
   9859   db eval {
   9860     SELECT a FROM t1 WHERE r > 4294967295 ORDER BY x
   9861   }
   9862 } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9863 do_test boundary2-4.20.ge.1 {
   9864   db eval {
   9865     SELECT a FROM t1 WHERE r >= 4294967295 ORDER BY a
   9866   }
   9867 } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
   9868 do_test boundary2-4.20.ge.2 {
   9869   db eval {
   9870     SELECT a FROM t1 WHERE r >= 4294967295 ORDER BY a DESC
   9871   }
   9872 } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
   9873 do_test boundary2-4.20.ge.3 {
   9874   db eval {
   9875     SELECT a FROM t1 WHERE r >= 4294967295 ORDER BY r
   9876   }
   9877 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9878 do_test boundary2-4.20.ge.4 {
   9879   db eval {
   9880     SELECT a FROM t1 WHERE r >= 4294967295 ORDER BY r DESC
   9881   }
   9882 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14}
   9883 do_test boundary2-4.20.ge.5 {
   9884   db eval {
   9885     SELECT a FROM t1 WHERE r >= 4294967295 ORDER BY x
   9886   }
   9887 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9888 do_test boundary2-4.20.lt.1 {
   9889   db eval {
   9890     SELECT a FROM t1 WHERE r < 4294967295 ORDER BY a
   9891   }
   9892 } {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}
   9893 do_test boundary2-4.20.lt.2 {
   9894   db eval {
   9895     SELECT a FROM t1 WHERE r < 4294967295 ORDER BY a DESC
   9896   }
   9897 } {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}
   9898 do_test boundary2-4.20.lt.3 {
   9899   db eval {
   9900     SELECT a FROM t1 WHERE r < 4294967295 ORDER BY r
   9901   }
   9902 } {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}
   9903 do_test boundary2-4.20.lt.4 {
   9904   db eval {
   9905     SELECT a FROM t1 WHERE r < 4294967295 ORDER BY r DESC
   9906   }
   9907 } {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}
   9908 do_test boundary2-4.20.lt.5 {
   9909   db eval {
   9910     SELECT a FROM t1 WHERE r < 4294967295 ORDER BY x
   9911   }
   9912 } {59 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}
   9913 do_test boundary2-4.20.le.1 {
   9914   db eval {
   9915     SELECT a FROM t1 WHERE r <= 4294967295 ORDER BY a
   9916   }
   9917 } {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}
   9918 do_test boundary2-4.20.le.2 {
   9919   db eval {
   9920     SELECT a FROM t1 WHERE r <= 4294967295 ORDER BY a DESC
   9921   }
   9922 } {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}
   9923 do_test boundary2-4.20.le.3 {
   9924   db eval {
   9925     SELECT a FROM t1 WHERE r <= 4294967295 ORDER BY r
   9926   }
   9927 } {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}
   9928 do_test boundary2-4.20.le.4 {
   9929   db eval {
   9930     SELECT a FROM t1 WHERE r <= 4294967295 ORDER BY r DESC
   9931   }
   9932 } {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}
   9933 do_test boundary2-4.20.le.5 {
   9934   db eval {
   9935     SELECT a FROM t1 WHERE r <= 4294967295 ORDER BY x
   9936   }
   9937 } {59 60 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}
   9938 do_test boundary2-4.21.1 {
   9939   db eval {
   9940     SELECT * FROM t1 WHERE r=1099511627775
   9941   }
   9942 } {1099511627775 57 000000ffffffffff}
   9943 do_test boundary2-4.21.2 {
   9944   db eval {
   9945     SELECT r, a FROM t1 WHERE x='000000ffffffffff'
   9946   }
   9947 } {1099511627775 57}
   9948 do_test boundary2-4.21.3 {
   9949   db eval {
   9950     SELECT r, x FROM t1 WHERE a=57
   9951   }
   9952 } {1099511627775 000000ffffffffff}
   9953 do_test boundary2-4.21.gt.1 {
   9954   db eval {
   9955     SELECT a FROM t1 WHERE r > 1099511627775 ORDER BY a
   9956   }
   9957 } {3 7 10 13 17 19 25 26 27 28 34 43 45 56}
   9958 do_test boundary2-4.21.gt.2 {
   9959   db eval {
   9960     SELECT a FROM t1 WHERE r > 1099511627775 ORDER BY a DESC
   9961   }
   9962 } {56 45 43 34 28 27 26 25 19 17 13 10 7 3}
   9963 do_test boundary2-4.21.gt.3 {
   9964   db eval {
   9965     SELECT a FROM t1 WHERE r > 1099511627775 ORDER BY r
   9966   }
   9967 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9968 do_test boundary2-4.21.gt.4 {
   9969   db eval {
   9970     SELECT a FROM t1 WHERE r > 1099511627775 ORDER BY r DESC
   9971   }
   9972 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19}
   9973 do_test boundary2-4.21.gt.5 {
   9974   db eval {
   9975     SELECT a FROM t1 WHERE r > 1099511627775 ORDER BY x
   9976   }
   9977 } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9978 do_test boundary2-4.21.ge.1 {
   9979   db eval {
   9980     SELECT a FROM t1 WHERE r >= 1099511627775 ORDER BY a
   9981   }
   9982 } {3 7 10 13 17 19 25 26 27 28 34 43 45 56 57}
   9983 do_test boundary2-4.21.ge.2 {
   9984   db eval {
   9985     SELECT a FROM t1 WHERE r >= 1099511627775 ORDER BY a DESC
   9986   }
   9987 } {57 56 45 43 34 28 27 26 25 19 17 13 10 7 3}
   9988 do_test boundary2-4.21.ge.3 {
   9989   db eval {
   9990     SELECT a FROM t1 WHERE r >= 1099511627775 ORDER BY r
   9991   }
   9992 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   9993 do_test boundary2-4.21.ge.4 {
   9994   db eval {
   9995     SELECT a FROM t1 WHERE r >= 1099511627775 ORDER BY r DESC
   9996   }
   9997 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57}
   9998 do_test boundary2-4.21.ge.5 {
   9999   db eval {
   10000     SELECT a FROM t1 WHERE r >= 1099511627775 ORDER BY x
   10001   }
   10002 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10003 do_test boundary2-4.21.lt.1 {
   10004   db eval {
   10005     SELECT a FROM t1 WHERE r < 1099511627775 ORDER BY a
   10006   }
   10007 } {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}
   10008 do_test boundary2-4.21.lt.2 {
   10009   db eval {
   10010     SELECT a FROM t1 WHERE r < 1099511627775 ORDER BY a DESC
   10011   }
   10012 } {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}
   10013 do_test boundary2-4.21.lt.3 {
   10014   db eval {
   10015     SELECT a FROM t1 WHERE r < 1099511627775 ORDER BY r
   10016   }
   10017 } {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}
   10018 do_test boundary2-4.21.lt.4 {
   10019   db eval {
   10020     SELECT a FROM t1 WHERE r < 1099511627775 ORDER BY r DESC
   10021   }
   10022 } {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}
   10023 do_test boundary2-4.21.lt.5 {
   10024   db eval {
   10025     SELECT a FROM t1 WHERE r < 1099511627775 ORDER BY x
   10026   }
   10027 } {59 60 41 5 31 4 49 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}
   10028 do_test boundary2-4.21.le.1 {
   10029   db eval {
   10030     SELECT a FROM t1 WHERE r <= 1099511627775 ORDER BY a
   10031   }
   10032 } {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}
   10033 do_test boundary2-4.21.le.2 {
   10034   db eval {
   10035     SELECT a FROM t1 WHERE r <= 1099511627775 ORDER BY a DESC
   10036   }
   10037 } {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}
   10038 do_test boundary2-4.21.le.3 {
   10039   db eval {
   10040     SELECT a FROM t1 WHERE r <= 1099511627775 ORDER BY r
   10041   }
   10042 } {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}
   10043 do_test boundary2-4.21.le.4 {
   10044   db eval {
   10045     SELECT a FROM t1 WHERE r <= 1099511627775 ORDER BY r DESC
   10046   }
   10047 } {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}
   10048 do_test boundary2-4.21.le.5 {
   10049   db eval {
   10050     SELECT a FROM t1 WHERE r <= 1099511627775 ORDER BY x
   10051   }
   10052 } {59 60 41 5 31 4 49 30 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}
   10053 do_test boundary2-4.22.1 {
   10054   db eval {
   10055     SELECT * FROM t1 WHERE r=-8388608
   10056   }
   10057 } {-8388608 37 ffffffffff800000}
   10058 do_test boundary2-4.22.2 {
   10059   db eval {
   10060     SELECT r, a FROM t1 WHERE x='ffffffffff800000'
   10061   }
   10062 } {-8388608 37}
   10063 do_test boundary2-4.22.3 {
   10064   db eval {
   10065     SELECT r, x FROM t1 WHERE a=37
   10066   }
   10067 } {-8388608 ffffffffff800000}
   10068 do_test boundary2-4.22.gt.1 {
   10069   db eval {
   10070     SELECT a FROM t1 WHERE r > -8388608 ORDER BY a
   10071   }
   10072 } {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}
   10073 do_test boundary2-4.22.gt.2 {
   10074   db eval {
   10075     SELECT a FROM t1 WHERE r > -8388608 ORDER BY a DESC
   10076   }
   10077 } {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}
   10078 do_test boundary2-4.22.gt.3 {
   10079   db eval {
   10080     SELECT a FROM t1 WHERE r > -8388608 ORDER BY r
   10081   }
   10082 } {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}
   10083 do_test boundary2-4.22.gt.4 {
   10084   db eval {
   10085     SELECT a FROM t1 WHERE r > -8388608 ORDER BY r DESC
   10086   }
   10087 } {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}
   10088 do_test boundary2-4.22.gt.5 {
   10089   db eval {
   10090     SELECT a FROM t1 WHERE r > -8388608 ORDER BY x
   10091   }
   10092 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   10093 do_test boundary2-4.22.ge.1 {
   10094   db eval {
   10095     SELECT a FROM t1 WHERE r >= -8388608 ORDER BY a
   10096   }
   10097 } {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}
   10098 do_test boundary2-4.22.ge.2 {
   10099   db eval {
   10100     SELECT a FROM t1 WHERE r >= -8388608 ORDER BY a DESC
   10101   }
   10102 } {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}
   10103 do_test boundary2-4.22.ge.3 {
   10104   db eval {
   10105     SELECT a FROM t1 WHERE r >= -8388608 ORDER BY r
   10106   }
   10107 } {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}
   10108 do_test boundary2-4.22.ge.4 {
   10109   db eval {
   10110     SELECT a FROM t1 WHERE r >= -8388608 ORDER BY r DESC
   10111   }
   10112 } {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}
   10113 do_test boundary2-4.22.ge.5 {
   10114   db eval {
   10115     SELECT a FROM t1 WHERE r >= -8388608 ORDER BY x
   10116   }
   10117 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   10118 do_test boundary2-4.22.lt.1 {
   10119   db eval {
   10120     SELECT a FROM t1 WHERE r < -8388608 ORDER BY a
   10121   }
   10122 } {1 2 11 21 44 47 55 58 63 64}
   10123 do_test boundary2-4.22.lt.2 {
   10124   db eval {
   10125     SELECT a FROM t1 WHERE r < -8388608 ORDER BY a DESC
   10126   }
   10127 } {64 63 58 55 47 44 21 11 2 1}
   10128 do_test boundary2-4.22.lt.3 {
   10129   db eval {
   10130     SELECT a FROM t1 WHERE r < -8388608 ORDER BY r
   10131   }
   10132 } {55 2 64 21 44 58 63 47 11 1}
   10133 do_test boundary2-4.22.lt.4 {
   10134   db eval {
   10135     SELECT a FROM t1 WHERE r < -8388608 ORDER BY r DESC
   10136   }
   10137 } {1 11 47 63 58 44 21 64 2 55}
   10138 do_test boundary2-4.22.lt.5 {
   10139   db eval {
   10140     SELECT a FROM t1 WHERE r < -8388608 ORDER BY x
   10141   }
   10142 } {55 2 64 21 44 58 63 47 11 1}
   10143 do_test boundary2-4.22.le.1 {
   10144   db eval {
   10145     SELECT a FROM t1 WHERE r <= -8388608 ORDER BY a
   10146   }
   10147 } {1 2 11 21 37 44 47 55 58 63 64}
   10148 do_test boundary2-4.22.le.2 {
   10149   db eval {
   10150     SELECT a FROM t1 WHERE r <= -8388608 ORDER BY a DESC
   10151   }
   10152 } {64 63 58 55 47 44 37 21 11 2 1}
   10153 do_test boundary2-4.22.le.3 {
   10154   db eval {
   10155     SELECT a FROM t1 WHERE r <= -8388608 ORDER BY r
   10156   }
   10157 } {55 2 64 21 44 58 63 47 11 1 37}
   10158 do_test boundary2-4.22.le.4 {
   10159   db eval {
   10160     SELECT a FROM t1 WHERE r <= -8388608 ORDER BY r DESC
   10161   }
   10162 } {37 1 11 47 63 58 44 21 64 2 55}
   10163 do_test boundary2-4.22.le.5 {
   10164   db eval {
   10165     SELECT a FROM t1 WHERE r <= -8388608 ORDER BY x
   10166   }
   10167 } {55 2 64 21 44 58 63 47 11 1 37}
   10168 do_test boundary2-4.23.1 {
   10169   db eval {
   10170     SELECT * FROM t1 WHERE r=549755813888
   10171   }
   10172 } {549755813888 35 0000008000000000}
   10173 do_test boundary2-4.23.2 {
   10174   db eval {
   10175     SELECT r, a FROM t1 WHERE x='0000008000000000'
   10176   }
   10177 } {549755813888 35}
   10178 do_test boundary2-4.23.3 {
   10179   db eval {
   10180     SELECT r, x FROM t1 WHERE a=35
   10181   }
   10182 } {549755813888 0000008000000000}
   10183 do_test boundary2-4.23.gt.1 {
   10184   db eval {
   10185     SELECT a FROM t1 WHERE r > 549755813888 ORDER BY a
   10186   }
   10187 } {3 7 10 13 17 19 25 26 27 28 34 43 45 56 57}
   10188 do_test boundary2-4.23.gt.2 {
   10189   db eval {
   10190     SELECT a FROM t1 WHERE r > 549755813888 ORDER BY a DESC
   10191   }
   10192 } {57 56 45 43 34 28 27 26 25 19 17 13 10 7 3}
   10193 do_test boundary2-4.23.gt.3 {
   10194   db eval {
   10195     SELECT a FROM t1 WHERE r > 549755813888 ORDER BY r
   10196   }
   10197 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10198 do_test boundary2-4.23.gt.4 {
   10199   db eval {
   10200     SELECT a FROM t1 WHERE r > 549755813888 ORDER BY r DESC
   10201   }
   10202 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57}
   10203 do_test boundary2-4.23.gt.5 {
   10204   db eval {
   10205     SELECT a FROM t1 WHERE r > 549755813888 ORDER BY x
   10206   }
   10207 } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10208 do_test boundary2-4.23.ge.1 {
   10209   db eval {
   10210     SELECT a FROM t1 WHERE r >= 549755813888 ORDER BY a
   10211   }
   10212 } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 56 57}
   10213 do_test boundary2-4.23.ge.2 {
   10214   db eval {
   10215     SELECT a FROM t1 WHERE r >= 549755813888 ORDER BY a DESC
   10216   }
   10217 } {57 56 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
   10218 do_test boundary2-4.23.ge.3 {
   10219   db eval {
   10220     SELECT a FROM t1 WHERE r >= 549755813888 ORDER BY r
   10221   }
   10222 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10223 do_test boundary2-4.23.ge.4 {
   10224   db eval {
   10225     SELECT a FROM t1 WHERE r >= 549755813888 ORDER BY r DESC
   10226   }
   10227 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35}
   10228 do_test boundary2-4.23.ge.5 {
   10229   db eval {
   10230     SELECT a FROM t1 WHERE r >= 549755813888 ORDER BY x
   10231   }
   10232 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10233 do_test boundary2-4.23.lt.1 {
   10234   db eval {
   10235     SELECT a FROM t1 WHERE r < 549755813888 ORDER BY a
   10236   }
   10237 } {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}
   10238 do_test boundary2-4.23.lt.2 {
   10239   db eval {
   10240     SELECT a FROM t1 WHERE r < 549755813888 ORDER BY a DESC
   10241   }
   10242 } {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}
   10243 do_test boundary2-4.23.lt.3 {
   10244   db eval {
   10245     SELECT a FROM t1 WHERE r < 549755813888 ORDER BY r
   10246   }
   10247 } {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}
   10248 do_test boundary2-4.23.lt.4 {
   10249   db eval {
   10250     SELECT a FROM t1 WHERE r < 549755813888 ORDER BY r DESC
   10251   }
   10252 } {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}
   10253 do_test boundary2-4.23.lt.5 {
   10254   db eval {
   10255     SELECT a FROM t1 WHERE r < 549755813888 ORDER BY x
   10256   }
   10257 } {59 60 41 5 31 4 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}
   10258 do_test boundary2-4.23.le.1 {
   10259   db eval {
   10260     SELECT a FROM t1 WHERE r <= 549755813888 ORDER BY a
   10261   }
   10262 } {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}
   10263 do_test boundary2-4.23.le.2 {
   10264   db eval {
   10265     SELECT a FROM t1 WHERE r <= 549755813888 ORDER BY a DESC
   10266   }
   10267 } {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}
   10268 do_test boundary2-4.23.le.3 {
   10269   db eval {
   10270     SELECT a FROM t1 WHERE r <= 549755813888 ORDER BY r
   10271   }
   10272 } {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}
   10273 do_test boundary2-4.23.le.4 {
   10274   db eval {
   10275     SELECT a FROM t1 WHERE r <= 549755813888 ORDER BY r DESC
   10276   }
   10277 } {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}
   10278 do_test boundary2-4.23.le.5 {
   10279   db eval {
   10280     SELECT a FROM t1 WHERE r <= 549755813888 ORDER BY x
   10281   }
   10282 } {59 60 41 5 31 4 49 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}
   10283 do_test boundary2-4.24.1 {
   10284   db eval {
   10285     SELECT * FROM t1 WHERE r=8388607
   10286   }
   10287 } {8388607 18 00000000007fffff}
   10288 do_test boundary2-4.24.2 {
   10289   db eval {
   10290     SELECT r, a FROM t1 WHERE x='00000000007fffff'
   10291   }
   10292 } {8388607 18}
   10293 do_test boundary2-4.24.3 {
   10294   db eval {
   10295     SELECT r, x FROM t1 WHERE a=18
   10296   }
   10297 } {8388607 00000000007fffff}
   10298 do_test boundary2-4.24.gt.1 {
   10299   db eval {
   10300     SELECT a FROM t1 WHERE r > 8388607 ORDER BY a
   10301   }
   10302 } {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}
   10303 do_test boundary2-4.24.gt.2 {
   10304   db eval {
   10305     SELECT a FROM t1 WHERE r > 8388607 ORDER BY a DESC
   10306   }
   10307 } {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}
   10308 do_test boundary2-4.24.gt.3 {
   10309   db eval {
   10310     SELECT a FROM t1 WHERE r > 8388607 ORDER BY r
   10311   }
   10312 } {24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10313 do_test boundary2-4.24.gt.4 {
   10314   db eval {
   10315     SELECT a FROM t1 WHERE r > 8388607 ORDER BY r DESC
   10316   }
   10317 } {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}
   10318 do_test boundary2-4.24.gt.5 {
   10319   db eval {
   10320     SELECT a FROM t1 WHERE r > 8388607 ORDER BY x
   10321   }
   10322 } {24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10323 do_test boundary2-4.24.ge.1 {
   10324   db eval {
   10325     SELECT a FROM t1 WHERE r >= 8388607 ORDER BY a
   10326   }
   10327 } {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}
   10328 do_test boundary2-4.24.ge.2 {
   10329   db eval {
   10330     SELECT a FROM t1 WHERE r >= 8388607 ORDER BY a DESC
   10331   }
   10332 } {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}
   10333 do_test boundary2-4.24.ge.3 {
   10334   db eval {
   10335     SELECT a FROM t1 WHERE r >= 8388607 ORDER BY r
   10336   }
   10337 } {18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10338 do_test boundary2-4.24.ge.4 {
   10339   db eval {
   10340     SELECT a FROM t1 WHERE r >= 8388607 ORDER BY r DESC
   10341   }
   10342 } {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}
   10343 do_test boundary2-4.24.ge.5 {
   10344   db eval {
   10345     SELECT a FROM t1 WHERE r >= 8388607 ORDER BY x
   10346   }
   10347 } {18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10348 do_test boundary2-4.24.lt.1 {
   10349   db eval {
   10350     SELECT a FROM t1 WHERE r < 8388607 ORDER BY a
   10351   }
   10352 } {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}
   10353 do_test boundary2-4.24.lt.2 {
   10354   db eval {
   10355     SELECT a FROM t1 WHERE r < 8388607 ORDER BY a DESC
   10356   }
   10357 } {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}
   10358 do_test boundary2-4.24.lt.3 {
   10359   db eval {
   10360     SELECT a FROM t1 WHERE r < 8388607 ORDER BY r
   10361   }
   10362 } {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}
   10363 do_test boundary2-4.24.lt.4 {
   10364   db eval {
   10365     SELECT a FROM t1 WHERE r < 8388607 ORDER BY r DESC
   10366   }
   10367 } {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}
   10368 do_test boundary2-4.24.lt.5 {
   10369   db eval {
   10370     SELECT a FROM t1 WHERE r < 8388607 ORDER BY x
   10371   }
   10372 } {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}
   10373 do_test boundary2-4.24.le.1 {
   10374   db eval {
   10375     SELECT a FROM t1 WHERE r <= 8388607 ORDER BY a
   10376   }
   10377 } {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}
   10378 do_test boundary2-4.24.le.2 {
   10379   db eval {
   10380     SELECT a FROM t1 WHERE r <= 8388607 ORDER BY a DESC
   10381   }
   10382 } {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}
   10383 do_test boundary2-4.24.le.3 {
   10384   db eval {
   10385     SELECT a FROM t1 WHERE r <= 8388607 ORDER BY r
   10386   }
   10387 } {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}
   10388 do_test boundary2-4.24.le.4 {
   10389   db eval {
   10390     SELECT a FROM t1 WHERE r <= 8388607 ORDER BY r DESC
   10391   }
   10392 } {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}
   10393 do_test boundary2-4.24.le.5 {
   10394   db eval {
   10395     SELECT a FROM t1 WHERE r <= 8388607 ORDER BY x
   10396   }
   10397 } {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}
   10398 do_test boundary2-4.25.1 {
   10399   db eval {
   10400     SELECT * FROM t1 WHERE r=-3
   10401   }
   10402 } {-3 52 fffffffffffffffd}
   10403 do_test boundary2-4.25.2 {
   10404   db eval {
   10405     SELECT r, a FROM t1 WHERE x='fffffffffffffffd'
   10406   }
   10407 } {-3 52}
   10408 do_test boundary2-4.25.3 {
   10409   db eval {
   10410     SELECT r, x FROM t1 WHERE a=52
   10411   }
   10412 } {-3 fffffffffffffffd}
   10413 do_test boundary2-4.25.gt.1 {
   10414   db eval {
   10415     SELECT a FROM t1 WHERE r > -3 ORDER BY a
   10416   }
   10417 } {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}
   10418 do_test boundary2-4.25.gt.2 {
   10419   db eval {
   10420     SELECT a FROM t1 WHERE r > -3 ORDER BY a DESC
   10421   }
   10422 } {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}
   10423 do_test boundary2-4.25.gt.3 {
   10424   db eval {
   10425     SELECT a FROM t1 WHERE r > -3 ORDER BY r
   10426   }
   10427 } {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}
   10428 do_test boundary2-4.25.gt.4 {
   10429   db eval {
   10430     SELECT a FROM t1 WHERE r > -3 ORDER BY r DESC
   10431   }
   10432 } {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}
   10433 do_test boundary2-4.25.gt.5 {
   10434   db eval {
   10435     SELECT a FROM t1 WHERE r > -3 ORDER BY x
   10436   }
   10437 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   10438 do_test boundary2-4.25.ge.1 {
   10439   db eval {
   10440     SELECT a FROM t1 WHERE r >= -3 ORDER BY a
   10441   }
   10442 } {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}
   10443 do_test boundary2-4.25.ge.2 {
   10444   db eval {
   10445     SELECT a FROM t1 WHERE r >= -3 ORDER BY a DESC
   10446   }
   10447 } {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}
   10448 do_test boundary2-4.25.ge.3 {
   10449   db eval {
   10450     SELECT a FROM t1 WHERE r >= -3 ORDER BY r
   10451   }
   10452 } {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}
   10453 do_test boundary2-4.25.ge.4 {
   10454   db eval {
   10455     SELECT a FROM t1 WHERE r >= -3 ORDER BY r DESC
   10456   }
   10457 } {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}
   10458 do_test boundary2-4.25.ge.5 {
   10459   db eval {
   10460     SELECT a FROM t1 WHERE r >= -3 ORDER BY x
   10461   }
   10462 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   10463 do_test boundary2-4.25.lt.1 {
   10464   db eval {
   10465     SELECT a FROM t1 WHERE r < -3 ORDER BY a
   10466   }
   10467 } {1 2 11 21 29 32 37 44 47 53 54 55 58 63 64}
   10468 do_test boundary2-4.25.lt.2 {
   10469   db eval {
   10470     SELECT a FROM t1 WHERE r < -3 ORDER BY a DESC
   10471   }
   10472 } {64 63 58 55 54 53 47 44 37 32 29 21 11 2 1}
   10473 do_test boundary2-4.25.lt.3 {
   10474   db eval {
   10475     SELECT a FROM t1 WHERE r < -3 ORDER BY r
   10476   }
   10477 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
   10478 do_test boundary2-4.25.lt.4 {
   10479   db eval {
   10480     SELECT a FROM t1 WHERE r < -3 ORDER BY r DESC
   10481   }
   10482 } {53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   10483 do_test boundary2-4.25.lt.5 {
   10484   db eval {
   10485     SELECT a FROM t1 WHERE r < -3 ORDER BY x
   10486   }
   10487 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
   10488 do_test boundary2-4.25.le.1 {
   10489   db eval {
   10490     SELECT a FROM t1 WHERE r <= -3 ORDER BY a
   10491   }
   10492 } {1 2 11 21 29 32 37 44 47 52 53 54 55 58 63 64}
   10493 do_test boundary2-4.25.le.2 {
   10494   db eval {
   10495     SELECT a FROM t1 WHERE r <= -3 ORDER BY a DESC
   10496   }
   10497 } {64 63 58 55 54 53 52 47 44 37 32 29 21 11 2 1}
   10498 do_test boundary2-4.25.le.3 {
   10499   db eval {
   10500     SELECT a FROM t1 WHERE r <= -3 ORDER BY r
   10501   }
   10502 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
   10503 do_test boundary2-4.25.le.4 {
   10504   db eval {
   10505     SELECT a FROM t1 WHERE r <= -3 ORDER BY r DESC
   10506   }
   10507 } {52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   10508 do_test boundary2-4.25.le.5 {
   10509   db eval {
   10510     SELECT a FROM t1 WHERE r <= -3 ORDER BY x
   10511   }
   10512 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
   10513 do_test boundary2-4.26.1 {
   10514   db eval {
   10515     SELECT * FROM t1 WHERE r=0
   10516   }
   10517 } {0 59 0000000000000000}
   10518 do_test boundary2-4.26.2 {
   10519   db eval {
   10520     SELECT r, a FROM t1 WHERE x='0000000000000000'
   10521   }
   10522 } {0 59}
   10523 do_test boundary2-4.26.3 {
   10524   db eval {
   10525     SELECT r, x FROM t1 WHERE a=59
   10526   }
   10527 } {0 0000000000000000}
   10528 do_test boundary2-4.26.gt.1 {
   10529   db eval {
   10530     SELECT a FROM t1 WHERE r > 0 ORDER BY a
   10531   }
   10532 } {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}
   10533 do_test boundary2-4.26.gt.2 {
   10534   db eval {
   10535     SELECT a FROM t1 WHERE r > 0 ORDER BY a DESC
   10536   }
   10537 } {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}
   10538 do_test boundary2-4.26.gt.3 {
   10539   db eval {
   10540     SELECT a FROM t1 WHERE r > 0 ORDER BY r
   10541   }
   10542 } {60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10543 do_test boundary2-4.26.gt.4 {
   10544   db eval {
   10545     SELECT a FROM t1 WHERE r > 0 ORDER BY r DESC
   10546   }
   10547 } {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}
   10548 do_test boundary2-4.26.gt.5 {
   10549   db eval {
   10550     SELECT a FROM t1 WHERE r > 0 ORDER BY x
   10551   }
   10552 } {60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10553 do_test boundary2-4.26.ge.1 {
   10554   db eval {
   10555     SELECT a FROM t1 WHERE r >= 0 ORDER BY a
   10556   }
   10557 } {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}
   10558 do_test boundary2-4.26.ge.2 {
   10559   db eval {
   10560     SELECT a FROM t1 WHERE r >= 0 ORDER BY a DESC
   10561   }
   10562 } {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}
   10563 do_test boundary2-4.26.ge.3 {
   10564   db eval {
   10565     SELECT a FROM t1 WHERE r >= 0 ORDER BY r
   10566   }
   10567 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10568 do_test boundary2-4.26.ge.4 {
   10569   db eval {
   10570     SELECT a FROM t1 WHERE r >= 0 ORDER BY r DESC
   10571   }
   10572 } {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}
   10573 do_test boundary2-4.26.ge.5 {
   10574   db eval {
   10575     SELECT a FROM t1 WHERE r >= 0 ORDER BY x
   10576   }
   10577 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10578 do_test boundary2-4.26.lt.1 {
   10579   db eval {
   10580     SELECT a FROM t1 WHERE r < 0 ORDER BY a
   10581   }
   10582 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 63 64}
   10583 do_test boundary2-4.26.lt.2 {
   10584   db eval {
   10585     SELECT a FROM t1 WHERE r < 0 ORDER BY a DESC
   10586   }
   10587 } {64 63 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
   10588 do_test boundary2-4.26.lt.3 {
   10589   db eval {
   10590     SELECT a FROM t1 WHERE r < 0 ORDER BY r
   10591   }
   10592 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   10593 do_test boundary2-4.26.lt.4 {
   10594   db eval {
   10595     SELECT a FROM t1 WHERE r < 0 ORDER BY r DESC
   10596   }
   10597 } {38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   10598 do_test boundary2-4.26.lt.5 {
   10599   db eval {
   10600     SELECT a FROM t1 WHERE r < 0 ORDER BY x
   10601   }
   10602 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   10603 do_test boundary2-4.26.le.1 {
   10604   db eval {
   10605     SELECT a FROM t1 WHERE r <= 0 ORDER BY a
   10606   }
   10607 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 63 64}
   10608 do_test boundary2-4.26.le.2 {
   10609   db eval {
   10610     SELECT a FROM t1 WHERE r <= 0 ORDER BY a DESC
   10611   }
   10612 } {64 63 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
   10613 do_test boundary2-4.26.le.3 {
   10614   db eval {
   10615     SELECT a FROM t1 WHERE r <= 0 ORDER BY r
   10616   }
   10617 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59}
   10618 do_test boundary2-4.26.le.4 {
   10619   db eval {
   10620     SELECT a FROM t1 WHERE r <= 0 ORDER BY r DESC
   10621   }
   10622 } {59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   10623 do_test boundary2-4.26.le.5 {
   10624   db eval {
   10625     SELECT a FROM t1 WHERE r <= 0 ORDER BY x
   10626   }
   10627 } {59 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   10628 do_test boundary2-4.27.1 {
   10629   db eval {
   10630     SELECT * FROM t1 WHERE r=-1
   10631   }
   10632 } {-1 38 ffffffffffffffff}
   10633 do_test boundary2-4.27.2 {
   10634   db eval {
   10635     SELECT r, a FROM t1 WHERE x='ffffffffffffffff'
   10636   }
   10637 } {-1 38}
   10638 do_test boundary2-4.27.3 {
   10639   db eval {
   10640     SELECT r, x FROM t1 WHERE a=38
   10641   }
   10642 } {-1 ffffffffffffffff}
   10643 do_test boundary2-4.27.gt.1 {
   10644   db eval {
   10645     SELECT a FROM t1 WHERE r > -1 ORDER BY a
   10646   }
   10647 } {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}
   10648 do_test boundary2-4.27.gt.2 {
   10649   db eval {
   10650     SELECT a FROM t1 WHERE r > -1 ORDER BY a DESC
   10651   }
   10652 } {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}
   10653 do_test boundary2-4.27.gt.3 {
   10654   db eval {
   10655     SELECT a FROM t1 WHERE r > -1 ORDER BY r
   10656   }
   10657 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10658 do_test boundary2-4.27.gt.4 {
   10659   db eval {
   10660     SELECT a FROM t1 WHERE r > -1 ORDER BY r DESC
   10661   }
   10662 } {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}
   10663 do_test boundary2-4.27.gt.5 {
   10664   db eval {
   10665     SELECT a FROM t1 WHERE r > -1 ORDER BY x
   10666   }
   10667 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10668 do_test boundary2-4.27.ge.1 {
   10669   db eval {
   10670     SELECT a FROM t1 WHERE r >= -1 ORDER BY a
   10671   }
   10672 } {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}
   10673 do_test boundary2-4.27.ge.2 {
   10674   db eval {
   10675     SELECT a FROM t1 WHERE r >= -1 ORDER BY a DESC
   10676   }
   10677 } {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}
   10678 do_test boundary2-4.27.ge.3 {
   10679   db eval {
   10680     SELECT a FROM t1 WHERE r >= -1 ORDER BY r
   10681   }
   10682 } {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}
   10683 do_test boundary2-4.27.ge.4 {
   10684   db eval {
   10685     SELECT a FROM t1 WHERE r >= -1 ORDER BY r DESC
   10686   }
   10687 } {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}
   10688 do_test boundary2-4.27.ge.5 {
   10689   db eval {
   10690     SELECT a FROM t1 WHERE r >= -1 ORDER BY x
   10691   }
   10692 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   10693 do_test boundary2-4.27.lt.1 {
   10694   db eval {
   10695     SELECT a FROM t1 WHERE r < -1 ORDER BY a
   10696   }
   10697 } {1 2 11 21 29 32 33 37 44 47 52 53 54 55 58 63 64}
   10698 do_test boundary2-4.27.lt.2 {
   10699   db eval {
   10700     SELECT a FROM t1 WHERE r < -1 ORDER BY a DESC
   10701   }
   10702 } {64 63 58 55 54 53 52 47 44 37 33 32 29 21 11 2 1}
   10703 do_test boundary2-4.27.lt.3 {
   10704   db eval {
   10705     SELECT a FROM t1 WHERE r < -1 ORDER BY r
   10706   }
   10707 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
   10708 do_test boundary2-4.27.lt.4 {
   10709   db eval {
   10710     SELECT a FROM t1 WHERE r < -1 ORDER BY r DESC
   10711   }
   10712 } {33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   10713 do_test boundary2-4.27.lt.5 {
   10714   db eval {
   10715     SELECT a FROM t1 WHERE r < -1 ORDER BY x
   10716   }
   10717 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
   10718 do_test boundary2-4.27.le.1 {
   10719   db eval {
   10720     SELECT a FROM t1 WHERE r <= -1 ORDER BY a
   10721   }
   10722 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 63 64}
   10723 do_test boundary2-4.27.le.2 {
   10724   db eval {
   10725     SELECT a FROM t1 WHERE r <= -1 ORDER BY a DESC
   10726   }
   10727 } {64 63 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
   10728 do_test boundary2-4.27.le.3 {
   10729   db eval {
   10730     SELECT a FROM t1 WHERE r <= -1 ORDER BY r
   10731   }
   10732 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   10733 do_test boundary2-4.27.le.4 {
   10734   db eval {
   10735     SELECT a FROM t1 WHERE r <= -1 ORDER BY r DESC
   10736   }
   10737 } {38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   10738 do_test boundary2-4.27.le.5 {
   10739   db eval {
   10740     SELECT a FROM t1 WHERE r <= -1 ORDER BY x
   10741   }
   10742 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   10743 do_test boundary2-4.28.1 {
   10744   db eval {
   10745     SELECT * FROM t1 WHERE r=-2
   10746   }
   10747 } {-2 33 fffffffffffffffe}
   10748 do_test boundary2-4.28.2 {
   10749   db eval {
   10750     SELECT r, a FROM t1 WHERE x='fffffffffffffffe'
   10751   }
   10752 } {-2 33}
   10753 do_test boundary2-4.28.3 {
   10754   db eval {
   10755     SELECT r, x FROM t1 WHERE a=33
   10756   }
   10757 } {-2 fffffffffffffffe}
   10758 do_test boundary2-4.28.gt.1 {
   10759   db eval {
   10760     SELECT a FROM t1 WHERE r > -2 ORDER BY a
   10761   }
   10762 } {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}
   10763 do_test boundary2-4.28.gt.2 {
   10764   db eval {
   10765     SELECT a FROM t1 WHERE r > -2 ORDER BY a DESC
   10766   }
   10767 } {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}
   10768 do_test boundary2-4.28.gt.3 {
   10769   db eval {
   10770     SELECT a FROM t1 WHERE r > -2 ORDER BY r
   10771   }
   10772 } {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}
   10773 do_test boundary2-4.28.gt.4 {
   10774   db eval {
   10775     SELECT a FROM t1 WHERE r > -2 ORDER BY r DESC
   10776   }
   10777 } {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}
   10778 do_test boundary2-4.28.gt.5 {
   10779   db eval {
   10780     SELECT a FROM t1 WHERE r > -2 ORDER BY x
   10781   }
   10782 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   10783 do_test boundary2-4.28.ge.1 {
   10784   db eval {
   10785     SELECT a FROM t1 WHERE r >= -2 ORDER BY a
   10786   }
   10787 } {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}
   10788 do_test boundary2-4.28.ge.2 {
   10789   db eval {
   10790     SELECT a FROM t1 WHERE r >= -2 ORDER BY a DESC
   10791   }
   10792 } {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}
   10793 do_test boundary2-4.28.ge.3 {
   10794   db eval {
   10795     SELECT a FROM t1 WHERE r >= -2 ORDER BY r
   10796   }
   10797 } {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}
   10798 do_test boundary2-4.28.ge.4 {
   10799   db eval {
   10800     SELECT a FROM t1 WHERE r >= -2 ORDER BY r DESC
   10801   }
   10802 } {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}
   10803 do_test boundary2-4.28.ge.5 {
   10804   db eval {
   10805     SELECT a FROM t1 WHERE r >= -2 ORDER BY x
   10806   }
   10807 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   10808 do_test boundary2-4.28.lt.1 {
   10809   db eval {
   10810     SELECT a FROM t1 WHERE r < -2 ORDER BY a
   10811   }
   10812 } {1 2 11 21 29 32 37 44 47 52 53 54 55 58 63 64}
   10813 do_test boundary2-4.28.lt.2 {
   10814   db eval {
   10815     SELECT a FROM t1 WHERE r < -2 ORDER BY a DESC
   10816   }
   10817 } {64 63 58 55 54 53 52 47 44 37 32 29 21 11 2 1}
   10818 do_test boundary2-4.28.lt.3 {
   10819   db eval {
   10820     SELECT a FROM t1 WHERE r < -2 ORDER BY r
   10821   }
   10822 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
   10823 do_test boundary2-4.28.lt.4 {
   10824   db eval {
   10825     SELECT a FROM t1 WHERE r < -2 ORDER BY r DESC
   10826   }
   10827 } {52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   10828 do_test boundary2-4.28.lt.5 {
   10829   db eval {
   10830     SELECT a FROM t1 WHERE r < -2 ORDER BY x
   10831   }
   10832 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
   10833 do_test boundary2-4.28.le.1 {
   10834   db eval {
   10835     SELECT a FROM t1 WHERE r <= -2 ORDER BY a
   10836   }
   10837 } {1 2 11 21 29 32 33 37 44 47 52 53 54 55 58 63 64}
   10838 do_test boundary2-4.28.le.2 {
   10839   db eval {
   10840     SELECT a FROM t1 WHERE r <= -2 ORDER BY a DESC
   10841   }
   10842 } {64 63 58 55 54 53 52 47 44 37 33 32 29 21 11 2 1}
   10843 do_test boundary2-4.28.le.3 {
   10844   db eval {
   10845     SELECT a FROM t1 WHERE r <= -2 ORDER BY r
   10846   }
   10847 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
   10848 do_test boundary2-4.28.le.4 {
   10849   db eval {
   10850     SELECT a FROM t1 WHERE r <= -2 ORDER BY r DESC
   10851   }
   10852 } {33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   10853 do_test boundary2-4.28.le.5 {
   10854   db eval {
   10855     SELECT a FROM t1 WHERE r <= -2 ORDER BY x
   10856   }
   10857 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
   10858 do_test boundary2-4.29.1 {
   10859   db eval {
   10860     SELECT * FROM t1 WHERE r=2097152
   10861   }
   10862 } {2097152 42 0000000000200000}
   10863 do_test boundary2-4.29.2 {
   10864   db eval {
   10865     SELECT r, a FROM t1 WHERE x='0000000000200000'
   10866   }
   10867 } {2097152 42}
   10868 do_test boundary2-4.29.3 {
   10869   db eval {
   10870     SELECT r, x FROM t1 WHERE a=42
   10871   }
   10872 } {2097152 0000000000200000}
   10873 do_test boundary2-4.29.gt.1 {
   10874   db eval {
   10875     SELECT a FROM t1 WHERE r > 2097152 ORDER BY a
   10876   }
   10877 } {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}
   10878 do_test boundary2-4.29.gt.2 {
   10879   db eval {
   10880     SELECT a FROM t1 WHERE r > 2097152 ORDER BY a DESC
   10881   }
   10882 } {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}
   10883 do_test boundary2-4.29.gt.3 {
   10884   db eval {
   10885     SELECT a FROM t1 WHERE r > 2097152 ORDER BY r
   10886   }
   10887 } {18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10888 do_test boundary2-4.29.gt.4 {
   10889   db eval {
   10890     SELECT a FROM t1 WHERE r > 2097152 ORDER BY r DESC
   10891   }
   10892 } {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}
   10893 do_test boundary2-4.29.gt.5 {
   10894   db eval {
   10895     SELECT a FROM t1 WHERE r > 2097152 ORDER BY x
   10896   }
   10897 } {18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10898 do_test boundary2-4.29.ge.1 {
   10899   db eval {
   10900     SELECT a FROM t1 WHERE r >= 2097152 ORDER BY a
   10901   }
   10902 } {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}
   10903 do_test boundary2-4.29.ge.2 {
   10904   db eval {
   10905     SELECT a FROM t1 WHERE r >= 2097152 ORDER BY a DESC
   10906   }
   10907 } {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}
   10908 do_test boundary2-4.29.ge.3 {
   10909   db eval {
   10910     SELECT a FROM t1 WHERE r >= 2097152 ORDER BY r
   10911   }
   10912 } {42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10913 do_test boundary2-4.29.ge.4 {
   10914   db eval {
   10915     SELECT a FROM t1 WHERE r >= 2097152 ORDER BY r DESC
   10916   }
   10917 } {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}
   10918 do_test boundary2-4.29.ge.5 {
   10919   db eval {
   10920     SELECT a FROM t1 WHERE r >= 2097152 ORDER BY x
   10921   }
   10922 } {42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   10923 do_test boundary2-4.29.lt.1 {
   10924   db eval {
   10925     SELECT a FROM t1 WHERE r < 2097152 ORDER BY a
   10926   }
   10927 } {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}
   10928 do_test boundary2-4.29.lt.2 {
   10929   db eval {
   10930     SELECT a FROM t1 WHERE r < 2097152 ORDER BY a DESC
   10931   }
   10932 } {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}
   10933 do_test boundary2-4.29.lt.3 {
   10934   db eval {
   10935     SELECT a FROM t1 WHERE r < 2097152 ORDER BY r
   10936   }
   10937 } {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}
   10938 do_test boundary2-4.29.lt.4 {
   10939   db eval {
   10940     SELECT a FROM t1 WHERE r < 2097152 ORDER BY r DESC
   10941   }
   10942 } {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}
   10943 do_test boundary2-4.29.lt.5 {
   10944   db eval {
   10945     SELECT a FROM t1 WHERE r < 2097152 ORDER BY x
   10946   }
   10947 } {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}
   10948 do_test boundary2-4.29.le.1 {
   10949   db eval {
   10950     SELECT a FROM t1 WHERE r <= 2097152 ORDER BY a
   10951   }
   10952 } {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}
   10953 do_test boundary2-4.29.le.2 {
   10954   db eval {
   10955     SELECT a FROM t1 WHERE r <= 2097152 ORDER BY a DESC
   10956   }
   10957 } {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}
   10958 do_test boundary2-4.29.le.3 {
   10959   db eval {
   10960     SELECT a FROM t1 WHERE r <= 2097152 ORDER BY r
   10961   }
   10962 } {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}
   10963 do_test boundary2-4.29.le.4 {
   10964   db eval {
   10965     SELECT a FROM t1 WHERE r <= 2097152 ORDER BY r DESC
   10966   }
   10967 } {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}
   10968 do_test boundary2-4.29.le.5 {
   10969   db eval {
   10970     SELECT a FROM t1 WHERE r <= 2097152 ORDER BY x
   10971   }
   10972 } {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}
   10973 do_test boundary2-4.30.1 {
   10974   db eval {
   10975     SELECT * FROM t1 WHERE r=128
   10976   }
   10977 } {128 49 0000000000000080}
   10978 do_test boundary2-4.30.2 {
   10979   db eval {
   10980     SELECT r, a FROM t1 WHERE x='0000000000000080'
   10981   }
   10982 } {128 49}
   10983 do_test boundary2-4.30.3 {
   10984   db eval {
   10985     SELECT r, x FROM t1 WHERE a=49
   10986   }
   10987 } {128 0000000000000080}
   10988 do_test boundary2-4.30.gt.1 {
   10989   db eval {
   10990     SELECT a FROM t1 WHERE r > 128 ORDER BY a
   10991   }
   10992 } {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}
   10993 do_test boundary2-4.30.gt.2 {
   10994   db eval {
   10995     SELECT a FROM t1 WHERE r > 128 ORDER BY a DESC
   10996   }
   10997 } {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}
   10998 do_test boundary2-4.30.gt.3 {
   10999   db eval {
   11000     SELECT a FROM t1 WHERE r > 128 ORDER BY r
   11001   }
   11002 } {30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   11003 do_test boundary2-4.30.gt.4 {
   11004   db eval {
   11005     SELECT a FROM t1 WHERE r > 128 ORDER BY r DESC
   11006   }
   11007 } {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}
   11008 do_test boundary2-4.30.gt.5 {
   11009   db eval {
   11010     SELECT a FROM t1 WHERE r > 128 ORDER BY x
   11011   }
   11012 } {30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   11013 do_test boundary2-4.30.ge.1 {
   11014   db eval {
   11015     SELECT a FROM t1 WHERE r >= 128 ORDER BY a
   11016   }
   11017 } {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}
   11018 do_test boundary2-4.30.ge.2 {
   11019   db eval {
   11020     SELECT a FROM t1 WHERE r >= 128 ORDER BY a DESC
   11021   }
   11022 } {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}
   11023 do_test boundary2-4.30.ge.3 {
   11024   db eval {
   11025     SELECT a FROM t1 WHERE r >= 128 ORDER BY r
   11026   }
   11027 } {49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   11028 do_test boundary2-4.30.ge.4 {
   11029   db eval {
   11030     SELECT a FROM t1 WHERE r >= 128 ORDER BY r DESC
   11031   }
   11032 } {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}
   11033 do_test boundary2-4.30.ge.5 {
   11034   db eval {
   11035     SELECT a FROM t1 WHERE r >= 128 ORDER BY x
   11036   }
   11037 } {49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   11038 do_test boundary2-4.30.lt.1 {
   11039   db eval {
   11040     SELECT a FROM t1 WHERE r < 128 ORDER BY a
   11041   }
   11042 } {1 2 4 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
   11043 do_test boundary2-4.30.lt.2 {
   11044   db eval {
   11045     SELECT a FROM t1 WHERE r < 128 ORDER BY a DESC
   11046   }
   11047 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 4 2 1}
   11048 do_test boundary2-4.30.lt.3 {
   11049   db eval {
   11050     SELECT a FROM t1 WHERE r < 128 ORDER BY r
   11051   }
   11052 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4}
   11053 do_test boundary2-4.30.lt.4 {
   11054   db eval {
   11055     SELECT a FROM t1 WHERE r < 128 ORDER BY r DESC
   11056   }
   11057 } {4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   11058 do_test boundary2-4.30.lt.5 {
   11059   db eval {
   11060     SELECT a FROM t1 WHERE r < 128 ORDER BY x
   11061   }
   11062 } {59 60 41 5 31 4 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   11063 do_test boundary2-4.30.le.1 {
   11064   db eval {
   11065     SELECT a FROM t1 WHERE r <= 128 ORDER BY a
   11066   }
   11067 } {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}
   11068 do_test boundary2-4.30.le.2 {
   11069   db eval {
   11070     SELECT a FROM t1 WHERE r <= 128 ORDER BY a DESC
   11071   }
   11072 } {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}
   11073 do_test boundary2-4.30.le.3 {
   11074   db eval {
   11075     SELECT a FROM t1 WHERE r <= 128 ORDER BY r
   11076   }
   11077 } {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}
   11078 do_test boundary2-4.30.le.4 {
   11079   db eval {
   11080     SELECT a FROM t1 WHERE r <= 128 ORDER BY r DESC
   11081   }
   11082 } {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}
   11083 do_test boundary2-4.30.le.5 {
   11084   db eval {
   11085     SELECT a FROM t1 WHERE r <= 128 ORDER BY x
   11086   }
   11087 } {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}
   11088 do_test boundary2-4.31.1 {
   11089   db eval {
   11090     SELECT * FROM t1 WHERE r=255
   11091   }
   11092 } {255 30 00000000000000ff}
   11093 do_test boundary2-4.31.2 {
   11094   db eval {
   11095     SELECT r, a FROM t1 WHERE x='00000000000000ff'
   11096   }
   11097 } {255 30}
   11098 do_test boundary2-4.31.3 {
   11099   db eval {
   11100     SELECT r, x FROM t1 WHERE a=30
   11101   }
   11102 } {255 00000000000000ff}
   11103 do_test boundary2-4.31.gt.1 {
   11104   db eval {
   11105     SELECT a FROM t1 WHERE r > 255 ORDER BY a
   11106   }
   11107 } {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}
   11108 do_test boundary2-4.31.gt.2 {
   11109   db eval {
   11110     SELECT a FROM t1 WHERE r > 255 ORDER BY a DESC
   11111   }
   11112 } {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}
   11113 do_test boundary2-4.31.gt.3 {
   11114   db eval {
   11115     SELECT a FROM t1 WHERE r > 255 ORDER BY r
   11116   }
   11117 } {61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   11118 do_test boundary2-4.31.gt.4 {
   11119   db eval {
   11120     SELECT a FROM t1 WHERE r > 255 ORDER BY r DESC
   11121   }
   11122 } {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}
   11123 do_test boundary2-4.31.gt.5 {
   11124   db eval {
   11125     SELECT a FROM t1 WHERE r > 255 ORDER BY x
   11126   }
   11127 } {61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   11128 do_test boundary2-4.31.ge.1 {
   11129   db eval {
   11130     SELECT a FROM t1 WHERE r >= 255 ORDER BY a
   11131   }
   11132 } {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}
   11133 do_test boundary2-4.31.ge.2 {
   11134   db eval {
   11135     SELECT a FROM t1 WHERE r >= 255 ORDER BY a DESC
   11136   }
   11137 } {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}
   11138 do_test boundary2-4.31.ge.3 {
   11139   db eval {
   11140     SELECT a FROM t1 WHERE r >= 255 ORDER BY r
   11141   }
   11142 } {30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   11143 do_test boundary2-4.31.ge.4 {
   11144   db eval {
   11145     SELECT a FROM t1 WHERE r >= 255 ORDER BY r DESC
   11146   }
   11147 } {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}
   11148 do_test boundary2-4.31.ge.5 {
   11149   db eval {
   11150     SELECT a FROM t1 WHERE r >= 255 ORDER BY x
   11151   }
   11152 } {30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   11153 do_test boundary2-4.31.lt.1 {
   11154   db eval {
   11155     SELECT a FROM t1 WHERE r < 255 ORDER BY a
   11156   }
   11157 } {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}
   11158 do_test boundary2-4.31.lt.2 {
   11159   db eval {
   11160     SELECT a FROM t1 WHERE r < 255 ORDER BY a DESC
   11161   }
   11162 } {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}
   11163 do_test boundary2-4.31.lt.3 {
   11164   db eval {
   11165     SELECT a FROM t1 WHERE r < 255 ORDER BY r
   11166   }
   11167 } {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}
   11168 do_test boundary2-4.31.lt.4 {
   11169   db eval {
   11170     SELECT a FROM t1 WHERE r < 255 ORDER BY r DESC
   11171   }
   11172 } {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}
   11173 do_test boundary2-4.31.lt.5 {
   11174   db eval {
   11175     SELECT a FROM t1 WHERE r < 255 ORDER BY x
   11176   }
   11177 } {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}
   11178 do_test boundary2-4.31.le.1 {
   11179   db eval {
   11180     SELECT a FROM t1 WHERE r <= 255 ORDER BY a
   11181   }
   11182 } {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}
   11183 do_test boundary2-4.31.le.2 {
   11184   db eval {
   11185     SELECT a FROM t1 WHERE r <= 255 ORDER BY a DESC
   11186   }
   11187 } {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}
   11188 do_test boundary2-4.31.le.3 {
   11189   db eval {
   11190     SELECT a FROM t1 WHERE r <= 255 ORDER BY r
   11191   }
   11192 } {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}
   11193 do_test boundary2-4.31.le.4 {
   11194   db eval {
   11195     SELECT a FROM t1 WHERE r <= 255 ORDER BY r DESC
   11196   }
   11197 } {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}
   11198 do_test boundary2-4.31.le.5 {
   11199   db eval {
   11200     SELECT a FROM t1 WHERE r <= 255 ORDER BY x
   11201   }
   11202 } {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}
   11203 do_test boundary2-4.32.1 {
   11204   db eval {
   11205     SELECT * FROM t1 WHERE r=-2147483648
   11206   }
   11207 } {-2147483648 11 ffffffff80000000}
   11208 do_test boundary2-4.32.2 {
   11209   db eval {
   11210     SELECT r, a FROM t1 WHERE x='ffffffff80000000'
   11211   }
   11212 } {-2147483648 11}
   11213 do_test boundary2-4.32.3 {
   11214   db eval {
   11215     SELECT r, x FROM t1 WHERE a=11
   11216   }
   11217 } {-2147483648 ffffffff80000000}
   11218 do_test boundary2-4.32.gt.1 {
   11219   db eval {
   11220     SELECT a FROM t1 WHERE r > -2147483648 ORDER BY a
   11221   }
   11222 } {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}
   11223 do_test boundary2-4.32.gt.2 {
   11224   db eval {
   11225     SELECT a FROM t1 WHERE r > -2147483648 ORDER BY a DESC
   11226   }
   11227 } {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}
   11228 do_test boundary2-4.32.gt.3 {
   11229   db eval {
   11230     SELECT a FROM t1 WHERE r > -2147483648 ORDER BY r
   11231   }
   11232 } {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}
   11233 do_test boundary2-4.32.gt.4 {
   11234   db eval {
   11235     SELECT a FROM t1 WHERE r > -2147483648 ORDER BY r DESC
   11236   }
   11237 } {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}
   11238 do_test boundary2-4.32.gt.5 {
   11239   db eval {
   11240     SELECT a FROM t1 WHERE r > -2147483648 ORDER BY x
   11241   }
   11242 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   11243 do_test boundary2-4.32.ge.1 {
   11244   db eval {
   11245     SELECT a FROM t1 WHERE r >= -2147483648 ORDER BY a
   11246   }
   11247 } {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}
   11248 do_test boundary2-4.32.ge.2 {
   11249   db eval {
   11250     SELECT a FROM t1 WHERE r >= -2147483648 ORDER BY a DESC
   11251   }
   11252 } {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}
   11253 do_test boundary2-4.32.ge.3 {
   11254   db eval {
   11255     SELECT a FROM t1 WHERE r >= -2147483648 ORDER BY r
   11256   }
   11257 } {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}
   11258 do_test boundary2-4.32.ge.4 {
   11259   db eval {
   11260     SELECT a FROM t1 WHERE r >= -2147483648 ORDER BY r DESC
   11261   }
   11262 } {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}
   11263 do_test boundary2-4.32.ge.5 {
   11264   db eval {
   11265     SELECT a FROM t1 WHERE r >= -2147483648 ORDER BY x
   11266   }
   11267 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   11268 do_test boundary2-4.32.lt.1 {
   11269   db eval {
   11270     SELECT a FROM t1 WHERE r < -2147483648 ORDER BY a
   11271   }
   11272 } {2 21 44 47 55 58 63 64}
   11273 do_test boundary2-4.32.lt.2 {
   11274   db eval {
   11275     SELECT a FROM t1 WHERE r < -2147483648 ORDER BY a DESC
   11276   }
   11277 } {64 63 58 55 47 44 21 2}
   11278 do_test boundary2-4.32.lt.3 {
   11279   db eval {
   11280     SELECT a FROM t1 WHERE r < -2147483648 ORDER BY r
   11281   }
   11282 } {55 2 64 21 44 58 63 47}
   11283 do_test boundary2-4.32.lt.4 {
   11284   db eval {
   11285     SELECT a FROM t1 WHERE r < -2147483648 ORDER BY r DESC
   11286   }
   11287 } {47 63 58 44 21 64 2 55}
   11288 do_test boundary2-4.32.lt.5 {
   11289   db eval {
   11290     SELECT a FROM t1 WHERE r < -2147483648 ORDER BY x
   11291   }
   11292 } {55 2 64 21 44 58 63 47}
   11293 do_test boundary2-4.32.le.1 {
   11294   db eval {
   11295     SELECT a FROM t1 WHERE r <= -2147483648 ORDER BY a
   11296   }
   11297 } {2 11 21 44 47 55 58 63 64}
   11298 do_test boundary2-4.32.le.2 {
   11299   db eval {
   11300     SELECT a FROM t1 WHERE r <= -2147483648 ORDER BY a DESC
   11301   }
   11302 } {64 63 58 55 47 44 21 11 2}
   11303 do_test boundary2-4.32.le.3 {
   11304   db eval {
   11305     SELECT a FROM t1 WHERE r <= -2147483648 ORDER BY r
   11306   }
   11307 } {55 2 64 21 44 58 63 47 11}
   11308 do_test boundary2-4.32.le.4 {
   11309   db eval {
   11310     SELECT a FROM t1 WHERE r <= -2147483648 ORDER BY r DESC
   11311   }
   11312 } {11 47 63 58 44 21 64 2 55}
   11313 do_test boundary2-4.32.le.5 {
   11314   db eval {
   11315     SELECT a FROM t1 WHERE r <= -2147483648 ORDER BY x
   11316   }
   11317 } {55 2 64 21 44 58 63 47 11}
   11318 do_test boundary2-4.33.1 {
   11319   db eval {
   11320     SELECT * FROM t1 WHERE r=34359738367
   11321   }
   11322 } {34359738367 39 00000007ffffffff}
   11323 do_test boundary2-4.33.2 {
   11324   db eval {
   11325     SELECT r, a FROM t1 WHERE x='00000007ffffffff'
   11326   }
   11327 } {34359738367 39}
   11328 do_test boundary2-4.33.3 {
   11329   db eval {
   11330     SELECT r, x FROM t1 WHERE a=39
   11331   }
   11332 } {34359738367 00000007ffffffff}
   11333 do_test boundary2-4.33.gt.1 {
   11334   db eval {
   11335     SELECT a FROM t1 WHERE r > 34359738367 ORDER BY a
   11336   }
   11337 } {3 7 10 13 17 19 22 25 26 27 28 34 35 43 45 46 56 57}
   11338 do_test boundary2-4.33.gt.2 {
   11339   db eval {
   11340     SELECT a FROM t1 WHERE r > 34359738367 ORDER BY a DESC
   11341   }
   11342 } {57 56 46 45 43 35 34 28 27 26 25 22 19 17 13 10 7 3}
   11343 do_test boundary2-4.33.gt.3 {
   11344   db eval {
   11345     SELECT a FROM t1 WHERE r > 34359738367 ORDER BY r
   11346   }
   11347 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   11348 do_test boundary2-4.33.gt.4 {
   11349   db eval {
   11350     SELECT a FROM t1 WHERE r > 34359738367 ORDER BY r DESC
   11351   }
   11352 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22}
   11353 do_test boundary2-4.33.gt.5 {
   11354   db eval {
   11355     SELECT a FROM t1 WHERE r > 34359738367 ORDER BY x
   11356   }
   11357 } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   11358 do_test boundary2-4.33.ge.1 {
   11359   db eval {
   11360     SELECT a FROM t1 WHERE r >= 34359738367 ORDER BY a
   11361   }
   11362 } {3 7 10 13 17 19 22 25 26 27 28 34 35 39 43 45 46 56 57}
   11363 do_test boundary2-4.33.ge.2 {
   11364   db eval {
   11365     SELECT a FROM t1 WHERE r >= 34359738367 ORDER BY a DESC
   11366   }
   11367 } {57 56 46 45 43 39 35 34 28 27 26 25 22 19 17 13 10 7 3}
   11368 do_test boundary2-4.33.ge.3 {
   11369   db eval {
   11370     SELECT a FROM t1 WHERE r >= 34359738367 ORDER BY r
   11371   }
   11372 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   11373 do_test boundary2-4.33.ge.4 {
   11374   db eval {
   11375     SELECT a FROM t1 WHERE r >= 34359738367 ORDER BY r DESC
   11376   }
   11377 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39}
   11378 do_test boundary2-4.33.ge.5 {
   11379   db eval {
   11380     SELECT a FROM t1 WHERE r >= 34359738367 ORDER BY x
   11381   }
   11382 } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   11383 do_test boundary2-4.33.lt.1 {
   11384   db eval {
   11385     SELECT a FROM t1 WHERE r < 34359738367 ORDER BY a
   11386   }
   11387 } {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}
   11388 do_test boundary2-4.33.lt.2 {
   11389   db eval {
   11390     SELECT a FROM t1 WHERE r < 34359738367 ORDER BY a DESC
   11391   }
   11392 } {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}
   11393 do_test boundary2-4.33.lt.3 {
   11394   db eval {
   11395     SELECT a FROM t1 WHERE r < 34359738367 ORDER BY r
   11396   }
   11397 } {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}
   11398 do_test boundary2-4.33.lt.4 {
   11399   db eval {
   11400     SELECT a FROM t1 WHERE r < 34359738367 ORDER BY r DESC
   11401   }
   11402 } {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}
   11403 do_test boundary2-4.33.lt.5 {
   11404   db eval {
   11405     SELECT a FROM t1 WHERE r < 34359738367 ORDER BY x
   11406   }
   11407 } {59 60 41 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}
   11408 do_test boundary2-4.33.le.1 {
   11409   db eval {
   11410     SELECT a FROM t1 WHERE r <= 34359738367 ORDER BY a
   11411   }
   11412 } {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}
   11413 do_test boundary2-4.33.le.2 {
   11414   db eval {
   11415     SELECT a FROM t1 WHERE r <= 34359738367 ORDER BY a DESC
   11416   }
   11417 } {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}
   11418 do_test boundary2-4.33.le.3 {
   11419   db eval {
   11420     SELECT a FROM t1 WHERE r <= 34359738367 ORDER BY r
   11421   }
   11422 } {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}
   11423 do_test boundary2-4.33.le.4 {
   11424   db eval {
   11425     SELECT a FROM t1 WHERE r <= 34359738367 ORDER BY r DESC
   11426   }
   11427 } {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}
   11428 do_test boundary2-4.33.le.5 {
   11429   db eval {
   11430     SELECT a FROM t1 WHERE r <= 34359738367 ORDER BY x
   11431   }
   11432 } {59 60 41 5 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}
   11433 do_test boundary2-4.34.1 {
   11434   db eval {
   11435     SELECT * FROM t1 WHERE r=-549755813889
   11436   }
   11437 } {-549755813889 58 ffffff7fffffffff}
   11438 do_test boundary2-4.34.2 {
   11439   db eval {
   11440     SELECT r, a FROM t1 WHERE x='ffffff7fffffffff'
   11441   }
   11442 } {-549755813889 58}
   11443 do_test boundary2-4.34.3 {
   11444   db eval {
   11445     SELECT r, x FROM t1 WHERE a=58
   11446   }
   11447 } {-549755813889 ffffff7fffffffff}
   11448 do_test boundary2-4.34.gt.1 {
   11449   db eval {
   11450     SELECT a FROM t1 WHERE r > -549755813889 ORDER BY a
   11451   }
   11452 } {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}
   11453 do_test boundary2-4.34.gt.2 {
   11454   db eval {
   11455     SELECT a FROM t1 WHERE r > -549755813889 ORDER BY a DESC
   11456   }
   11457 } {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}
   11458 do_test boundary2-4.34.gt.3 {
   11459   db eval {
   11460     SELECT a FROM t1 WHERE r > -549755813889 ORDER BY r
   11461   }
   11462 } {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}
   11463 do_test boundary2-4.34.gt.4 {
   11464   db eval {
   11465     SELECT a FROM t1 WHERE r > -549755813889 ORDER BY r DESC
   11466   }
   11467 } {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}
   11468 do_test boundary2-4.34.gt.5 {
   11469   db eval {
   11470     SELECT a FROM t1 WHERE r > -549755813889 ORDER BY x
   11471   }
   11472 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   11473 do_test boundary2-4.34.ge.1 {
   11474   db eval {
   11475     SELECT a FROM t1 WHERE r >= -549755813889 ORDER BY a
   11476   }
   11477 } {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}
   11478 do_test boundary2-4.34.ge.2 {
   11479   db eval {
   11480     SELECT a FROM t1 WHERE r >= -549755813889 ORDER BY a DESC
   11481   }
   11482 } {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}
   11483 do_test boundary2-4.34.ge.3 {
   11484   db eval {
   11485     SELECT a FROM t1 WHERE r >= -549755813889 ORDER BY r
   11486   }
   11487 } {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}
   11488 do_test boundary2-4.34.ge.4 {
   11489   db eval {
   11490     SELECT a FROM t1 WHERE r >= -549755813889 ORDER BY r DESC
   11491   }
   11492 } {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}
   11493 do_test boundary2-4.34.ge.5 {
   11494   db eval {
   11495     SELECT a FROM t1 WHERE r >= -549755813889 ORDER BY x
   11496   }
   11497 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   11498 do_test boundary2-4.34.lt.1 {
   11499   db eval {
   11500     SELECT a FROM t1 WHERE r < -549755813889 ORDER BY a
   11501   }
   11502 } {2 21 44 55 64}
   11503 do_test boundary2-4.34.lt.2 {
   11504   db eval {
   11505     SELECT a FROM t1 WHERE r < -549755813889 ORDER BY a DESC
   11506   }
   11507 } {64 55 44 21 2}
   11508 do_test boundary2-4.34.lt.3 {
   11509   db eval {
   11510     SELECT a FROM t1 WHERE r < -549755813889 ORDER BY r
   11511   }
   11512 } {55 2 64 21 44}
   11513 do_test boundary2-4.34.lt.4 {
   11514   db eval {
   11515     SELECT a FROM t1 WHERE r < -549755813889 ORDER BY r DESC
   11516   }
   11517 } {44 21 64 2 55}
   11518 do_test boundary2-4.34.lt.5 {
   11519   db eval {
   11520     SELECT a FROM t1 WHERE r < -549755813889 ORDER BY x
   11521   }
   11522 } {55 2 64 21 44}
   11523 do_test boundary2-4.34.le.1 {
   11524   db eval {
   11525     SELECT a FROM t1 WHERE r <= -549755813889 ORDER BY a
   11526   }
   11527 } {2 21 44 55 58 64}
   11528 do_test boundary2-4.34.le.2 {
   11529   db eval {
   11530     SELECT a FROM t1 WHERE r <= -549755813889 ORDER BY a DESC
   11531   }
   11532 } {64 58 55 44 21 2}
   11533 do_test boundary2-4.34.le.3 {
   11534   db eval {
   11535     SELECT a FROM t1 WHERE r <= -549755813889 ORDER BY r
   11536   }
   11537 } {55 2 64 21 44 58}
   11538 do_test boundary2-4.34.le.4 {
   11539   db eval {
   11540     SELECT a FROM t1 WHERE r <= -549755813889 ORDER BY r DESC
   11541   }
   11542 } {58 44 21 64 2 55}
   11543 do_test boundary2-4.34.le.5 {
   11544   db eval {
   11545     SELECT a FROM t1 WHERE r <= -549755813889 ORDER BY x
   11546   }
   11547 } {55 2 64 21 44 58}
   11548 do_test boundary2-4.35.1 {
   11549   db eval {
   11550     SELECT * FROM t1 WHERE r=-32768
   11551   }
   11552 } {-32768 32 ffffffffffff8000}
   11553 do_test boundary2-4.35.2 {
   11554   db eval {
   11555     SELECT r, a FROM t1 WHERE x='ffffffffffff8000'
   11556   }
   11557 } {-32768 32}
   11558 do_test boundary2-4.35.3 {
   11559   db eval {
   11560     SELECT r, x FROM t1 WHERE a=32
   11561   }
   11562 } {-32768 ffffffffffff8000}
   11563 do_test boundary2-4.35.gt.1 {
   11564   db eval {
   11565     SELECT a FROM t1 WHERE r > -32768 ORDER BY a
   11566   }
   11567 } {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}
   11568 do_test boundary2-4.35.gt.2 {
   11569   db eval {
   11570     SELECT a FROM t1 WHERE r > -32768 ORDER BY a DESC
   11571   }
   11572 } {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}
   11573 do_test boundary2-4.35.gt.3 {
   11574   db eval {
   11575     SELECT a FROM t1 WHERE r > -32768 ORDER BY r
   11576   }
   11577 } {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}
   11578 do_test boundary2-4.35.gt.4 {
   11579   db eval {
   11580     SELECT a FROM t1 WHERE r > -32768 ORDER BY r DESC
   11581   }
   11582 } {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}
   11583 do_test boundary2-4.35.gt.5 {
   11584   db eval {
   11585     SELECT a FROM t1 WHERE r > -32768 ORDER BY x
   11586   }
   11587 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   11588 do_test boundary2-4.35.ge.1 {
   11589   db eval {
   11590     SELECT a FROM t1 WHERE r >= -32768 ORDER BY a
   11591   }
   11592 } {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}
   11593 do_test boundary2-4.35.ge.2 {
   11594   db eval {
   11595     SELECT a FROM t1 WHERE r >= -32768 ORDER BY a DESC
   11596   }
   11597 } {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}
   11598 do_test boundary2-4.35.ge.3 {
   11599   db eval {
   11600     SELECT a FROM t1 WHERE r >= -32768 ORDER BY r
   11601   }
   11602 } {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}
   11603 do_test boundary2-4.35.ge.4 {
   11604   db eval {
   11605     SELECT a FROM t1 WHERE r >= -32768 ORDER BY r DESC
   11606   }
   11607 } {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}
   11608 do_test boundary2-4.35.ge.5 {
   11609   db eval {
   11610     SELECT a FROM t1 WHERE r >= -32768 ORDER BY x
   11611   }
   11612 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   11613 do_test boundary2-4.35.lt.1 {
   11614   db eval {
   11615     SELECT a FROM t1 WHERE r < -32768 ORDER BY a
   11616   }
   11617 } {1 2 11 21 29 37 44 47 55 58 63 64}
   11618 do_test boundary2-4.35.lt.2 {
   11619   db eval {
   11620     SELECT a FROM t1 WHERE r < -32768 ORDER BY a DESC
   11621   }
   11622 } {64 63 58 55 47 44 37 29 21 11 2 1}
   11623 do_test boundary2-4.35.lt.3 {
   11624   db eval {
   11625     SELECT a FROM t1 WHERE r < -32768 ORDER BY r
   11626   }
   11627 } {55 2 64 21 44 58 63 47 11 1 37 29}
   11628 do_test boundary2-4.35.lt.4 {
   11629   db eval {
   11630     SELECT a FROM t1 WHERE r < -32768 ORDER BY r DESC
   11631   }
   11632 } {29 37 1 11 47 63 58 44 21 64 2 55}
   11633 do_test boundary2-4.35.lt.5 {
   11634   db eval {
   11635     SELECT a FROM t1 WHERE r < -32768 ORDER BY x
   11636   }
   11637 } {55 2 64 21 44 58 63 47 11 1 37 29}
   11638 do_test boundary2-4.35.le.1 {
   11639   db eval {
   11640     SELECT a FROM t1 WHERE r <= -32768 ORDER BY a
   11641   }
   11642 } {1 2 11 21 29 32 37 44 47 55 58 63 64}
   11643 do_test boundary2-4.35.le.2 {
   11644   db eval {
   11645     SELECT a FROM t1 WHERE r <= -32768 ORDER BY a DESC
   11646   }
   11647 } {64 63 58 55 47 44 37 32 29 21 11 2 1}
   11648 do_test boundary2-4.35.le.3 {
   11649   db eval {
   11650     SELECT a FROM t1 WHERE r <= -32768 ORDER BY r
   11651   }
   11652 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
   11653 do_test boundary2-4.35.le.4 {
   11654   db eval {
   11655     SELECT a FROM t1 WHERE r <= -32768 ORDER BY r DESC
   11656   }
   11657 } {32 29 37 1 11 47 63 58 44 21 64 2 55}
   11658 do_test boundary2-4.35.le.5 {
   11659   db eval {
   11660     SELECT a FROM t1 WHERE r <= -32768 ORDER BY x
   11661   }
   11662 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
   11663 do_test boundary2-4.36.1 {
   11664   db eval {
   11665     SELECT * FROM t1 WHERE r=2147483647
   11666   }
   11667 } {2147483647 20 000000007fffffff}
   11668 do_test boundary2-4.36.2 {
   11669   db eval {
   11670     SELECT r, a FROM t1 WHERE x='000000007fffffff'
   11671   }
   11672 } {2147483647 20}
   11673 do_test boundary2-4.36.3 {
   11674   db eval {
   11675     SELECT r, x FROM t1 WHERE a=20
   11676   }
   11677 } {2147483647 000000007fffffff}
   11678 do_test boundary2-4.36.gt.1 {
   11679   db eval {
   11680     SELECT a FROM t1 WHERE r > 2147483647 ORDER BY a
   11681   }
   11682 } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
   11683 do_test boundary2-4.36.gt.2 {
   11684   db eval {
   11685     SELECT a FROM t1 WHERE r > 2147483647 ORDER BY a DESC
   11686   }
   11687 } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
   11688 do_test boundary2-4.36.gt.3 {
   11689   db eval {
   11690     SELECT a FROM t1 WHERE r > 2147483647 ORDER BY r
   11691   }
   11692 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   11693 do_test boundary2-4.36.gt.4 {
   11694   db eval {
   11695     SELECT a FROM t1 WHERE r > 2147483647 ORDER BY r DESC
   11696   }
   11697 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51}
   11698 do_test boundary2-4.36.gt.5 {
   11699   db eval {
   11700     SELECT a FROM t1 WHERE r > 2147483647 ORDER BY x
   11701   }
   11702 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   11703 do_test boundary2-4.36.ge.1 {
   11704   db eval {
   11705     SELECT a FROM t1 WHERE r >= 2147483647 ORDER BY a
   11706   }
   11707 } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
   11708 do_test boundary2-4.36.ge.2 {
   11709   db eval {
   11710     SELECT a FROM t1 WHERE r >= 2147483647 ORDER BY a DESC
   11711   }
   11712 } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
   11713 do_test boundary2-4.36.ge.3 {
   11714   db eval {
   11715     SELECT a FROM t1 WHERE r >= 2147483647 ORDER BY r
   11716   }
   11717 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   11718 do_test boundary2-4.36.ge.4 {
   11719   db eval {
   11720     SELECT a FROM t1 WHERE r >= 2147483647 ORDER BY r DESC
   11721   }
   11722 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20}
   11723 do_test boundary2-4.36.ge.5 {
   11724   db eval {
   11725     SELECT a FROM t1 WHERE r >= 2147483647 ORDER BY x
   11726   }
   11727 } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   11728 do_test boundary2-4.36.lt.1 {
   11729   db eval {
   11730     SELECT a FROM t1 WHERE r < 2147483647 ORDER BY a
   11731   }
   11732 } {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}
   11733 do_test boundary2-4.36.lt.2 {
   11734   db eval {
   11735     SELECT a FROM t1 WHERE r < 2147483647 ORDER BY a DESC
   11736   }
   11737 } {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}
   11738 do_test boundary2-4.36.lt.3 {
   11739   db eval {
   11740     SELECT a FROM t1 WHERE r < 2147483647 ORDER BY r
   11741   }
   11742 } {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}
   11743 do_test boundary2-4.36.lt.4 {
   11744   db eval {
   11745     SELECT a FROM t1 WHERE r < 2147483647 ORDER BY r DESC
   11746   }
   11747 } {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}
   11748 do_test boundary2-4.36.lt.5 {
   11749   db eval {
   11750     SELECT a FROM t1 WHERE r < 2147483647 ORDER BY x
   11751   }
   11752 } {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}
   11753 do_test boundary2-4.36.le.1 {
   11754   db eval {
   11755     SELECT a FROM t1 WHERE r <= 2147483647 ORDER BY a
   11756   }
   11757 } {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}
   11758 do_test boundary2-4.36.le.2 {
   11759   db eval {
   11760     SELECT a FROM t1 WHERE r <= 2147483647 ORDER BY a DESC
   11761   }
   11762 } {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}
   11763 do_test boundary2-4.36.le.3 {
   11764   db eval {
   11765     SELECT a FROM t1 WHERE r <= 2147483647 ORDER BY r
   11766   }
   11767 } {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}
   11768 do_test boundary2-4.36.le.4 {
   11769   db eval {
   11770     SELECT a FROM t1 WHERE r <= 2147483647 ORDER BY r DESC
   11771   }
   11772 } {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}
   11773 do_test boundary2-4.36.le.5 {
   11774   db eval {
   11775     SELECT a FROM t1 WHERE r <= 2147483647 ORDER BY x
   11776   }
   11777 } {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}
   11778 do_test boundary2-4.37.1 {
   11779   db eval {
   11780     SELECT * FROM t1 WHERE r=-129
   11781   }
   11782 } {-129 54 ffffffffffffff7f}
   11783 do_test boundary2-4.37.2 {
   11784   db eval {
   11785     SELECT r, a FROM t1 WHERE x='ffffffffffffff7f'
   11786   }
   11787 } {-129 54}
   11788 do_test boundary2-4.37.3 {
   11789   db eval {
   11790     SELECT r, x FROM t1 WHERE a=54
   11791   }
   11792 } {-129 ffffffffffffff7f}
   11793 do_test boundary2-4.37.gt.1 {
   11794   db eval {
   11795     SELECT a FROM t1 WHERE r > -129 ORDER BY a
   11796   }
   11797 } {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}
   11798 do_test boundary2-4.37.gt.2 {
   11799   db eval {
   11800     SELECT a FROM t1 WHERE r > -129 ORDER BY a DESC
   11801   }
   11802 } {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}
   11803 do_test boundary2-4.37.gt.3 {
   11804   db eval {
   11805     SELECT a FROM t1 WHERE r > -129 ORDER BY r
   11806   }
   11807 } {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}
   11808 do_test boundary2-4.37.gt.4 {
   11809   db eval {
   11810     SELECT a FROM t1 WHERE r > -129 ORDER BY r DESC
   11811   }
   11812 } {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}
   11813 do_test boundary2-4.37.gt.5 {
   11814   db eval {
   11815     SELECT a FROM t1 WHERE r > -129 ORDER BY x
   11816   }
   11817 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   11818 do_test boundary2-4.37.ge.1 {
   11819   db eval {
   11820     SELECT a FROM t1 WHERE r >= -129 ORDER BY a
   11821   }
   11822 } {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}
   11823 do_test boundary2-4.37.ge.2 {
   11824   db eval {
   11825     SELECT a FROM t1 WHERE r >= -129 ORDER BY a DESC
   11826   }
   11827 } {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}
   11828 do_test boundary2-4.37.ge.3 {
   11829   db eval {
   11830     SELECT a FROM t1 WHERE r >= -129 ORDER BY r
   11831   }
   11832 } {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}
   11833 do_test boundary2-4.37.ge.4 {
   11834   db eval {
   11835     SELECT a FROM t1 WHERE r >= -129 ORDER BY r DESC
   11836   }
   11837 } {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}
   11838 do_test boundary2-4.37.ge.5 {
   11839   db eval {
   11840     SELECT a FROM t1 WHERE r >= -129 ORDER BY x
   11841   }
   11842 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   11843 do_test boundary2-4.37.lt.1 {
   11844   db eval {
   11845     SELECT a FROM t1 WHERE r < -129 ORDER BY a
   11846   }
   11847 } {1 2 11 21 29 32 37 44 47 55 58 63 64}
   11848 do_test boundary2-4.37.lt.2 {
   11849   db eval {
   11850     SELECT a FROM t1 WHERE r < -129 ORDER BY a DESC
   11851   }
   11852 } {64 63 58 55 47 44 37 32 29 21 11 2 1}
   11853 do_test boundary2-4.37.lt.3 {
   11854   db eval {
   11855     SELECT a FROM t1 WHERE r < -129 ORDER BY r
   11856   }
   11857 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
   11858 do_test boundary2-4.37.lt.4 {
   11859   db eval {
   11860     SELECT a FROM t1 WHERE r < -129 ORDER BY r DESC
   11861   }
   11862 } {32 29 37 1 11 47 63 58 44 21 64 2 55}
   11863 do_test boundary2-4.37.lt.5 {
   11864   db eval {
   11865     SELECT a FROM t1 WHERE r < -129 ORDER BY x
   11866   }
   11867 } {55 2 64 21 44 58 63 47 11 1 37 29 32}
   11868 do_test boundary2-4.37.le.1 {
   11869   db eval {
   11870     SELECT a FROM t1 WHERE r <= -129 ORDER BY a
   11871   }
   11872 } {1 2 11 21 29 32 37 44 47 54 55 58 63 64}
   11873 do_test boundary2-4.37.le.2 {
   11874   db eval {
   11875     SELECT a FROM t1 WHERE r <= -129 ORDER BY a DESC
   11876   }
   11877 } {64 63 58 55 54 47 44 37 32 29 21 11 2 1}
   11878 do_test boundary2-4.37.le.3 {
   11879   db eval {
   11880     SELECT a FROM t1 WHERE r <= -129 ORDER BY r
   11881   }
   11882 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
   11883 do_test boundary2-4.37.le.4 {
   11884   db eval {
   11885     SELECT a FROM t1 WHERE r <= -129 ORDER BY r DESC
   11886   }
   11887 } {54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   11888 do_test boundary2-4.37.le.5 {
   11889   db eval {
   11890     SELECT a FROM t1 WHERE r <= -129 ORDER BY x
   11891   }
   11892 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
   11893 do_test boundary2-4.38.1 {
   11894   db eval {
   11895     SELECT * FROM t1 WHERE r=-128
   11896   }
   11897 } {-128 53 ffffffffffffff80}
   11898 do_test boundary2-4.38.2 {
   11899   db eval {
   11900     SELECT r, a FROM t1 WHERE x='ffffffffffffff80'
   11901   }
   11902 } {-128 53}
   11903 do_test boundary2-4.38.3 {
   11904   db eval {
   11905     SELECT r, x FROM t1 WHERE a=53
   11906   }
   11907 } {-128 ffffffffffffff80}
   11908 do_test boundary2-4.38.gt.1 {
   11909   db eval {
   11910     SELECT a FROM t1 WHERE r > -128 ORDER BY a
   11911   }
   11912 } {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}
   11913 do_test boundary2-4.38.gt.2 {
   11914   db eval {
   11915     SELECT a FROM t1 WHERE r > -128 ORDER BY a DESC
   11916   }
   11917 } {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}
   11918 do_test boundary2-4.38.gt.3 {
   11919   db eval {
   11920     SELECT a FROM t1 WHERE r > -128 ORDER BY r
   11921   }
   11922 } {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}
   11923 do_test boundary2-4.38.gt.4 {
   11924   db eval {
   11925     SELECT a FROM t1 WHERE r > -128 ORDER BY r DESC
   11926   }
   11927 } {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}
   11928 do_test boundary2-4.38.gt.5 {
   11929   db eval {
   11930     SELECT a FROM t1 WHERE r > -128 ORDER BY x
   11931   }
   11932 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   11933 do_test boundary2-4.38.ge.1 {
   11934   db eval {
   11935     SELECT a FROM t1 WHERE r >= -128 ORDER BY a
   11936   }
   11937 } {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}
   11938 do_test boundary2-4.38.ge.2 {
   11939   db eval {
   11940     SELECT a FROM t1 WHERE r >= -128 ORDER BY a DESC
   11941   }
   11942 } {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}
   11943 do_test boundary2-4.38.ge.3 {
   11944   db eval {
   11945     SELECT a FROM t1 WHERE r >= -128 ORDER BY r
   11946   }
   11947 } {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}
   11948 do_test boundary2-4.38.ge.4 {
   11949   db eval {
   11950     SELECT a FROM t1 WHERE r >= -128 ORDER BY r DESC
   11951   }
   11952 } {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}
   11953 do_test boundary2-4.38.ge.5 {
   11954   db eval {
   11955     SELECT a FROM t1 WHERE r >= -128 ORDER BY x
   11956   }
   11957 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   11958 do_test boundary2-4.38.lt.1 {
   11959   db eval {
   11960     SELECT a FROM t1 WHERE r < -128 ORDER BY a
   11961   }
   11962 } {1 2 11 21 29 32 37 44 47 54 55 58 63 64}
   11963 do_test boundary2-4.38.lt.2 {
   11964   db eval {
   11965     SELECT a FROM t1 WHERE r < -128 ORDER BY a DESC
   11966   }
   11967 } {64 63 58 55 54 47 44 37 32 29 21 11 2 1}
   11968 do_test boundary2-4.38.lt.3 {
   11969   db eval {
   11970     SELECT a FROM t1 WHERE r < -128 ORDER BY r
   11971   }
   11972 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
   11973 do_test boundary2-4.38.lt.4 {
   11974   db eval {
   11975     SELECT a FROM t1 WHERE r < -128 ORDER BY r DESC
   11976   }
   11977 } {54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   11978 do_test boundary2-4.38.lt.5 {
   11979   db eval {
   11980     SELECT a FROM t1 WHERE r < -128 ORDER BY x
   11981   }
   11982 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
   11983 do_test boundary2-4.38.le.1 {
   11984   db eval {
   11985     SELECT a FROM t1 WHERE r <= -128 ORDER BY a
   11986   }
   11987 } {1 2 11 21 29 32 37 44 47 53 54 55 58 63 64}
   11988 do_test boundary2-4.38.le.2 {
   11989   db eval {
   11990     SELECT a FROM t1 WHERE r <= -128 ORDER BY a DESC
   11991   }
   11992 } {64 63 58 55 54 53 47 44 37 32 29 21 11 2 1}
   11993 do_test boundary2-4.38.le.3 {
   11994   db eval {
   11995     SELECT a FROM t1 WHERE r <= -128 ORDER BY r
   11996   }
   11997 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
   11998 do_test boundary2-4.38.le.4 {
   11999   db eval {
   12000     SELECT a FROM t1 WHERE r <= -128 ORDER BY r DESC
   12001   }
   12002 } {53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   12003 do_test boundary2-4.38.le.5 {
   12004   db eval {
   12005     SELECT a FROM t1 WHERE r <= -128 ORDER BY x
   12006   }
   12007 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
   12008 do_test boundary2-4.39.1 {
   12009   db eval {
   12010     SELECT * FROM t1 WHERE r=72057594037927936
   12011   }
   12012 } {72057594037927936 28 0100000000000000}
   12013 do_test boundary2-4.39.2 {
   12014   db eval {
   12015     SELECT r, a FROM t1 WHERE x='0100000000000000'
   12016   }
   12017 } {72057594037927936 28}
   12018 do_test boundary2-4.39.3 {
   12019   db eval {
   12020     SELECT r, x FROM t1 WHERE a=28
   12021   }
   12022 } {72057594037927936 0100000000000000}
   12023 do_test boundary2-4.39.gt.1 {
   12024   db eval {
   12025     SELECT a FROM t1 WHERE r > 72057594037927936 ORDER BY a
   12026   }
   12027 } {3}
   12028 do_test boundary2-4.39.gt.2 {
   12029   db eval {
   12030     SELECT a FROM t1 WHERE r > 72057594037927936 ORDER BY a DESC
   12031   }
   12032 } {3}
   12033 do_test boundary2-4.39.gt.3 {
   12034   db eval {
   12035     SELECT a FROM t1 WHERE r > 72057594037927936 ORDER BY r
   12036   }
   12037 } {3}
   12038 do_test boundary2-4.39.gt.4 {
   12039   db eval {
   12040     SELECT a FROM t1 WHERE r > 72057594037927936 ORDER BY r DESC
   12041   }
   12042 } {3}
   12043 do_test boundary2-4.39.gt.5 {
   12044   db eval {
   12045     SELECT a FROM t1 WHERE r > 72057594037927936 ORDER BY x
   12046   }
   12047 } {3}
   12048 do_test boundary2-4.39.ge.1 {
   12049   db eval {
   12050     SELECT a FROM t1 WHERE r >= 72057594037927936 ORDER BY a
   12051   }
   12052 } {3 28}
   12053 do_test boundary2-4.39.ge.2 {
   12054   db eval {
   12055     SELECT a FROM t1 WHERE r >= 72057594037927936 ORDER BY a DESC
   12056   }
   12057 } {28 3}
   12058 do_test boundary2-4.39.ge.3 {
   12059   db eval {
   12060     SELECT a FROM t1 WHERE r >= 72057594037927936 ORDER BY r
   12061   }
   12062 } {28 3}
   12063 do_test boundary2-4.39.ge.4 {
   12064   db eval {
   12065     SELECT a FROM t1 WHERE r >= 72057594037927936 ORDER BY r DESC
   12066   }
   12067 } {3 28}
   12068 do_test boundary2-4.39.ge.5 {
   12069   db eval {
   12070     SELECT a FROM t1 WHERE r >= 72057594037927936 ORDER BY x
   12071   }
   12072 } {28 3}
   12073 do_test boundary2-4.39.lt.1 {
   12074   db eval {
   12075     SELECT a FROM t1 WHERE r < 72057594037927936 ORDER BY a
   12076   }
   12077 } {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}
   12078 do_test boundary2-4.39.lt.2 {
   12079   db eval {
   12080     SELECT a FROM t1 WHERE r < 72057594037927936 ORDER BY a DESC
   12081   }
   12082 } {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}
   12083 do_test boundary2-4.39.lt.3 {
   12084   db eval {
   12085     SELECT a FROM t1 WHERE r < 72057594037927936 ORDER BY r
   12086   }
   12087 } {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}
   12088 do_test boundary2-4.39.lt.4 {
   12089   db eval {
   12090     SELECT a FROM t1 WHERE r < 72057594037927936 ORDER BY r DESC
   12091   }
   12092 } {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}
   12093 do_test boundary2-4.39.lt.5 {
   12094   db eval {
   12095     SELECT a FROM t1 WHERE r < 72057594037927936 ORDER BY x
   12096   }
   12097 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 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}
   12098 do_test boundary2-4.39.le.1 {
   12099   db eval {
   12100     SELECT a FROM t1 WHERE r <= 72057594037927936 ORDER BY a
   12101   }
   12102 } {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}
   12103 do_test boundary2-4.39.le.2 {
   12104   db eval {
   12105     SELECT a FROM t1 WHERE r <= 72057594037927936 ORDER BY a DESC
   12106   }
   12107 } {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}
   12108 do_test boundary2-4.39.le.3 {
   12109   db eval {
   12110     SELECT a FROM t1 WHERE r <= 72057594037927936 ORDER BY r
   12111   }
   12112 } {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}
   12113 do_test boundary2-4.39.le.4 {
   12114   db eval {
   12115     SELECT a FROM t1 WHERE r <= 72057594037927936 ORDER BY r DESC
   12116   }
   12117 } {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}
   12118 do_test boundary2-4.39.le.5 {
   12119   db eval {
   12120     SELECT a FROM t1 WHERE r <= 72057594037927936 ORDER BY x
   12121   }
   12122 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 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}
   12123 do_test boundary2-4.40.1 {
   12124   db eval {
   12125     SELECT * FROM t1 WHERE r=2147483648
   12126   }
   12127 } {2147483648 51 0000000080000000}
   12128 do_test boundary2-4.40.2 {
   12129   db eval {
   12130     SELECT r, a FROM t1 WHERE x='0000000080000000'
   12131   }
   12132 } {2147483648 51}
   12133 do_test boundary2-4.40.3 {
   12134   db eval {
   12135     SELECT r, x FROM t1 WHERE a=51
   12136   }
   12137 } {2147483648 0000000080000000}
   12138 do_test boundary2-4.40.gt.1 {
   12139   db eval {
   12140     SELECT a FROM t1 WHERE r > 2147483648 ORDER BY a
   12141   }
   12142 } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
   12143 do_test boundary2-4.40.gt.2 {
   12144   db eval {
   12145     SELECT a FROM t1 WHERE r > 2147483648 ORDER BY a DESC
   12146   }
   12147 } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
   12148 do_test boundary2-4.40.gt.3 {
   12149   db eval {
   12150     SELECT a FROM t1 WHERE r > 2147483648 ORDER BY r
   12151   }
   12152 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   12153 do_test boundary2-4.40.gt.4 {
   12154   db eval {
   12155     SELECT a FROM t1 WHERE r > 2147483648 ORDER BY r DESC
   12156   }
   12157 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14}
   12158 do_test boundary2-4.40.gt.5 {
   12159   db eval {
   12160     SELECT a FROM t1 WHERE r > 2147483648 ORDER BY x
   12161   }
   12162 } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   12163 do_test boundary2-4.40.ge.1 {
   12164   db eval {
   12165     SELECT a FROM t1 WHERE r >= 2147483648 ORDER BY a
   12166   }
   12167 } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
   12168 do_test boundary2-4.40.ge.2 {
   12169   db eval {
   12170     SELECT a FROM t1 WHERE r >= 2147483648 ORDER BY a DESC
   12171   }
   12172 } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
   12173 do_test boundary2-4.40.ge.3 {
   12174   db eval {
   12175     SELECT a FROM t1 WHERE r >= 2147483648 ORDER BY r
   12176   }
   12177 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   12178 do_test boundary2-4.40.ge.4 {
   12179   db eval {
   12180     SELECT a FROM t1 WHERE r >= 2147483648 ORDER BY r DESC
   12181   }
   12182 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51}
   12183 do_test boundary2-4.40.ge.5 {
   12184   db eval {
   12185     SELECT a FROM t1 WHERE r >= 2147483648 ORDER BY x
   12186   }
   12187 } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   12188 do_test boundary2-4.40.lt.1 {
   12189   db eval {
   12190     SELECT a FROM t1 WHERE r < 2147483648 ORDER BY a
   12191   }
   12192 } {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}
   12193 do_test boundary2-4.40.lt.2 {
   12194   db eval {
   12195     SELECT a FROM t1 WHERE r < 2147483648 ORDER BY a DESC
   12196   }
   12197 } {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}
   12198 do_test boundary2-4.40.lt.3 {
   12199   db eval {
   12200     SELECT a FROM t1 WHERE r < 2147483648 ORDER BY r
   12201   }
   12202 } {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}
   12203 do_test boundary2-4.40.lt.4 {
   12204   db eval {
   12205     SELECT a FROM t1 WHERE r < 2147483648 ORDER BY r DESC
   12206   }
   12207 } {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}
   12208 do_test boundary2-4.40.lt.5 {
   12209   db eval {
   12210     SELECT a FROM t1 WHERE r < 2147483648 ORDER BY x
   12211   }
   12212 } {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}
   12213 do_test boundary2-4.40.le.1 {
   12214   db eval {
   12215     SELECT a FROM t1 WHERE r <= 2147483648 ORDER BY a
   12216   }
   12217 } {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}
   12218 do_test boundary2-4.40.le.2 {
   12219   db eval {
   12220     SELECT a FROM t1 WHERE r <= 2147483648 ORDER BY a DESC
   12221   }
   12222 } {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}
   12223 do_test boundary2-4.40.le.3 {
   12224   db eval {
   12225     SELECT a FROM t1 WHERE r <= 2147483648 ORDER BY r
   12226   }
   12227 } {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}
   12228 do_test boundary2-4.40.le.4 {
   12229   db eval {
   12230     SELECT a FROM t1 WHERE r <= 2147483648 ORDER BY r DESC
   12231   }
   12232 } {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}
   12233 do_test boundary2-4.40.le.5 {
   12234   db eval {
   12235     SELECT a FROM t1 WHERE r <= 2147483648 ORDER BY x
   12236   }
   12237 } {59 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}
   12238 do_test boundary2-4.41.1 {
   12239   db eval {
   12240     SELECT * FROM t1 WHERE r=549755813887
   12241   }
   12242 } {549755813887 46 0000007fffffffff}
   12243 do_test boundary2-4.41.2 {
   12244   db eval {
   12245     SELECT r, a FROM t1 WHERE x='0000007fffffffff'
   12246   }
   12247 } {549755813887 46}
   12248 do_test boundary2-4.41.3 {
   12249   db eval {
   12250     SELECT r, x FROM t1 WHERE a=46
   12251   }
   12252 } {549755813887 0000007fffffffff}
   12253 do_test boundary2-4.41.gt.1 {
   12254   db eval {
   12255     SELECT a FROM t1 WHERE r > 549755813887 ORDER BY a
   12256   }
   12257 } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 56 57}
   12258 do_test boundary2-4.41.gt.2 {
   12259   db eval {
   12260     SELECT a FROM t1 WHERE r > 549755813887 ORDER BY a DESC
   12261   }
   12262 } {57 56 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
   12263 do_test boundary2-4.41.gt.3 {
   12264   db eval {
   12265     SELECT a FROM t1 WHERE r > 549755813887 ORDER BY r
   12266   }
   12267 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   12268 do_test boundary2-4.41.gt.4 {
   12269   db eval {
   12270     SELECT a FROM t1 WHERE r > 549755813887 ORDER BY r DESC
   12271   }
   12272 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35}
   12273 do_test boundary2-4.41.gt.5 {
   12274   db eval {
   12275     SELECT a FROM t1 WHERE r > 549755813887 ORDER BY x
   12276   }
   12277 } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   12278 do_test boundary2-4.41.ge.1 {
   12279   db eval {
   12280     SELECT a FROM t1 WHERE r >= 549755813887 ORDER BY a
   12281   }
   12282 } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 46 56 57}
   12283 do_test boundary2-4.41.ge.2 {
   12284   db eval {
   12285     SELECT a FROM t1 WHERE r >= 549755813887 ORDER BY a DESC
   12286   }
   12287 } {57 56 46 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
   12288 do_test boundary2-4.41.ge.3 {
   12289   db eval {
   12290     SELECT a FROM t1 WHERE r >= 549755813887 ORDER BY r
   12291   }
   12292 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   12293 do_test boundary2-4.41.ge.4 {
   12294   db eval {
   12295     SELECT a FROM t1 WHERE r >= 549755813887 ORDER BY r DESC
   12296   }
   12297 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46}
   12298 do_test boundary2-4.41.ge.5 {
   12299   db eval {
   12300     SELECT a FROM t1 WHERE r >= 549755813887 ORDER BY x
   12301   }
   12302 } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   12303 do_test boundary2-4.41.lt.1 {
   12304   db eval {
   12305     SELECT a FROM t1 WHERE r < 549755813887 ORDER BY a
   12306   }
   12307 } {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}
   12308 do_test boundary2-4.41.lt.2 {
   12309   db eval {
   12310     SELECT a FROM t1 WHERE r < 549755813887 ORDER BY a DESC
   12311   }
   12312 } {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}
   12313 do_test boundary2-4.41.lt.3 {
   12314   db eval {
   12315     SELECT a FROM t1 WHERE r < 549755813887 ORDER BY r
   12316   }
   12317 } {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}
   12318 do_test boundary2-4.41.lt.4 {
   12319   db eval {
   12320     SELECT a FROM t1 WHERE r < 549755813887 ORDER BY r DESC
   12321   }
   12322 } {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}
   12323 do_test boundary2-4.41.lt.5 {
   12324   db eval {
   12325     SELECT a FROM t1 WHERE r < 549755813887 ORDER BY x
   12326   }
   12327 } {59 60 41 5 31 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}
   12328 do_test boundary2-4.41.le.1 {
   12329   db eval {
   12330     SELECT a FROM t1 WHERE r <= 549755813887 ORDER BY a
   12331   }
   12332 } {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}
   12333 do_test boundary2-4.41.le.2 {
   12334   db eval {
   12335     SELECT a FROM t1 WHERE r <= 549755813887 ORDER BY a DESC
   12336   }
   12337 } {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}
   12338 do_test boundary2-4.41.le.3 {
   12339   db eval {
   12340     SELECT a FROM t1 WHERE r <= 549755813887 ORDER BY r
   12341   }
   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}
   12343 do_test boundary2-4.41.le.4 {
   12344   db eval {
   12345     SELECT a FROM t1 WHERE r <= 549755813887 ORDER BY r DESC
   12346   }
   12347 } {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}
   12348 do_test boundary2-4.41.le.5 {
   12349   db eval {
   12350     SELECT a FROM t1 WHERE r <= 549755813887 ORDER BY x
   12351   }
   12352 } {59 60 41 5 31 4 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}
   12353 do_test boundary2-4.42.1 {
   12354   db eval {
   12355     SELECT * FROM t1 WHERE r=-549755813888
   12356   }
   12357 } {-549755813888 63 ffffff8000000000}
   12358 do_test boundary2-4.42.2 {
   12359   db eval {
   12360     SELECT r, a FROM t1 WHERE x='ffffff8000000000'
   12361   }
   12362 } {-549755813888 63}
   12363 do_test boundary2-4.42.3 {
   12364   db eval {
   12365     SELECT r, x FROM t1 WHERE a=63
   12366   }
   12367 } {-549755813888 ffffff8000000000}
   12368 do_test boundary2-4.42.gt.1 {
   12369   db eval {
   12370     SELECT a FROM t1 WHERE r > -549755813888 ORDER BY a
   12371   }
   12372 } {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}
   12373 do_test boundary2-4.42.gt.2 {
   12374   db eval {
   12375     SELECT a FROM t1 WHERE r > -549755813888 ORDER BY a DESC
   12376   }
   12377 } {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}
   12378 do_test boundary2-4.42.gt.3 {
   12379   db eval {
   12380     SELECT a FROM t1 WHERE r > -549755813888 ORDER BY r
   12381   }
   12382 } {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}
   12383 do_test boundary2-4.42.gt.4 {
   12384   db eval {
   12385     SELECT a FROM t1 WHERE r > -549755813888 ORDER BY r DESC
   12386   }
   12387 } {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}
   12388 do_test boundary2-4.42.gt.5 {
   12389   db eval {
   12390     SELECT a FROM t1 WHERE r > -549755813888 ORDER BY x
   12391   }
   12392 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   12393 do_test boundary2-4.42.ge.1 {
   12394   db eval {
   12395     SELECT a FROM t1 WHERE r >= -549755813888 ORDER BY a
   12396   }
   12397 } {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}
   12398 do_test boundary2-4.42.ge.2 {
   12399   db eval {
   12400     SELECT a FROM t1 WHERE r >= -549755813888 ORDER BY a DESC
   12401   }
   12402 } {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}
   12403 do_test boundary2-4.42.ge.3 {
   12404   db eval {
   12405     SELECT a FROM t1 WHERE r >= -549755813888 ORDER BY r
   12406   }
   12407 } {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}
   12408 do_test boundary2-4.42.ge.4 {
   12409   db eval {
   12410     SELECT a FROM t1 WHERE r >= -549755813888 ORDER BY r DESC
   12411   }
   12412 } {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}
   12413 do_test boundary2-4.42.ge.5 {
   12414   db eval {
   12415     SELECT a FROM t1 WHERE r >= -549755813888 ORDER BY x
   12416   }
   12417 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   12418 do_test boundary2-4.42.lt.1 {
   12419   db eval {
   12420     SELECT a FROM t1 WHERE r < -549755813888 ORDER BY a
   12421   }
   12422 } {2 21 44 55 58 64}
   12423 do_test boundary2-4.42.lt.2 {
   12424   db eval {
   12425     SELECT a FROM t1 WHERE r < -549755813888 ORDER BY a DESC
   12426   }
   12427 } {64 58 55 44 21 2}
   12428 do_test boundary2-4.42.lt.3 {
   12429   db eval {
   12430     SELECT a FROM t1 WHERE r < -549755813888 ORDER BY r
   12431   }
   12432 } {55 2 64 21 44 58}
   12433 do_test boundary2-4.42.lt.4 {
   12434   db eval {
   12435     SELECT a FROM t1 WHERE r < -549755813888 ORDER BY r DESC
   12436   }
   12437 } {58 44 21 64 2 55}
   12438 do_test boundary2-4.42.lt.5 {
   12439   db eval {
   12440     SELECT a FROM t1 WHERE r < -549755813888 ORDER BY x
   12441   }
   12442 } {55 2 64 21 44 58}
   12443 do_test boundary2-4.42.le.1 {
   12444   db eval {
   12445     SELECT a FROM t1 WHERE r <= -549755813888 ORDER BY a
   12446   }
   12447 } {2 21 44 55 58 63 64}
   12448 do_test boundary2-4.42.le.2 {
   12449   db eval {
   12450     SELECT a FROM t1 WHERE r <= -549755813888 ORDER BY a DESC
   12451   }
   12452 } {64 63 58 55 44 21 2}
   12453 do_test boundary2-4.42.le.3 {
   12454   db eval {
   12455     SELECT a FROM t1 WHERE r <= -549755813888 ORDER BY r
   12456   }
   12457 } {55 2 64 21 44 58 63}
   12458 do_test boundary2-4.42.le.4 {
   12459   db eval {
   12460     SELECT a FROM t1 WHERE r <= -549755813888 ORDER BY r DESC
   12461   }
   12462 } {63 58 44 21 64 2 55}
   12463 do_test boundary2-4.42.le.5 {
   12464   db eval {
   12465     SELECT a FROM t1 WHERE r <= -549755813888 ORDER BY x
   12466   }
   12467 } {55 2 64 21 44 58 63}
   12468 do_test boundary2-4.43.1 {
   12469   db eval {
   12470     SELECT * FROM t1 WHERE r=281474976710655
   12471   }
   12472 } {281474976710655 10 0000ffffffffffff}
   12473 do_test boundary2-4.43.2 {
   12474   db eval {
   12475     SELECT r, a FROM t1 WHERE x='0000ffffffffffff'
   12476   }
   12477 } {281474976710655 10}
   12478 do_test boundary2-4.43.3 {
   12479   db eval {
   12480     SELECT r, x FROM t1 WHERE a=10
   12481   }
   12482 } {281474976710655 0000ffffffffffff}
   12483 do_test boundary2-4.43.gt.1 {
   12484   db eval {
   12485     SELECT a FROM t1 WHERE r > 281474976710655 ORDER BY a
   12486   }
   12487 } {3 13 17 26 27 28 43 45}
   12488 do_test boundary2-4.43.gt.2 {
   12489   db eval {
   12490     SELECT a FROM t1 WHERE r > 281474976710655 ORDER BY a DESC
   12491   }
   12492 } {45 43 28 27 26 17 13 3}
   12493 do_test boundary2-4.43.gt.3 {
   12494   db eval {
   12495     SELECT a FROM t1 WHERE r > 281474976710655 ORDER BY r
   12496   }
   12497 } {26 13 43 27 45 17 28 3}
   12498 do_test boundary2-4.43.gt.4 {
   12499   db eval {
   12500     SELECT a FROM t1 WHERE r > 281474976710655 ORDER BY r DESC
   12501   }
   12502 } {3 28 17 45 27 43 13 26}
   12503 do_test boundary2-4.43.gt.5 {
   12504   db eval {
   12505     SELECT a FROM t1 WHERE r > 281474976710655 ORDER BY x
   12506   }
   12507 } {26 13 43 27 45 17 28 3}
   12508 do_test boundary2-4.43.ge.1 {
   12509   db eval {
   12510     SELECT a FROM t1 WHERE r >= 281474976710655 ORDER BY a
   12511   }
   12512 } {3 10 13 17 26 27 28 43 45}
   12513 do_test boundary2-4.43.ge.2 {
   12514   db eval {
   12515     SELECT a FROM t1 WHERE r >= 281474976710655 ORDER BY a DESC
   12516   }
   12517 } {45 43 28 27 26 17 13 10 3}
   12518 do_test boundary2-4.43.ge.3 {
   12519   db eval {
   12520     SELECT a FROM t1 WHERE r >= 281474976710655 ORDER BY r
   12521   }
   12522 } {10 26 13 43 27 45 17 28 3}
   12523 do_test boundary2-4.43.ge.4 {
   12524   db eval {
   12525     SELECT a FROM t1 WHERE r >= 281474976710655 ORDER BY r DESC
   12526   }
   12527 } {3 28 17 45 27 43 13 26 10}
   12528 do_test boundary2-4.43.ge.5 {
   12529   db eval {
   12530     SELECT a FROM t1 WHERE r >= 281474976710655 ORDER BY x
   12531   }
   12532 } {10 26 13 43 27 45 17 28 3}
   12533 do_test boundary2-4.43.lt.1 {
   12534   db eval {
   12535     SELECT a FROM t1 WHERE r < 281474976710655 ORDER BY a
   12536   }
   12537 } {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}
   12538 do_test boundary2-4.43.lt.2 {
   12539   db eval {
   12540     SELECT a FROM t1 WHERE r < 281474976710655 ORDER BY a DESC
   12541   }
   12542 } {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}
   12543 do_test boundary2-4.43.lt.3 {
   12544   db eval {
   12545     SELECT a FROM t1 WHERE r < 281474976710655 ORDER BY r
   12546   }
   12547 } {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}
   12548 do_test boundary2-4.43.lt.4 {
   12549   db eval {
   12550     SELECT a FROM t1 WHERE r < 281474976710655 ORDER BY r DESC
   12551   }
   12552 } {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}
   12553 do_test boundary2-4.43.lt.5 {
   12554   db eval {
   12555     SELECT a FROM t1 WHERE r < 281474976710655 ORDER BY x
   12556   }
   12557 } {59 60 41 5 31 4 49 30 61 8 16 23 50 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}
   12558 do_test boundary2-4.43.le.1 {
   12559   db eval {
   12560     SELECT a FROM t1 WHERE r <= 281474976710655 ORDER BY a
   12561   }
   12562 } {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}
   12563 do_test boundary2-4.43.le.2 {
   12564   db eval {
   12565     SELECT a FROM t1 WHERE r <= 281474976710655 ORDER BY a DESC
   12566   }
   12567 } {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}
   12568 do_test boundary2-4.43.le.3 {
   12569   db eval {
   12570     SELECT a FROM t1 WHERE r <= 281474976710655 ORDER BY r
   12571   }
   12572 } {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}
   12573 do_test boundary2-4.43.le.4 {
   12574   db eval {
   12575     SELECT a FROM t1 WHERE r <= 281474976710655 ORDER BY r DESC
   12576   }
   12577 } {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}
   12578 do_test boundary2-4.43.le.5 {
   12579   db eval {
   12580     SELECT a FROM t1 WHERE r <= 281474976710655 ORDER BY x
   12581   }
   12582 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 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}
   12583 do_test boundary2-4.44.1 {
   12584   db eval {
   12585     SELECT * FROM t1 WHERE r=4398046511103
   12586   }
   12587 } {4398046511103 7 000003ffffffffff}
   12588 do_test boundary2-4.44.2 {
   12589   db eval {
   12590     SELECT r, a FROM t1 WHERE x='000003ffffffffff'
   12591   }
   12592 } {4398046511103 7}
   12593 do_test boundary2-4.44.3 {
   12594   db eval {
   12595     SELECT r, x FROM t1 WHERE a=7
   12596   }
   12597 } {4398046511103 000003ffffffffff}
   12598 do_test boundary2-4.44.gt.1 {
   12599   db eval {
   12600     SELECT a FROM t1 WHERE r > 4398046511103 ORDER BY a
   12601   }
   12602 } {3 10 13 17 25 26 27 28 34 43 45 56}
   12603 do_test boundary2-4.44.gt.2 {
   12604   db eval {
   12605     SELECT a FROM t1 WHERE r > 4398046511103 ORDER BY a DESC
   12606   }
   12607 } {56 45 43 34 28 27 26 25 17 13 10 3}
   12608 do_test boundary2-4.44.gt.3 {
   12609   db eval {
   12610     SELECT a FROM t1 WHERE r > 4398046511103 ORDER BY r
   12611   }
   12612 } {56 25 34 10 26 13 43 27 45 17 28 3}
   12613 do_test boundary2-4.44.gt.4 {
   12614   db eval {
   12615     SELECT a FROM t1 WHERE r > 4398046511103 ORDER BY r DESC
   12616   }
   12617 } {3 28 17 45 27 43 13 26 10 34 25 56}
   12618 do_test boundary2-4.44.gt.5 {
   12619   db eval {
   12620     SELECT a FROM t1 WHERE r > 4398046511103 ORDER BY x
   12621   }
   12622 } {56 25 34 10 26 13 43 27 45 17 28 3}
   12623 do_test boundary2-4.44.ge.1 {
   12624   db eval {
   12625     SELECT a FROM t1 WHERE r >= 4398046511103 ORDER BY a
   12626   }
   12627 } {3 7 10 13 17 25 26 27 28 34 43 45 56}
   12628 do_test boundary2-4.44.ge.2 {
   12629   db eval {
   12630     SELECT a FROM t1 WHERE r >= 4398046511103 ORDER BY a DESC
   12631   }
   12632 } {56 45 43 34 28 27 26 25 17 13 10 7 3}
   12633 do_test boundary2-4.44.ge.3 {
   12634   db eval {
   12635     SELECT a FROM t1 WHERE r >= 4398046511103 ORDER BY r
   12636   }
   12637 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
   12638 do_test boundary2-4.44.ge.4 {
   12639   db eval {
   12640     SELECT a FROM t1 WHERE r >= 4398046511103 ORDER BY r DESC
   12641   }
   12642 } {3 28 17 45 27 43 13 26 10 34 25 56 7}
   12643 do_test boundary2-4.44.ge.5 {
   12644   db eval {
   12645     SELECT a FROM t1 WHERE r >= 4398046511103 ORDER BY x
   12646   }
   12647 } {7 56 25 34 10 26 13 43 27 45 17 28 3}
   12648 do_test boundary2-4.44.lt.1 {
   12649   db eval {
   12650     SELECT a FROM t1 WHERE r < 4398046511103 ORDER BY a
   12651   }
   12652 } {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}
   12653 do_test boundary2-4.44.lt.2 {
   12654   db eval {
   12655     SELECT a FROM t1 WHERE r < 4398046511103 ORDER BY a DESC
   12656   }
   12657 } {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}
   12658 do_test boundary2-4.44.lt.3 {
   12659   db eval {
   12660     SELECT a FROM t1 WHERE r < 4398046511103 ORDER BY r
   12661   }
   12662 } {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}
   12663 do_test boundary2-4.44.lt.4 {
   12664   db eval {
   12665     SELECT a FROM t1 WHERE r < 4398046511103 ORDER BY r DESC
   12666   }
   12667 } {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}
   12668 do_test boundary2-4.44.lt.5 {
   12669   db eval {
   12670     SELECT a FROM t1 WHERE r < 4398046511103 ORDER BY x
   12671   }
   12672 } {59 60 41 5 31 4 49 30 61 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}
   12673 do_test boundary2-4.44.le.1 {
   12674   db eval {
   12675     SELECT a FROM t1 WHERE r <= 4398046511103 ORDER BY a
   12676   }
   12677 } {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}
   12678 do_test boundary2-4.44.le.2 {
   12679   db eval {
   12680     SELECT a FROM t1 WHERE r <= 4398046511103 ORDER BY a DESC
   12681   }
   12682 } {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}
   12683 do_test boundary2-4.44.le.3 {
   12684   db eval {
   12685     SELECT a FROM t1 WHERE r <= 4398046511103 ORDER BY r
   12686   }
   12687 } {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}
   12688 do_test boundary2-4.44.le.4 {
   12689   db eval {
   12690     SELECT a FROM t1 WHERE r <= 4398046511103 ORDER BY r DESC
   12691   }
   12692 } {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}
   12693 do_test boundary2-4.44.le.5 {
   12694   db eval {
   12695     SELECT a FROM t1 WHERE r <= 4398046511103 ORDER BY x
   12696   }
   12697 } {59 60 41 5 31 4 49 30 61 8 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}
   12698 do_test boundary2-4.45.1 {
   12699   db eval {
   12700     SELECT * FROM t1 WHERE r=268435455
   12701   }
   12702 } {268435455 12 000000000fffffff}
   12703 do_test boundary2-4.45.2 {
   12704   db eval {
   12705     SELECT r, a FROM t1 WHERE x='000000000fffffff'
   12706   }
   12707 } {268435455 12}
   12708 do_test boundary2-4.45.3 {
   12709   db eval {
   12710     SELECT r, x FROM t1 WHERE a=12
   12711   }
   12712 } {268435455 000000000fffffff}
   12713 do_test boundary2-4.45.gt.1 {
   12714   db eval {
   12715     SELECT a FROM t1 WHERE r > 268435455 ORDER BY a
   12716   }
   12717 } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
   12718 do_test boundary2-4.45.gt.2 {
   12719   db eval {
   12720     SELECT a FROM t1 WHERE r > 268435455 ORDER BY a DESC
   12721   }
   12722 } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
   12723 do_test boundary2-4.45.gt.3 {
   12724   db eval {
   12725     SELECT a FROM t1 WHERE r > 268435455 ORDER BY r
   12726   }
   12727 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   12728 do_test boundary2-4.45.gt.4 {
   12729   db eval {
   12730     SELECT a FROM t1 WHERE r > 268435455 ORDER BY r DESC
   12731   }
   12732 } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40}
   12733 do_test boundary2-4.45.gt.5 {
   12734   db eval {
   12735     SELECT a FROM t1 WHERE r > 268435455 ORDER BY x
   12736   }
   12737 } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   12738 do_test boundary2-4.45.ge.1 {
   12739   db eval {
   12740     SELECT a FROM t1 WHERE r >= 268435455 ORDER BY a
   12741   }
   12742 } {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}
   12743 do_test boundary2-4.45.ge.2 {
   12744   db eval {
   12745     SELECT a FROM t1 WHERE r >= 268435455 ORDER BY a DESC
   12746   }
   12747 } {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}
   12748 do_test boundary2-4.45.ge.3 {
   12749   db eval {
   12750     SELECT a FROM t1 WHERE r >= 268435455 ORDER BY r
   12751   }
   12752 } {12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   12753 do_test boundary2-4.45.ge.4 {
   12754   db eval {
   12755     SELECT a FROM t1 WHERE r >= 268435455 ORDER BY r DESC
   12756   }
   12757 } {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}
   12758 do_test boundary2-4.45.ge.5 {
   12759   db eval {
   12760     SELECT a FROM t1 WHERE r >= 268435455 ORDER BY x
   12761   }
   12762 } {12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   12763 do_test boundary2-4.45.lt.1 {
   12764   db eval {
   12765     SELECT a FROM t1 WHERE r < 268435455 ORDER BY a
   12766   }
   12767 } {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}
   12768 do_test boundary2-4.45.lt.2 {
   12769   db eval {
   12770     SELECT a FROM t1 WHERE r < 268435455 ORDER BY a DESC
   12771   }
   12772 } {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}
   12773 do_test boundary2-4.45.lt.3 {
   12774   db eval {
   12775     SELECT a FROM t1 WHERE r < 268435455 ORDER BY r
   12776   }
   12777 } {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}
   12778 do_test boundary2-4.45.lt.4 {
   12779   db eval {
   12780     SELECT a FROM t1 WHERE r < 268435455 ORDER BY r DESC
   12781   }
   12782 } {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}
   12783 do_test boundary2-4.45.lt.5 {
   12784   db eval {
   12785     SELECT a FROM t1 WHERE r < 268435455 ORDER BY x
   12786   }
   12787 } {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}
   12788 do_test boundary2-4.45.le.1 {
   12789   db eval {
   12790     SELECT a FROM t1 WHERE r <= 268435455 ORDER BY a
   12791   }
   12792 } {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}
   12793 do_test boundary2-4.45.le.2 {
   12794   db eval {
   12795     SELECT a FROM t1 WHERE r <= 268435455 ORDER BY a DESC
   12796   }
   12797 } {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}
   12798 do_test boundary2-4.45.le.3 {
   12799   db eval {
   12800     SELECT a FROM t1 WHERE r <= 268435455 ORDER BY r
   12801   }
   12802 } {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}
   12803 do_test boundary2-4.45.le.4 {
   12804   db eval {
   12805     SELECT a FROM t1 WHERE r <= 268435455 ORDER BY r DESC
   12806   }
   12807 } {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}
   12808 do_test boundary2-4.45.le.5 {
   12809   db eval {
   12810     SELECT a FROM t1 WHERE r <= 268435455 ORDER BY x
   12811   }
   12812 } {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}
   12813 do_test boundary2-4.46.1 {
   12814   db eval {
   12815     SELECT * FROM t1 WHERE r=-9223372036854775808
   12816   }
   12817 } {-9223372036854775808 55 8000000000000000}
   12818 do_test boundary2-4.46.2 {
   12819   db eval {
   12820     SELECT r, a FROM t1 WHERE x='8000000000000000'
   12821   }
   12822 } {-9223372036854775808 55}
   12823 do_test boundary2-4.46.3 {
   12824   db eval {
   12825     SELECT r, x FROM t1 WHERE a=55
   12826   }
   12827 } {-9223372036854775808 8000000000000000}
   12828 do_test boundary2-4.46.gt.1 {
   12829   db eval {
   12830     SELECT a FROM t1 WHERE r > -9223372036854775808 ORDER BY a
   12831   }
   12832 } {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}
   12833 do_test boundary2-4.46.gt.2 {
   12834   db eval {
   12835     SELECT a FROM t1 WHERE r > -9223372036854775808 ORDER BY a DESC
   12836   }
   12837 } {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}
   12838 do_test boundary2-4.46.gt.3 {
   12839   db eval {
   12840     SELECT a FROM t1 WHERE r > -9223372036854775808 ORDER BY r
   12841   }
   12842 } {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}
   12843 do_test boundary2-4.46.gt.4 {
   12844   db eval {
   12845     SELECT a FROM t1 WHERE r > -9223372036854775808 ORDER BY r DESC
   12846   }
   12847 } {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}
   12848 do_test boundary2-4.46.gt.5 {
   12849   db eval {
   12850     SELECT a FROM t1 WHERE r > -9223372036854775808 ORDER BY x
   12851   }
   12852 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   12853 do_test boundary2-4.46.ge.1 {
   12854   db eval {
   12855     SELECT a FROM t1 WHERE r >= -9223372036854775808 ORDER BY a
   12856   }
   12857 } {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}
   12858 do_test boundary2-4.46.ge.2 {
   12859   db eval {
   12860     SELECT a FROM t1 WHERE r >= -9223372036854775808 ORDER BY a DESC
   12861   }
   12862 } {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}
   12863 do_test boundary2-4.46.ge.3 {
   12864   db eval {
   12865     SELECT a FROM t1 WHERE r >= -9223372036854775808 ORDER BY r
   12866   }
   12867 } {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}
   12868 do_test boundary2-4.46.ge.4 {
   12869   db eval {
   12870     SELECT a FROM t1 WHERE r >= -9223372036854775808 ORDER BY r DESC
   12871   }
   12872 } {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}
   12873 do_test boundary2-4.46.ge.5 {
   12874   db eval {
   12875     SELECT a FROM t1 WHERE r >= -9223372036854775808 ORDER BY x
   12876   }
   12877 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   12878 do_test boundary2-4.46.lt.1 {
   12879   db eval {
   12880     SELECT a FROM t1 WHERE r < -9223372036854775808 ORDER BY a
   12881   }
   12882 } {}
   12883 do_test boundary2-4.46.lt.2 {
   12884   db eval {
   12885     SELECT a FROM t1 WHERE r < -9223372036854775808 ORDER BY a DESC
   12886   }
   12887 } {}
   12888 do_test boundary2-4.46.lt.3 {
   12889   db eval {
   12890     SELECT a FROM t1 WHERE r < -9223372036854775808 ORDER BY r
   12891   }
   12892 } {}
   12893 do_test boundary2-4.46.lt.4 {
   12894   db eval {
   12895     SELECT a FROM t1 WHERE r < -9223372036854775808 ORDER BY r DESC
   12896   }
   12897 } {}
   12898 do_test boundary2-4.46.lt.5 {
   12899   db eval {
   12900     SELECT a FROM t1 WHERE r < -9223372036854775808 ORDER BY x
   12901   }
   12902 } {}
   12903 do_test boundary2-4.46.le.1 {
   12904   db eval {
   12905     SELECT a FROM t1 WHERE r <= -9223372036854775808 ORDER BY a
   12906   }
   12907 } {55}
   12908 do_test boundary2-4.46.le.2 {
   12909   db eval {
   12910     SELECT a FROM t1 WHERE r <= -9223372036854775808 ORDER BY a DESC
   12911   }
   12912 } {55}
   12913 do_test boundary2-4.46.le.3 {
   12914   db eval {
   12915     SELECT a FROM t1 WHERE r <= -9223372036854775808 ORDER BY r
   12916   }
   12917 } {55}
   12918 do_test boundary2-4.46.le.4 {
   12919   db eval {
   12920     SELECT a FROM t1 WHERE r <= -9223372036854775808 ORDER BY r DESC
   12921   }
   12922 } {55}
   12923 do_test boundary2-4.46.le.5 {
   12924   db eval {
   12925     SELECT a FROM t1 WHERE r <= -9223372036854775808 ORDER BY x
   12926   }
   12927 } {55}
   12928 do_test boundary2-4.47.1 {
   12929   db eval {
   12930     SELECT * FROM t1 WHERE r=562949953421312
   12931   }
   12932 } {562949953421312 43 0002000000000000}
   12933 do_test boundary2-4.47.2 {
   12934   db eval {
   12935     SELECT r, a FROM t1 WHERE x='0002000000000000'
   12936   }
   12937 } {562949953421312 43}
   12938 do_test boundary2-4.47.3 {
   12939   db eval {
   12940     SELECT r, x FROM t1 WHERE a=43
   12941   }
   12942 } {562949953421312 0002000000000000}
   12943 do_test boundary2-4.47.gt.1 {
   12944   db eval {
   12945     SELECT a FROM t1 WHERE r > 562949953421312 ORDER BY a
   12946   }
   12947 } {3 17 27 28 45}
   12948 do_test boundary2-4.47.gt.2 {
   12949   db eval {
   12950     SELECT a FROM t1 WHERE r > 562949953421312 ORDER BY a DESC
   12951   }
   12952 } {45 28 27 17 3}
   12953 do_test boundary2-4.47.gt.3 {
   12954   db eval {
   12955     SELECT a FROM t1 WHERE r > 562949953421312 ORDER BY r
   12956   }
   12957 } {27 45 17 28 3}
   12958 do_test boundary2-4.47.gt.4 {
   12959   db eval {
   12960     SELECT a FROM t1 WHERE r > 562949953421312 ORDER BY r DESC
   12961   }
   12962 } {3 28 17 45 27}
   12963 do_test boundary2-4.47.gt.5 {
   12964   db eval {
   12965     SELECT a FROM t1 WHERE r > 562949953421312 ORDER BY x
   12966   }
   12967 } {27 45 17 28 3}
   12968 do_test boundary2-4.47.ge.1 {
   12969   db eval {
   12970     SELECT a FROM t1 WHERE r >= 562949953421312 ORDER BY a
   12971   }
   12972 } {3 17 27 28 43 45}
   12973 do_test boundary2-4.47.ge.2 {
   12974   db eval {
   12975     SELECT a FROM t1 WHERE r >= 562949953421312 ORDER BY a DESC
   12976   }
   12977 } {45 43 28 27 17 3}
   12978 do_test boundary2-4.47.ge.3 {
   12979   db eval {
   12980     SELECT a FROM t1 WHERE r >= 562949953421312 ORDER BY r
   12981   }
   12982 } {43 27 45 17 28 3}
   12983 do_test boundary2-4.47.ge.4 {
   12984   db eval {
   12985     SELECT a FROM t1 WHERE r >= 562949953421312 ORDER BY r DESC
   12986   }
   12987 } {3 28 17 45 27 43}
   12988 do_test boundary2-4.47.ge.5 {
   12989   db eval {
   12990     SELECT a FROM t1 WHERE r >= 562949953421312 ORDER BY x
   12991   }
   12992 } {43 27 45 17 28 3}
   12993 do_test boundary2-4.47.lt.1 {
   12994   db eval {
   12995     SELECT a FROM t1 WHERE r < 562949953421312 ORDER BY a
   12996   }
   12997 } {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}
   12998 do_test boundary2-4.47.lt.2 {
   12999   db eval {
   13000     SELECT a FROM t1 WHERE r < 562949953421312 ORDER BY a DESC
   13001   }
   13002 } {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}
   13003 do_test boundary2-4.47.lt.3 {
   13004   db eval {
   13005     SELECT a FROM t1 WHERE r < 562949953421312 ORDER BY r
   13006   }
   13007 } {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}
   13008 do_test boundary2-4.47.lt.4 {
   13009   db eval {
   13010     SELECT a FROM t1 WHERE r < 562949953421312 ORDER BY r DESC
   13011   }
   13012 } {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}
   13013 do_test boundary2-4.47.lt.5 {
   13014   db eval {
   13015     SELECT a FROM t1 WHERE r < 562949953421312 ORDER BY x
   13016   }
   13017 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 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}
   13018 do_test boundary2-4.47.le.1 {
   13019   db eval {
   13020     SELECT a FROM t1 WHERE r <= 562949953421312 ORDER BY a
   13021   }
   13022 } {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}
   13023 do_test boundary2-4.47.le.2 {
   13024   db eval {
   13025     SELECT a FROM t1 WHERE r <= 562949953421312 ORDER BY a DESC
   13026   }
   13027 } {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}
   13028 do_test boundary2-4.47.le.3 {
   13029   db eval {
   13030     SELECT a FROM t1 WHERE r <= 562949953421312 ORDER BY r
   13031   }
   13032 } {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}
   13033 do_test boundary2-4.47.le.4 {
   13034   db eval {
   13035     SELECT a FROM t1 WHERE r <= 562949953421312 ORDER BY r DESC
   13036   }
   13037 } {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}
   13038 do_test boundary2-4.47.le.5 {
   13039   db eval {
   13040     SELECT a FROM t1 WHERE r <= 562949953421312 ORDER BY x
   13041   }
   13042 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 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}
   13043 do_test boundary2-4.48.1 {
   13044   db eval {
   13045     SELECT * FROM t1 WHERE r=-8388609
   13046   }
   13047 } {-8388609 1 ffffffffff7fffff}
   13048 do_test boundary2-4.48.2 {
   13049   db eval {
   13050     SELECT r, a FROM t1 WHERE x='ffffffffff7fffff'
   13051   }
   13052 } {-8388609 1}
   13053 do_test boundary2-4.48.3 {
   13054   db eval {
   13055     SELECT r, x FROM t1 WHERE a=1
   13056   }
   13057 } {-8388609 ffffffffff7fffff}
   13058 do_test boundary2-4.48.gt.1 {
   13059   db eval {
   13060     SELECT a FROM t1 WHERE r > -8388609 ORDER BY a
   13061   }
   13062 } {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}
   13063 do_test boundary2-4.48.gt.2 {
   13064   db eval {
   13065     SELECT a FROM t1 WHERE r > -8388609 ORDER BY a DESC
   13066   }
   13067 } {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}
   13068 do_test boundary2-4.48.gt.3 {
   13069   db eval {
   13070     SELECT a FROM t1 WHERE r > -8388609 ORDER BY r
   13071   }
   13072 } {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}
   13073 do_test boundary2-4.48.gt.4 {
   13074   db eval {
   13075     SELECT a FROM t1 WHERE r > -8388609 ORDER BY r DESC
   13076   }
   13077 } {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}
   13078 do_test boundary2-4.48.gt.5 {
   13079   db eval {
   13080     SELECT a FROM t1 WHERE r > -8388609 ORDER BY x
   13081   }
   13082 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   13083 do_test boundary2-4.48.ge.1 {
   13084   db eval {
   13085     SELECT a FROM t1 WHERE r >= -8388609 ORDER BY a
   13086   }
   13087 } {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}
   13088 do_test boundary2-4.48.ge.2 {
   13089   db eval {
   13090     SELECT a FROM t1 WHERE r >= -8388609 ORDER BY a DESC
   13091   }
   13092 } {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}
   13093 do_test boundary2-4.48.ge.3 {
   13094   db eval {
   13095     SELECT a FROM t1 WHERE r >= -8388609 ORDER BY r
   13096   }
   13097 } {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}
   13098 do_test boundary2-4.48.ge.4 {
   13099   db eval {
   13100     SELECT a FROM t1 WHERE r >= -8388609 ORDER BY r DESC
   13101   }
   13102 } {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}
   13103 do_test boundary2-4.48.ge.5 {
   13104   db eval {
   13105     SELECT a FROM t1 WHERE r >= -8388609 ORDER BY x
   13106   }
   13107 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   13108 do_test boundary2-4.48.lt.1 {
   13109   db eval {
   13110     SELECT a FROM t1 WHERE r < -8388609 ORDER BY a
   13111   }
   13112 } {2 11 21 44 47 55 58 63 64}
   13113 do_test boundary2-4.48.lt.2 {
   13114   db eval {
   13115     SELECT a FROM t1 WHERE r < -8388609 ORDER BY a DESC
   13116   }
   13117 } {64 63 58 55 47 44 21 11 2}
   13118 do_test boundary2-4.48.lt.3 {
   13119   db eval {
   13120     SELECT a FROM t1 WHERE r < -8388609 ORDER BY r
   13121   }
   13122 } {55 2 64 21 44 58 63 47 11}
   13123 do_test boundary2-4.48.lt.4 {
   13124   db eval {
   13125     SELECT a FROM t1 WHERE r < -8388609 ORDER BY r DESC
   13126   }
   13127 } {11 47 63 58 44 21 64 2 55}
   13128 do_test boundary2-4.48.lt.5 {
   13129   db eval {
   13130     SELECT a FROM t1 WHERE r < -8388609 ORDER BY x
   13131   }
   13132 } {55 2 64 21 44 58 63 47 11}
   13133 do_test boundary2-4.48.le.1 {
   13134   db eval {
   13135     SELECT a FROM t1 WHERE r <= -8388609 ORDER BY a
   13136   }
   13137 } {1 2 11 21 44 47 55 58 63 64}
   13138 do_test boundary2-4.48.le.2 {
   13139   db eval {
   13140     SELECT a FROM t1 WHERE r <= -8388609 ORDER BY a DESC
   13141   }
   13142 } {64 63 58 55 47 44 21 11 2 1}
   13143 do_test boundary2-4.48.le.3 {
   13144   db eval {
   13145     SELECT a FROM t1 WHERE r <= -8388609 ORDER BY r
   13146   }
   13147 } {55 2 64 21 44 58 63 47 11 1}
   13148 do_test boundary2-4.48.le.4 {
   13149   db eval {
   13150     SELECT a FROM t1 WHERE r <= -8388609 ORDER BY r DESC
   13151   }
   13152 } {1 11 47 63 58 44 21 64 2 55}
   13153 do_test boundary2-4.48.le.5 {
   13154   db eval {
   13155     SELECT a FROM t1 WHERE r <= -8388609 ORDER BY x
   13156   }
   13157 } {55 2 64 21 44 58 63 47 11 1}
   13158 do_test boundary2-4.49.1 {
   13159   db eval {
   13160     SELECT * FROM t1 WHERE r=16777215
   13161   }
   13162 } {16777215 9 0000000000ffffff}
   13163 do_test boundary2-4.49.2 {
   13164   db eval {
   13165     SELECT r, a FROM t1 WHERE x='0000000000ffffff'
   13166   }
   13167 } {16777215 9}
   13168 do_test boundary2-4.49.3 {
   13169   db eval {
   13170     SELECT r, x FROM t1 WHERE a=9
   13171   }
   13172 } {16777215 0000000000ffffff}
   13173 do_test boundary2-4.49.gt.1 {
   13174   db eval {
   13175     SELECT a FROM t1 WHERE r > 16777215 ORDER BY a
   13176   }
   13177 } {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}
   13178 do_test boundary2-4.49.gt.2 {
   13179   db eval {
   13180     SELECT a FROM t1 WHERE r > 16777215 ORDER BY a DESC
   13181   }
   13182 } {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}
   13183 do_test boundary2-4.49.gt.3 {
   13184   db eval {
   13185     SELECT a FROM t1 WHERE r > 16777215 ORDER BY r
   13186   }
   13187 } {6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   13188 do_test boundary2-4.49.gt.4 {
   13189   db eval {
   13190     SELECT a FROM t1 WHERE r > 16777215 ORDER BY r DESC
   13191   }
   13192 } {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}
   13193 do_test boundary2-4.49.gt.5 {
   13194   db eval {
   13195     SELECT a FROM t1 WHERE r > 16777215 ORDER BY x
   13196   }
   13197 } {6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   13198 do_test boundary2-4.49.ge.1 {
   13199   db eval {
   13200     SELECT a FROM t1 WHERE r >= 16777215 ORDER BY a
   13201   }
   13202 } {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}
   13203 do_test boundary2-4.49.ge.2 {
   13204   db eval {
   13205     SELECT a FROM t1 WHERE r >= 16777215 ORDER BY a DESC
   13206   }
   13207 } {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}
   13208 do_test boundary2-4.49.ge.3 {
   13209   db eval {
   13210     SELECT a FROM t1 WHERE r >= 16777215 ORDER BY r
   13211   }
   13212 } {9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   13213 do_test boundary2-4.49.ge.4 {
   13214   db eval {
   13215     SELECT a FROM t1 WHERE r >= 16777215 ORDER BY r DESC
   13216   }
   13217 } {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}
   13218 do_test boundary2-4.49.ge.5 {
   13219   db eval {
   13220     SELECT a FROM t1 WHERE r >= 16777215 ORDER BY x
   13221   }
   13222 } {9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   13223 do_test boundary2-4.49.lt.1 {
   13224   db eval {
   13225     SELECT a FROM t1 WHERE r < 16777215 ORDER BY a
   13226   }
   13227 } {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}
   13228 do_test boundary2-4.49.lt.2 {
   13229   db eval {
   13230     SELECT a FROM t1 WHERE r < 16777215 ORDER BY a DESC
   13231   }
   13232 } {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}
   13233 do_test boundary2-4.49.lt.3 {
   13234   db eval {
   13235     SELECT a FROM t1 WHERE r < 16777215 ORDER BY r
   13236   }
   13237 } {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}
   13238 do_test boundary2-4.49.lt.4 {
   13239   db eval {
   13240     SELECT a FROM t1 WHERE r < 16777215 ORDER BY r DESC
   13241   }
   13242 } {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}
   13243 do_test boundary2-4.49.lt.5 {
   13244   db eval {
   13245     SELECT a FROM t1 WHERE r < 16777215 ORDER BY x
   13246   }
   13247 } {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}
   13248 do_test boundary2-4.49.le.1 {
   13249   db eval {
   13250     SELECT a FROM t1 WHERE r <= 16777215 ORDER BY a
   13251   }
   13252 } {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}
   13253 do_test boundary2-4.49.le.2 {
   13254   db eval {
   13255     SELECT a FROM t1 WHERE r <= 16777215 ORDER BY a DESC
   13256   }
   13257 } {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}
   13258 do_test boundary2-4.49.le.3 {
   13259   db eval {
   13260     SELECT a FROM t1 WHERE r <= 16777215 ORDER BY r
   13261   }
   13262 } {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}
   13263 do_test boundary2-4.49.le.4 {
   13264   db eval {
   13265     SELECT a FROM t1 WHERE r <= 16777215 ORDER BY r DESC
   13266   }
   13267 } {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}
   13268 do_test boundary2-4.49.le.5 {
   13269   db eval {
   13270     SELECT a FROM t1 WHERE r <= 16777215 ORDER BY x
   13271   }
   13272 } {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}
   13273 do_test boundary2-4.50.1 {
   13274   db eval {
   13275     SELECT * FROM t1 WHERE r=8388608
   13276   }
   13277 } {8388608 24 0000000000800000}
   13278 do_test boundary2-4.50.2 {
   13279   db eval {
   13280     SELECT r, a FROM t1 WHERE x='0000000000800000'
   13281   }
   13282 } {8388608 24}
   13283 do_test boundary2-4.50.3 {
   13284   db eval {
   13285     SELECT r, x FROM t1 WHERE a=24
   13286   }
   13287 } {8388608 0000000000800000}
   13288 do_test boundary2-4.50.gt.1 {
   13289   db eval {
   13290     SELECT a FROM t1 WHERE r > 8388608 ORDER BY a
   13291   }
   13292 } {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}
   13293 do_test boundary2-4.50.gt.2 {
   13294   db eval {
   13295     SELECT a FROM t1 WHERE r > 8388608 ORDER BY a DESC
   13296   }
   13297 } {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}
   13298 do_test boundary2-4.50.gt.3 {
   13299   db eval {
   13300     SELECT a FROM t1 WHERE r > 8388608 ORDER BY r
   13301   }
   13302 } {9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   13303 do_test boundary2-4.50.gt.4 {
   13304   db eval {
   13305     SELECT a FROM t1 WHERE r > 8388608 ORDER BY r DESC
   13306   }
   13307 } {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}
   13308 do_test boundary2-4.50.gt.5 {
   13309   db eval {
   13310     SELECT a FROM t1 WHERE r > 8388608 ORDER BY x
   13311   }
   13312 } {9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   13313 do_test boundary2-4.50.ge.1 {
   13314   db eval {
   13315     SELECT a FROM t1 WHERE r >= 8388608 ORDER BY a
   13316   }
   13317 } {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}
   13318 do_test boundary2-4.50.ge.2 {
   13319   db eval {
   13320     SELECT a FROM t1 WHERE r >= 8388608 ORDER BY a DESC
   13321   }
   13322 } {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}
   13323 do_test boundary2-4.50.ge.3 {
   13324   db eval {
   13325     SELECT a FROM t1 WHERE r >= 8388608 ORDER BY r
   13326   }
   13327 } {24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   13328 do_test boundary2-4.50.ge.4 {
   13329   db eval {
   13330     SELECT a FROM t1 WHERE r >= 8388608 ORDER BY r DESC
   13331   }
   13332 } {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}
   13333 do_test boundary2-4.50.ge.5 {
   13334   db eval {
   13335     SELECT a FROM t1 WHERE r >= 8388608 ORDER BY x
   13336   }
   13337 } {24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   13338 do_test boundary2-4.50.lt.1 {
   13339   db eval {
   13340     SELECT a FROM t1 WHERE r < 8388608 ORDER BY a
   13341   }
   13342 } {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}
   13343 do_test boundary2-4.50.lt.2 {
   13344   db eval {
   13345     SELECT a FROM t1 WHERE r < 8388608 ORDER BY a DESC
   13346   }
   13347 } {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}
   13348 do_test boundary2-4.50.lt.3 {
   13349   db eval {
   13350     SELECT a FROM t1 WHERE r < 8388608 ORDER BY r
   13351   }
   13352 } {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}
   13353 do_test boundary2-4.50.lt.4 {
   13354   db eval {
   13355     SELECT a FROM t1 WHERE r < 8388608 ORDER BY r DESC
   13356   }
   13357 } {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}
   13358 do_test boundary2-4.50.lt.5 {
   13359   db eval {
   13360     SELECT a FROM t1 WHERE r < 8388608 ORDER BY x
   13361   }
   13362 } {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}
   13363 do_test boundary2-4.50.le.1 {
   13364   db eval {
   13365     SELECT a FROM t1 WHERE r <= 8388608 ORDER BY a
   13366   }
   13367 } {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}
   13368 do_test boundary2-4.50.le.2 {
   13369   db eval {
   13370     SELECT a FROM t1 WHERE r <= 8388608 ORDER BY a DESC
   13371   }
   13372 } {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}
   13373 do_test boundary2-4.50.le.3 {
   13374   db eval {
   13375     SELECT a FROM t1 WHERE r <= 8388608 ORDER BY r
   13376   }
   13377 } {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}
   13378 do_test boundary2-4.50.le.4 {
   13379   db eval {
   13380     SELECT a FROM t1 WHERE r <= 8388608 ORDER BY r DESC
   13381   }
   13382 } {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}
   13383 do_test boundary2-4.50.le.5 {
   13384   db eval {
   13385     SELECT a FROM t1 WHERE r <= 8388608 ORDER BY x
   13386   }
   13387 } {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}
   13388 do_test boundary2-4.51.1 {
   13389   db eval {
   13390     SELECT * FROM t1 WHERE r=16383
   13391   }
   13392 } {16383 8 0000000000003fff}
   13393 do_test boundary2-4.51.2 {
   13394   db eval {
   13395     SELECT r, a FROM t1 WHERE x='0000000000003fff'
   13396   }
   13397 } {16383 8}
   13398 do_test boundary2-4.51.3 {
   13399   db eval {
   13400     SELECT r, x FROM t1 WHERE a=8
   13401   }
   13402 } {16383 0000000000003fff}
   13403 do_test boundary2-4.51.gt.1 {
   13404   db eval {
   13405     SELECT a FROM t1 WHERE r > 16383 ORDER BY a
   13406   }
   13407 } {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}
   13408 do_test boundary2-4.51.gt.2 {
   13409   db eval {
   13410     SELECT a FROM t1 WHERE r > 16383 ORDER BY a DESC
   13411   }
   13412 } {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}
   13413 do_test boundary2-4.51.gt.3 {
   13414   db eval {
   13415     SELECT a FROM t1 WHERE r > 16383 ORDER BY r
   13416   }
   13417 } {16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   13418 do_test boundary2-4.51.gt.4 {
   13419   db eval {
   13420     SELECT a FROM t1 WHERE r > 16383 ORDER BY r DESC
   13421   }
   13422 } {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}
   13423 do_test boundary2-4.51.gt.5 {
   13424   db eval {
   13425     SELECT a FROM t1 WHERE r > 16383 ORDER BY x
   13426   }
   13427 } {16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   13428 do_test boundary2-4.51.ge.1 {
   13429   db eval {
   13430     SELECT a FROM t1 WHERE r >= 16383 ORDER BY a
   13431   }
   13432 } {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}
   13433 do_test boundary2-4.51.ge.2 {
   13434   db eval {
   13435     SELECT a FROM t1 WHERE r >= 16383 ORDER BY a DESC
   13436   }
   13437 } {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}
   13438 do_test boundary2-4.51.ge.3 {
   13439   db eval {
   13440     SELECT a FROM t1 WHERE r >= 16383 ORDER BY r
   13441   }
   13442 } {8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   13443 do_test boundary2-4.51.ge.4 {
   13444   db eval {
   13445     SELECT a FROM t1 WHERE r >= 16383 ORDER BY r DESC
   13446   }
   13447 } {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}
   13448 do_test boundary2-4.51.ge.5 {
   13449   db eval {
   13450     SELECT a FROM t1 WHERE r >= 16383 ORDER BY x
   13451   }
   13452 } {8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   13453 do_test boundary2-4.51.lt.1 {
   13454   db eval {
   13455     SELECT a FROM t1 WHERE r < 16383 ORDER BY a
   13456   }
   13457 } {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}
   13458 do_test boundary2-4.51.lt.2 {
   13459   db eval {
   13460     SELECT a FROM t1 WHERE r < 16383 ORDER BY a DESC
   13461   }
   13462 } {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}
   13463 do_test boundary2-4.51.lt.3 {
   13464   db eval {
   13465     SELECT a FROM t1 WHERE r < 16383 ORDER BY r
   13466   }
   13467 } {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}
   13468 do_test boundary2-4.51.lt.4 {
   13469   db eval {
   13470     SELECT a FROM t1 WHERE r < 16383 ORDER BY r DESC
   13471   }
   13472 } {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}
   13473 do_test boundary2-4.51.lt.5 {
   13474   db eval {
   13475     SELECT a FROM t1 WHERE r < 16383 ORDER BY x
   13476   }
   13477 } {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}
   13478 do_test boundary2-4.51.le.1 {
   13479   db eval {
   13480     SELECT a FROM t1 WHERE r <= 16383 ORDER BY a
   13481   }
   13482 } {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}
   13483 do_test boundary2-4.51.le.2 {
   13484   db eval {
   13485     SELECT a FROM t1 WHERE r <= 16383 ORDER BY a DESC
   13486   }
   13487 } {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}
   13488 do_test boundary2-4.51.le.3 {
   13489   db eval {
   13490     SELECT a FROM t1 WHERE r <= 16383 ORDER BY r
   13491   }
   13492 } {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}
   13493 do_test boundary2-4.51.le.4 {
   13494   db eval {
   13495     SELECT a FROM t1 WHERE r <= 16383 ORDER BY r DESC
   13496   }
   13497 } {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}
   13498 do_test boundary2-4.51.le.5 {
   13499   db eval {
   13500     SELECT a FROM t1 WHERE r <= 16383 ORDER BY x
   13501   }
   13502 } {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}
   13503 do_test boundary2-4.52.1 {
   13504   db eval {
   13505     SELECT * FROM t1 WHERE r=140737488355328
   13506   }
   13507 } {140737488355328 34 0000800000000000}
   13508 do_test boundary2-4.52.2 {
   13509   db eval {
   13510     SELECT r, a FROM t1 WHERE x='0000800000000000'
   13511   }
   13512 } {140737488355328 34}
   13513 do_test boundary2-4.52.3 {
   13514   db eval {
   13515     SELECT r, x FROM t1 WHERE a=34
   13516   }
   13517 } {140737488355328 0000800000000000}
   13518 do_test boundary2-4.52.gt.1 {
   13519   db eval {
   13520     SELECT a FROM t1 WHERE r > 140737488355328 ORDER BY a
   13521   }
   13522 } {3 10 13 17 26 27 28 43 45}
   13523 do_test boundary2-4.52.gt.2 {
   13524   db eval {
   13525     SELECT a FROM t1 WHERE r > 140737488355328 ORDER BY a DESC
   13526   }
   13527 } {45 43 28 27 26 17 13 10 3}
   13528 do_test boundary2-4.52.gt.3 {
   13529   db eval {
   13530     SELECT a FROM t1 WHERE r > 140737488355328 ORDER BY r
   13531   }
   13532 } {10 26 13 43 27 45 17 28 3}
   13533 do_test boundary2-4.52.gt.4 {
   13534   db eval {
   13535     SELECT a FROM t1 WHERE r > 140737488355328 ORDER BY r DESC
   13536   }
   13537 } {3 28 17 45 27 43 13 26 10}
   13538 do_test boundary2-4.52.gt.5 {
   13539   db eval {
   13540     SELECT a FROM t1 WHERE r > 140737488355328 ORDER BY x
   13541   }
   13542 } {10 26 13 43 27 45 17 28 3}
   13543 do_test boundary2-4.52.ge.1 {
   13544   db eval {
   13545     SELECT a FROM t1 WHERE r >= 140737488355328 ORDER BY a
   13546   }
   13547 } {3 10 13 17 26 27 28 34 43 45}
   13548 do_test boundary2-4.52.ge.2 {
   13549   db eval {
   13550     SELECT a FROM t1 WHERE r >= 140737488355328 ORDER BY a DESC
   13551   }
   13552 } {45 43 34 28 27 26 17 13 10 3}
   13553 do_test boundary2-4.52.ge.3 {
   13554   db eval {
   13555     SELECT a FROM t1 WHERE r >= 140737488355328 ORDER BY r
   13556   }
   13557 } {34 10 26 13 43 27 45 17 28 3}
   13558 do_test boundary2-4.52.ge.4 {
   13559   db eval {
   13560     SELECT a FROM t1 WHERE r >= 140737488355328 ORDER BY r DESC
   13561   }
   13562 } {3 28 17 45 27 43 13 26 10 34}
   13563 do_test boundary2-4.52.ge.5 {
   13564   db eval {
   13565     SELECT a FROM t1 WHERE r >= 140737488355328 ORDER BY x
   13566   }
   13567 } {34 10 26 13 43 27 45 17 28 3}
   13568 do_test boundary2-4.52.lt.1 {
   13569   db eval {
   13570     SELECT a FROM t1 WHERE r < 140737488355328 ORDER BY a
   13571   }
   13572 } {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}
   13573 do_test boundary2-4.52.lt.2 {
   13574   db eval {
   13575     SELECT a FROM t1 WHERE r < 140737488355328 ORDER BY a DESC
   13576   }
   13577 } {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}
   13578 do_test boundary2-4.52.lt.3 {
   13579   db eval {
   13580     SELECT a FROM t1 WHERE r < 140737488355328 ORDER BY r
   13581   }
   13582 } {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}
   13583 do_test boundary2-4.52.lt.4 {
   13584   db eval {
   13585     SELECT a FROM t1 WHERE r < 140737488355328 ORDER BY r DESC
   13586   }
   13587 } {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}
   13588 do_test boundary2-4.52.lt.5 {
   13589   db eval {
   13590     SELECT a FROM t1 WHERE r < 140737488355328 ORDER BY x
   13591   }
   13592 } {59 60 41 5 31 4 49 30 61 8 16 23 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}
   13593 do_test boundary2-4.52.le.1 {
   13594   db eval {
   13595     SELECT a FROM t1 WHERE r <= 140737488355328 ORDER BY a
   13596   }
   13597 } {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}
   13598 do_test boundary2-4.52.le.2 {
   13599   db eval {
   13600     SELECT a FROM t1 WHERE r <= 140737488355328 ORDER BY a DESC
   13601   }
   13602 } {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}
   13603 do_test boundary2-4.52.le.3 {
   13604   db eval {
   13605     SELECT a FROM t1 WHERE r <= 140737488355328 ORDER BY r
   13606   }
   13607 } {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}
   13608 do_test boundary2-4.52.le.4 {
   13609   db eval {
   13610     SELECT a FROM t1 WHERE r <= 140737488355328 ORDER BY r DESC
   13611   }
   13612 } {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}
   13613 do_test boundary2-4.52.le.5 {
   13614   db eval {
   13615     SELECT a FROM t1 WHERE r <= 140737488355328 ORDER BY x
   13616   }
   13617 } {59 60 41 5 31 4 49 30 61 8 16 23 50 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}
   13618 do_test boundary2-4.53.1 {
   13619   db eval {
   13620     SELECT * FROM t1 WHERE r=2097151
   13621   }
   13622 } {2097151 15 00000000001fffff}
   13623 do_test boundary2-4.53.2 {
   13624   db eval {
   13625     SELECT r, a FROM t1 WHERE x='00000000001fffff'
   13626   }
   13627 } {2097151 15}
   13628 do_test boundary2-4.53.3 {
   13629   db eval {
   13630     SELECT r, x FROM t1 WHERE a=15
   13631   }
   13632 } {2097151 00000000001fffff}
   13633 do_test boundary2-4.53.gt.1 {
   13634   db eval {
   13635     SELECT a FROM t1 WHERE r > 2097151 ORDER BY a
   13636   }
   13637 } {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}
   13638 do_test boundary2-4.53.gt.2 {
   13639   db eval {
   13640     SELECT a FROM t1 WHERE r > 2097151 ORDER BY a DESC
   13641   }
   13642 } {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}
   13643 do_test boundary2-4.53.gt.3 {
   13644   db eval {
   13645     SELECT a FROM t1 WHERE r > 2097151 ORDER BY r
   13646   }
   13647 } {42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   13648 do_test boundary2-4.53.gt.4 {
   13649   db eval {
   13650     SELECT a FROM t1 WHERE r > 2097151 ORDER BY r DESC
   13651   }
   13652 } {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}
   13653 do_test boundary2-4.53.gt.5 {
   13654   db eval {
   13655     SELECT a FROM t1 WHERE r > 2097151 ORDER BY x
   13656   }
   13657 } {42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   13658 do_test boundary2-4.53.ge.1 {
   13659   db eval {
   13660     SELECT a FROM t1 WHERE r >= 2097151 ORDER BY a
   13661   }
   13662 } {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}
   13663 do_test boundary2-4.53.ge.2 {
   13664   db eval {
   13665     SELECT a FROM t1 WHERE r >= 2097151 ORDER BY a DESC
   13666   }
   13667 } {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}
   13668 do_test boundary2-4.53.ge.3 {
   13669   db eval {
   13670     SELECT a FROM t1 WHERE r >= 2097151 ORDER BY r
   13671   }
   13672 } {15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   13673 do_test boundary2-4.53.ge.4 {
   13674   db eval {
   13675     SELECT a FROM t1 WHERE r >= 2097151 ORDER BY r DESC
   13676   }
   13677 } {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}
   13678 do_test boundary2-4.53.ge.5 {
   13679   db eval {
   13680     SELECT a FROM t1 WHERE r >= 2097151 ORDER BY x
   13681   }
   13682 } {15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   13683 do_test boundary2-4.53.lt.1 {
   13684   db eval {
   13685     SELECT a FROM t1 WHERE r < 2097151 ORDER BY a
   13686   }
   13687 } {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}
   13688 do_test boundary2-4.53.lt.2 {
   13689   db eval {
   13690     SELECT a FROM t1 WHERE r < 2097151 ORDER BY a DESC
   13691   }
   13692 } {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}
   13693 do_test boundary2-4.53.lt.3 {
   13694   db eval {
   13695     SELECT a FROM t1 WHERE r < 2097151 ORDER BY r
   13696   }
   13697 } {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}
   13698 do_test boundary2-4.53.lt.4 {
   13699   db eval {
   13700     SELECT a FROM t1 WHERE r < 2097151 ORDER BY r DESC
   13701   }
   13702 } {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}
   13703 do_test boundary2-4.53.lt.5 {
   13704   db eval {
   13705     SELECT a FROM t1 WHERE r < 2097151 ORDER BY x
   13706   }
   13707 } {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}
   13708 do_test boundary2-4.53.le.1 {
   13709   db eval {
   13710     SELECT a FROM t1 WHERE r <= 2097151 ORDER BY a
   13711   }
   13712 } {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}
   13713 do_test boundary2-4.53.le.2 {
   13714   db eval {
   13715     SELECT a FROM t1 WHERE r <= 2097151 ORDER BY a DESC
   13716   }
   13717 } {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}
   13718 do_test boundary2-4.53.le.3 {
   13719   db eval {
   13720     SELECT a FROM t1 WHERE r <= 2097151 ORDER BY r
   13721   }
   13722 } {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}
   13723 do_test boundary2-4.53.le.4 {
   13724   db eval {
   13725     SELECT a FROM t1 WHERE r <= 2097151 ORDER BY r DESC
   13726   }
   13727 } {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}
   13728 do_test boundary2-4.53.le.5 {
   13729   db eval {
   13730     SELECT a FROM t1 WHERE r <= 2097151 ORDER BY x
   13731   }
   13732 } {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}
   13733 do_test boundary2-4.54.1 {
   13734   db eval {
   13735     SELECT * FROM t1 WHERE r=140737488355327
   13736   }
   13737 } {140737488355327 25 00007fffffffffff}
   13738 do_test boundary2-4.54.2 {
   13739   db eval {
   13740     SELECT r, a FROM t1 WHERE x='00007fffffffffff'
   13741   }
   13742 } {140737488355327 25}
   13743 do_test boundary2-4.54.3 {
   13744   db eval {
   13745     SELECT r, x FROM t1 WHERE a=25
   13746   }
   13747 } {140737488355327 00007fffffffffff}
   13748 do_test boundary2-4.54.gt.1 {
   13749   db eval {
   13750     SELECT a FROM t1 WHERE r > 140737488355327 ORDER BY a
   13751   }
   13752 } {3 10 13 17 26 27 28 34 43 45}
   13753 do_test boundary2-4.54.gt.2 {
   13754   db eval {
   13755     SELECT a FROM t1 WHERE r > 140737488355327 ORDER BY a DESC
   13756   }
   13757 } {45 43 34 28 27 26 17 13 10 3}
   13758 do_test boundary2-4.54.gt.3 {
   13759   db eval {
   13760     SELECT a FROM t1 WHERE r > 140737488355327 ORDER BY r
   13761   }
   13762 } {34 10 26 13 43 27 45 17 28 3}
   13763 do_test boundary2-4.54.gt.4 {
   13764   db eval {
   13765     SELECT a FROM t1 WHERE r > 140737488355327 ORDER BY r DESC
   13766   }
   13767 } {3 28 17 45 27 43 13 26 10 34}
   13768 do_test boundary2-4.54.gt.5 {
   13769   db eval {
   13770     SELECT a FROM t1 WHERE r > 140737488355327 ORDER BY x
   13771   }
   13772 } {34 10 26 13 43 27 45 17 28 3}
   13773 do_test boundary2-4.54.ge.1 {
   13774   db eval {
   13775     SELECT a FROM t1 WHERE r >= 140737488355327 ORDER BY a
   13776   }
   13777 } {3 10 13 17 25 26 27 28 34 43 45}
   13778 do_test boundary2-4.54.ge.2 {
   13779   db eval {
   13780     SELECT a FROM t1 WHERE r >= 140737488355327 ORDER BY a DESC
   13781   }
   13782 } {45 43 34 28 27 26 25 17 13 10 3}
   13783 do_test boundary2-4.54.ge.3 {
   13784   db eval {
   13785     SELECT a FROM t1 WHERE r >= 140737488355327 ORDER BY r
   13786   }
   13787 } {25 34 10 26 13 43 27 45 17 28 3}
   13788 do_test boundary2-4.54.ge.4 {
   13789   db eval {
   13790     SELECT a FROM t1 WHERE r >= 140737488355327 ORDER BY r DESC
   13791   }
   13792 } {3 28 17 45 27 43 13 26 10 34 25}
   13793 do_test boundary2-4.54.ge.5 {
   13794   db eval {
   13795     SELECT a FROM t1 WHERE r >= 140737488355327 ORDER BY x
   13796   }
   13797 } {25 34 10 26 13 43 27 45 17 28 3}
   13798 do_test boundary2-4.54.lt.1 {
   13799   db eval {
   13800     SELECT a FROM t1 WHERE r < 140737488355327 ORDER BY a
   13801   }
   13802 } {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}
   13803 do_test boundary2-4.54.lt.2 {
   13804   db eval {
   13805     SELECT a FROM t1 WHERE r < 140737488355327 ORDER BY a DESC
   13806   }
   13807 } {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}
   13808 do_test boundary2-4.54.lt.3 {
   13809   db eval {
   13810     SELECT a FROM t1 WHERE r < 140737488355327 ORDER BY r
   13811   }
   13812 } {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}
   13813 do_test boundary2-4.54.lt.4 {
   13814   db eval {
   13815     SELECT a FROM t1 WHERE r < 140737488355327 ORDER BY r DESC
   13816   }
   13817 } {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}
   13818 do_test boundary2-4.54.lt.5 {
   13819   db eval {
   13820     SELECT a FROM t1 WHERE r < 140737488355327 ORDER BY x
   13821   }
   13822 } {59 60 41 5 31 4 49 30 61 8 16 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}
   13823 do_test boundary2-4.54.le.1 {
   13824   db eval {
   13825     SELECT a FROM t1 WHERE r <= 140737488355327 ORDER BY a
   13826   }
   13827 } {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}
   13828 do_test boundary2-4.54.le.2 {
   13829   db eval {
   13830     SELECT a FROM t1 WHERE r <= 140737488355327 ORDER BY a DESC
   13831   }
   13832 } {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}
   13833 do_test boundary2-4.54.le.3 {
   13834   db eval {
   13835     SELECT a FROM t1 WHERE r <= 140737488355327 ORDER BY r
   13836   }
   13837 } {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}
   13838 do_test boundary2-4.54.le.4 {
   13839   db eval {
   13840     SELECT a FROM t1 WHERE r <= 140737488355327 ORDER BY r DESC
   13841   }
   13842 } {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}
   13843 do_test boundary2-4.54.le.5 {
   13844   db eval {
   13845     SELECT a FROM t1 WHERE r <= 140737488355327 ORDER BY x
   13846   }
   13847 } {59 60 41 5 31 4 49 30 61 8 16 23 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}
   13848 do_test boundary2-4.55.1 {
   13849   db eval {
   13850     SELECT * FROM t1 WHERE r=281474976710656
   13851   }
   13852 } {281474976710656 26 0001000000000000}
   13853 do_test boundary2-4.55.2 {
   13854   db eval {
   13855     SELECT r, a FROM t1 WHERE x='0001000000000000'
   13856   }
   13857 } {281474976710656 26}
   13858 do_test boundary2-4.55.3 {
   13859   db eval {
   13860     SELECT r, x FROM t1 WHERE a=26
   13861   }
   13862 } {281474976710656 0001000000000000}
   13863 do_test boundary2-4.55.gt.1 {
   13864   db eval {
   13865     SELECT a FROM t1 WHERE r > 281474976710656 ORDER BY a
   13866   }
   13867 } {3 13 17 27 28 43 45}
   13868 do_test boundary2-4.55.gt.2 {
   13869   db eval {
   13870     SELECT a FROM t1 WHERE r > 281474976710656 ORDER BY a DESC
   13871   }
   13872 } {45 43 28 27 17 13 3}
   13873 do_test boundary2-4.55.gt.3 {
   13874   db eval {
   13875     SELECT a FROM t1 WHERE r > 281474976710656 ORDER BY r
   13876   }
   13877 } {13 43 27 45 17 28 3}
   13878 do_test boundary2-4.55.gt.4 {
   13879   db eval {
   13880     SELECT a FROM t1 WHERE r > 281474976710656 ORDER BY r DESC
   13881   }
   13882 } {3 28 17 45 27 43 13}
   13883 do_test boundary2-4.55.gt.5 {
   13884   db eval {
   13885     SELECT a FROM t1 WHERE r > 281474976710656 ORDER BY x
   13886   }
   13887 } {13 43 27 45 17 28 3}
   13888 do_test boundary2-4.55.ge.1 {
   13889   db eval {
   13890     SELECT a FROM t1 WHERE r >= 281474976710656 ORDER BY a
   13891   }
   13892 } {3 13 17 26 27 28 43 45}
   13893 do_test boundary2-4.55.ge.2 {
   13894   db eval {
   13895     SELECT a FROM t1 WHERE r >= 281474976710656 ORDER BY a DESC
   13896   }
   13897 } {45 43 28 27 26 17 13 3}
   13898 do_test boundary2-4.55.ge.3 {
   13899   db eval {
   13900     SELECT a FROM t1 WHERE r >= 281474976710656 ORDER BY r
   13901   }
   13902 } {26 13 43 27 45 17 28 3}
   13903 do_test boundary2-4.55.ge.4 {
   13904   db eval {
   13905     SELECT a FROM t1 WHERE r >= 281474976710656 ORDER BY r DESC
   13906   }
   13907 } {3 28 17 45 27 43 13 26}
   13908 do_test boundary2-4.55.ge.5 {
   13909   db eval {
   13910     SELECT a FROM t1 WHERE r >= 281474976710656 ORDER BY x
   13911   }
   13912 } {26 13 43 27 45 17 28 3}
   13913 do_test boundary2-4.55.lt.1 {
   13914   db eval {
   13915     SELECT a FROM t1 WHERE r < 281474976710656 ORDER BY a
   13916   }
   13917 } {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}
   13918 do_test boundary2-4.55.lt.2 {
   13919   db eval {
   13920     SELECT a FROM t1 WHERE r < 281474976710656 ORDER BY a DESC
   13921   }
   13922 } {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}
   13923 do_test boundary2-4.55.lt.3 {
   13924   db eval {
   13925     SELECT a FROM t1 WHERE r < 281474976710656 ORDER BY r
   13926   }
   13927 } {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}
   13928 do_test boundary2-4.55.lt.4 {
   13929   db eval {
   13930     SELECT a FROM t1 WHERE r < 281474976710656 ORDER BY r DESC
   13931   }
   13932 } {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}
   13933 do_test boundary2-4.55.lt.5 {
   13934   db eval {
   13935     SELECT a FROM t1 WHERE r < 281474976710656 ORDER BY x
   13936   }
   13937 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 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}
   13938 do_test boundary2-4.55.le.1 {
   13939   db eval {
   13940     SELECT a FROM t1 WHERE r <= 281474976710656 ORDER BY a
   13941   }
   13942 } {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}
   13943 do_test boundary2-4.55.le.2 {
   13944   db eval {
   13945     SELECT a FROM t1 WHERE r <= 281474976710656 ORDER BY a DESC
   13946   }
   13947 } {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}
   13948 do_test boundary2-4.55.le.3 {
   13949   db eval {
   13950     SELECT a FROM t1 WHERE r <= 281474976710656 ORDER BY r
   13951   }
   13952 } {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}
   13953 do_test boundary2-4.55.le.4 {
   13954   db eval {
   13955     SELECT a FROM t1 WHERE r <= 281474976710656 ORDER BY r DESC
   13956   }
   13957 } {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}
   13958 do_test boundary2-4.55.le.5 {
   13959   db eval {
   13960     SELECT a FROM t1 WHERE r <= 281474976710656 ORDER BY x
   13961   }
   13962 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 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}
   13963 do_test boundary2-4.56.1 {
   13964   db eval {
   13965     SELECT * FROM t1 WHERE r=32767
   13966   }
   13967 } {32767 23 0000000000007fff}
   13968 do_test boundary2-4.56.2 {
   13969   db eval {
   13970     SELECT r, a FROM t1 WHERE x='0000000000007fff'
   13971   }
   13972 } {32767 23}
   13973 do_test boundary2-4.56.3 {
   13974   db eval {
   13975     SELECT r, x FROM t1 WHERE a=23
   13976   }
   13977 } {32767 0000000000007fff}
   13978 do_test boundary2-4.56.gt.1 {
   13979   db eval {
   13980     SELECT a FROM t1 WHERE r > 32767 ORDER BY a
   13981   }
   13982 } {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}
   13983 do_test boundary2-4.56.gt.2 {
   13984   db eval {
   13985     SELECT a FROM t1 WHERE r > 32767 ORDER BY a DESC
   13986   }
   13987 } {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}
   13988 do_test boundary2-4.56.gt.3 {
   13989   db eval {
   13990     SELECT a FROM t1 WHERE r > 32767 ORDER BY r
   13991   }
   13992 } {50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   13993 do_test boundary2-4.56.gt.4 {
   13994   db eval {
   13995     SELECT a FROM t1 WHERE r > 32767 ORDER BY r DESC
   13996   }
   13997 } {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}
   13998 do_test boundary2-4.56.gt.5 {
   13999   db eval {
   14000     SELECT a FROM t1 WHERE r > 32767 ORDER BY x
   14001   }
   14002 } {50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   14003 do_test boundary2-4.56.ge.1 {
   14004   db eval {
   14005     SELECT a FROM t1 WHERE r >= 32767 ORDER BY a
   14006   }
   14007 } {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}
   14008 do_test boundary2-4.56.ge.2 {
   14009   db eval {
   14010     SELECT a FROM t1 WHERE r >= 32767 ORDER BY a DESC
   14011   }
   14012 } {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}
   14013 do_test boundary2-4.56.ge.3 {
   14014   db eval {
   14015     SELECT a FROM t1 WHERE r >= 32767 ORDER BY r
   14016   }
   14017 } {23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   14018 do_test boundary2-4.56.ge.4 {
   14019   db eval {
   14020     SELECT a FROM t1 WHERE r >= 32767 ORDER BY r DESC
   14021   }
   14022 } {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}
   14023 do_test boundary2-4.56.ge.5 {
   14024   db eval {
   14025     SELECT a FROM t1 WHERE r >= 32767 ORDER BY x
   14026   }
   14027 } {23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   14028 do_test boundary2-4.56.lt.1 {
   14029   db eval {
   14030     SELECT a FROM t1 WHERE r < 32767 ORDER BY a
   14031   }
   14032 } {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}
   14033 do_test boundary2-4.56.lt.2 {
   14034   db eval {
   14035     SELECT a FROM t1 WHERE r < 32767 ORDER BY a DESC
   14036   }
   14037 } {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}
   14038 do_test boundary2-4.56.lt.3 {
   14039   db eval {
   14040     SELECT a FROM t1 WHERE r < 32767 ORDER BY r
   14041   }
   14042 } {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}
   14043 do_test boundary2-4.56.lt.4 {
   14044   db eval {
   14045     SELECT a FROM t1 WHERE r < 32767 ORDER BY r DESC
   14046   }
   14047 } {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}
   14048 do_test boundary2-4.56.lt.5 {
   14049   db eval {
   14050     SELECT a FROM t1 WHERE r < 32767 ORDER BY x
   14051   }
   14052 } {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}
   14053 do_test boundary2-4.56.le.1 {
   14054   db eval {
   14055     SELECT a FROM t1 WHERE r <= 32767 ORDER BY a
   14056   }
   14057 } {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}
   14058 do_test boundary2-4.56.le.2 {
   14059   db eval {
   14060     SELECT a FROM t1 WHERE r <= 32767 ORDER BY a DESC
   14061   }
   14062 } {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}
   14063 do_test boundary2-4.56.le.3 {
   14064   db eval {
   14065     SELECT a FROM t1 WHERE r <= 32767 ORDER BY r
   14066   }
   14067 } {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}
   14068 do_test boundary2-4.56.le.4 {
   14069   db eval {
   14070     SELECT a FROM t1 WHERE r <= 32767 ORDER BY r DESC
   14071   }
   14072 } {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}
   14073 do_test boundary2-4.56.le.5 {
   14074   db eval {
   14075     SELECT a FROM t1 WHERE r <= 32767 ORDER BY x
   14076   }
   14077 } {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}
   14078 do_test boundary2-4.57.1 {
   14079   db eval {
   14080     SELECT * FROM t1 WHERE r=127
   14081   }
   14082 } {127 4 000000000000007f}
   14083 do_test boundary2-4.57.2 {
   14084   db eval {
   14085     SELECT r, a FROM t1 WHERE x='000000000000007f'
   14086   }
   14087 } {127 4}
   14088 do_test boundary2-4.57.3 {
   14089   db eval {
   14090     SELECT r, x FROM t1 WHERE a=4
   14091   }
   14092 } {127 000000000000007f}
   14093 do_test boundary2-4.57.gt.1 {
   14094   db eval {
   14095     SELECT a FROM t1 WHERE r > 127 ORDER BY a
   14096   }
   14097 } {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}
   14098 do_test boundary2-4.57.gt.2 {
   14099   db eval {
   14100     SELECT a FROM t1 WHERE r > 127 ORDER BY a DESC
   14101   }
   14102 } {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}
   14103 do_test boundary2-4.57.gt.3 {
   14104   db eval {
   14105     SELECT a FROM t1 WHERE r > 127 ORDER BY r
   14106   }
   14107 } {49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   14108 do_test boundary2-4.57.gt.4 {
   14109   db eval {
   14110     SELECT a FROM t1 WHERE r > 127 ORDER BY r DESC
   14111   }
   14112 } {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}
   14113 do_test boundary2-4.57.gt.5 {
   14114   db eval {
   14115     SELECT a FROM t1 WHERE r > 127 ORDER BY x
   14116   }
   14117 } {49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   14118 do_test boundary2-4.57.ge.1 {
   14119   db eval {
   14120     SELECT a FROM t1 WHERE r >= 127 ORDER BY a
   14121   }
   14122 } {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}
   14123 do_test boundary2-4.57.ge.2 {
   14124   db eval {
   14125     SELECT a FROM t1 WHERE r >= 127 ORDER BY a DESC
   14126   }
   14127 } {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}
   14128 do_test boundary2-4.57.ge.3 {
   14129   db eval {
   14130     SELECT a FROM t1 WHERE r >= 127 ORDER BY r
   14131   }
   14132 } {4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   14133 do_test boundary2-4.57.ge.4 {
   14134   db eval {
   14135     SELECT a FROM t1 WHERE r >= 127 ORDER BY r DESC
   14136   }
   14137 } {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}
   14138 do_test boundary2-4.57.ge.5 {
   14139   db eval {
   14140     SELECT a FROM t1 WHERE r >= 127 ORDER BY x
   14141   }
   14142 } {4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   14143 do_test boundary2-4.57.lt.1 {
   14144   db eval {
   14145     SELECT a FROM t1 WHERE r < 127 ORDER BY a
   14146   }
   14147 } {1 2 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
   14148 do_test boundary2-4.57.lt.2 {
   14149   db eval {
   14150     SELECT a FROM t1 WHERE r < 127 ORDER BY a DESC
   14151   }
   14152 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 2 1}
   14153 do_test boundary2-4.57.lt.3 {
   14154   db eval {
   14155     SELECT a FROM t1 WHERE r < 127 ORDER BY r
   14156   }
   14157 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31}
   14158 do_test boundary2-4.57.lt.4 {
   14159   db eval {
   14160     SELECT a FROM t1 WHERE r < 127 ORDER BY r DESC
   14161   }
   14162 } {31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   14163 do_test boundary2-4.57.lt.5 {
   14164   db eval {
   14165     SELECT a FROM t1 WHERE r < 127 ORDER BY x
   14166   }
   14167 } {59 60 41 5 31 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   14168 do_test boundary2-4.57.le.1 {
   14169   db eval {
   14170     SELECT a FROM t1 WHERE r <= 127 ORDER BY a
   14171   }
   14172 } {1 2 4 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
   14173 do_test boundary2-4.57.le.2 {
   14174   db eval {
   14175     SELECT a FROM t1 WHERE r <= 127 ORDER BY a DESC
   14176   }
   14177 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 4 2 1}
   14178 do_test boundary2-4.57.le.3 {
   14179   db eval {
   14180     SELECT a FROM t1 WHERE r <= 127 ORDER BY r
   14181   }
   14182 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4}
   14183 do_test boundary2-4.57.le.4 {
   14184   db eval {
   14185     SELECT a FROM t1 WHERE r <= 127 ORDER BY r DESC
   14186   }
   14187 } {4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   14188 do_test boundary2-4.57.le.5 {
   14189   db eval {
   14190     SELECT a FROM t1 WHERE r <= 127 ORDER BY x
   14191   }
   14192 } {59 60 41 5 31 4 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   14193 do_test boundary2-4.58.1 {
   14194   db eval {
   14195     SELECT * FROM t1 WHERE r=36028797018963967
   14196   }
   14197 } {36028797018963967 27 007fffffffffffff}
   14198 do_test boundary2-4.58.2 {
   14199   db eval {
   14200     SELECT r, a FROM t1 WHERE x='007fffffffffffff'
   14201   }
   14202 } {36028797018963967 27}
   14203 do_test boundary2-4.58.3 {
   14204   db eval {
   14205     SELECT r, x FROM t1 WHERE a=27
   14206   }
   14207 } {36028797018963967 007fffffffffffff}
   14208 do_test boundary2-4.58.gt.1 {
   14209   db eval {
   14210     SELECT a FROM t1 WHERE r > 36028797018963967 ORDER BY a
   14211   }
   14212 } {3 17 28 45}
   14213 do_test boundary2-4.58.gt.2 {
   14214   db eval {
   14215     SELECT a FROM t1 WHERE r > 36028797018963967 ORDER BY a DESC
   14216   }
   14217 } {45 28 17 3}
   14218 do_test boundary2-4.58.gt.3 {
   14219   db eval {
   14220     SELECT a FROM t1 WHERE r > 36028797018963967 ORDER BY r
   14221   }
   14222 } {45 17 28 3}
   14223 do_test boundary2-4.58.gt.4 {
   14224   db eval {
   14225     SELECT a FROM t1 WHERE r > 36028797018963967 ORDER BY r DESC
   14226   }
   14227 } {3 28 17 45}
   14228 do_test boundary2-4.58.gt.5 {
   14229   db eval {
   14230     SELECT a FROM t1 WHERE r > 36028797018963967 ORDER BY x
   14231   }
   14232 } {45 17 28 3}
   14233 do_test boundary2-4.58.ge.1 {
   14234   db eval {
   14235     SELECT a FROM t1 WHERE r >= 36028797018963967 ORDER BY a
   14236   }
   14237 } {3 17 27 28 45}
   14238 do_test boundary2-4.58.ge.2 {
   14239   db eval {
   14240     SELECT a FROM t1 WHERE r >= 36028797018963967 ORDER BY a DESC
   14241   }
   14242 } {45 28 27 17 3}
   14243 do_test boundary2-4.58.ge.3 {
   14244   db eval {
   14245     SELECT a FROM t1 WHERE r >= 36028797018963967 ORDER BY r
   14246   }
   14247 } {27 45 17 28 3}
   14248 do_test boundary2-4.58.ge.4 {
   14249   db eval {
   14250     SELECT a FROM t1 WHERE r >= 36028797018963967 ORDER BY r DESC
   14251   }
   14252 } {3 28 17 45 27}
   14253 do_test boundary2-4.58.ge.5 {
   14254   db eval {
   14255     SELECT a FROM t1 WHERE r >= 36028797018963967 ORDER BY x
   14256   }
   14257 } {27 45 17 28 3}
   14258 do_test boundary2-4.58.lt.1 {
   14259   db eval {
   14260     SELECT a FROM t1 WHERE r < 36028797018963967 ORDER BY a
   14261   }
   14262 } {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}
   14263 do_test boundary2-4.58.lt.2 {
   14264   db eval {
   14265     SELECT a FROM t1 WHERE r < 36028797018963967 ORDER BY a DESC
   14266   }
   14267 } {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}
   14268 do_test boundary2-4.58.lt.3 {
   14269   db eval {
   14270     SELECT a FROM t1 WHERE r < 36028797018963967 ORDER BY r
   14271   }
   14272 } {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}
   14273 do_test boundary2-4.58.lt.4 {
   14274   db eval {
   14275     SELECT a FROM t1 WHERE r < 36028797018963967 ORDER BY r DESC
   14276   }
   14277 } {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}
   14278 do_test boundary2-4.58.lt.5 {
   14279   db eval {
   14280     SELECT a FROM t1 WHERE r < 36028797018963967 ORDER BY x
   14281   }
   14282 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 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}
   14283 do_test boundary2-4.58.le.1 {
   14284   db eval {
   14285     SELECT a FROM t1 WHERE r <= 36028797018963967 ORDER BY a
   14286   }
   14287 } {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}
   14288 do_test boundary2-4.58.le.2 {
   14289   db eval {
   14290     SELECT a FROM t1 WHERE r <= 36028797018963967 ORDER BY a DESC
   14291   }
   14292 } {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}
   14293 do_test boundary2-4.58.le.3 {
   14294   db eval {
   14295     SELECT a FROM t1 WHERE r <= 36028797018963967 ORDER BY r
   14296   }
   14297 } {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}
   14298 do_test boundary2-4.58.le.4 {
   14299   db eval {
   14300     SELECT a FROM t1 WHERE r <= 36028797018963967 ORDER BY r DESC
   14301   }
   14302 } {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}
   14303 do_test boundary2-4.58.le.5 {
   14304   db eval {
   14305     SELECT a FROM t1 WHERE r <= 36028797018963967 ORDER BY x
   14306   }
   14307 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 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}
   14308 do_test boundary2-4.59.1 {
   14309   db eval {
   14310     SELECT * FROM t1 WHERE r=4398046511104
   14311   }
   14312 } {4398046511104 56 0000040000000000}
   14313 do_test boundary2-4.59.2 {
   14314   db eval {
   14315     SELECT r, a FROM t1 WHERE x='0000040000000000'
   14316   }
   14317 } {4398046511104 56}
   14318 do_test boundary2-4.59.3 {
   14319   db eval {
   14320     SELECT r, x FROM t1 WHERE a=56
   14321   }
   14322 } {4398046511104 0000040000000000}
   14323 do_test boundary2-4.59.gt.1 {
   14324   db eval {
   14325     SELECT a FROM t1 WHERE r > 4398046511104 ORDER BY a
   14326   }
   14327 } {3 10 13 17 25 26 27 28 34 43 45}
   14328 do_test boundary2-4.59.gt.2 {
   14329   db eval {
   14330     SELECT a FROM t1 WHERE r > 4398046511104 ORDER BY a DESC
   14331   }
   14332 } {45 43 34 28 27 26 25 17 13 10 3}
   14333 do_test boundary2-4.59.gt.3 {
   14334   db eval {
   14335     SELECT a FROM t1 WHERE r > 4398046511104 ORDER BY r
   14336   }
   14337 } {25 34 10 26 13 43 27 45 17 28 3}
   14338 do_test boundary2-4.59.gt.4 {
   14339   db eval {
   14340     SELECT a FROM t1 WHERE r > 4398046511104 ORDER BY r DESC
   14341   }
   14342 } {3 28 17 45 27 43 13 26 10 34 25}
   14343 do_test boundary2-4.59.gt.5 {
   14344   db eval {
   14345     SELECT a FROM t1 WHERE r > 4398046511104 ORDER BY x
   14346   }
   14347 } {25 34 10 26 13 43 27 45 17 28 3}
   14348 do_test boundary2-4.59.ge.1 {
   14349   db eval {
   14350     SELECT a FROM t1 WHERE r >= 4398046511104 ORDER BY a
   14351   }
   14352 } {3 10 13 17 25 26 27 28 34 43 45 56}
   14353 do_test boundary2-4.59.ge.2 {
   14354   db eval {
   14355     SELECT a FROM t1 WHERE r >= 4398046511104 ORDER BY a DESC
   14356   }
   14357 } {56 45 43 34 28 27 26 25 17 13 10 3}
   14358 do_test boundary2-4.59.ge.3 {
   14359   db eval {
   14360     SELECT a FROM t1 WHERE r >= 4398046511104 ORDER BY r
   14361   }
   14362 } {56 25 34 10 26 13 43 27 45 17 28 3}
   14363 do_test boundary2-4.59.ge.4 {
   14364   db eval {
   14365     SELECT a FROM t1 WHERE r >= 4398046511104 ORDER BY r DESC
   14366   }
   14367 } {3 28 17 45 27 43 13 26 10 34 25 56}
   14368 do_test boundary2-4.59.ge.5 {
   14369   db eval {
   14370     SELECT a FROM t1 WHERE r >= 4398046511104 ORDER BY x
   14371   }
   14372 } {56 25 34 10 26 13 43 27 45 17 28 3}
   14373 do_test boundary2-4.59.lt.1 {
   14374   db eval {
   14375     SELECT a FROM t1 WHERE r < 4398046511104 ORDER BY a
   14376   }
   14377 } {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}
   14378 do_test boundary2-4.59.lt.2 {
   14379   db eval {
   14380     SELECT a FROM t1 WHERE r < 4398046511104 ORDER BY a DESC
   14381   }
   14382 } {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}
   14383 do_test boundary2-4.59.lt.3 {
   14384   db eval {
   14385     SELECT a FROM t1 WHERE r < 4398046511104 ORDER BY r
   14386   }
   14387 } {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}
   14388 do_test boundary2-4.59.lt.4 {
   14389   db eval {
   14390     SELECT a FROM t1 WHERE r < 4398046511104 ORDER BY r DESC
   14391   }
   14392 } {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}
   14393 do_test boundary2-4.59.lt.5 {
   14394   db eval {
   14395     SELECT a FROM t1 WHERE r < 4398046511104 ORDER BY x
   14396   }
   14397 } {59 60 41 5 31 4 49 30 61 8 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}
   14398 do_test boundary2-4.59.le.1 {
   14399   db eval {
   14400     SELECT a FROM t1 WHERE r <= 4398046511104 ORDER BY a
   14401   }
   14402 } {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}
   14403 do_test boundary2-4.59.le.2 {
   14404   db eval {
   14405     SELECT a FROM t1 WHERE r <= 4398046511104 ORDER BY a DESC
   14406   }
   14407 } {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}
   14408 do_test boundary2-4.59.le.3 {
   14409   db eval {
   14410     SELECT a FROM t1 WHERE r <= 4398046511104 ORDER BY r
   14411   }
   14412 } {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}
   14413 do_test boundary2-4.59.le.4 {
   14414   db eval {
   14415     SELECT a FROM t1 WHERE r <= 4398046511104 ORDER BY r DESC
   14416   }
   14417 } {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}
   14418 do_test boundary2-4.59.le.5 {
   14419   db eval {
   14420     SELECT a FROM t1 WHERE r <= 4398046511104 ORDER BY x
   14421   }
   14422 } {59 60 41 5 31 4 49 30 61 8 16 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}
   14423 do_test boundary2-4.60.1 {
   14424   db eval {
   14425     SELECT * FROM t1 WHERE r=1
   14426   }
   14427 } {1 60 0000000000000001}
   14428 do_test boundary2-4.60.2 {
   14429   db eval {
   14430     SELECT r, a FROM t1 WHERE x='0000000000000001'
   14431   }
   14432 } {1 60}
   14433 do_test boundary2-4.60.3 {
   14434   db eval {
   14435     SELECT r, x FROM t1 WHERE a=60
   14436   }
   14437 } {1 0000000000000001}
   14438 do_test boundary2-4.60.gt.1 {
   14439   db eval {
   14440     SELECT a FROM t1 WHERE r > 1 ORDER BY a
   14441   }
   14442 } {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}
   14443 do_test boundary2-4.60.gt.2 {
   14444   db eval {
   14445     SELECT a FROM t1 WHERE r > 1 ORDER BY a DESC
   14446   }
   14447 } {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}
   14448 do_test boundary2-4.60.gt.3 {
   14449   db eval {
   14450     SELECT a FROM t1 WHERE r > 1 ORDER BY r
   14451   }
   14452 } {41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   14453 do_test boundary2-4.60.gt.4 {
   14454   db eval {
   14455     SELECT a FROM t1 WHERE r > 1 ORDER BY r DESC
   14456   }
   14457 } {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}
   14458 do_test boundary2-4.60.gt.5 {
   14459   db eval {
   14460     SELECT a FROM t1 WHERE r > 1 ORDER BY x
   14461   }
   14462 } {41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   14463 do_test boundary2-4.60.ge.1 {
   14464   db eval {
   14465     SELECT a FROM t1 WHERE r >= 1 ORDER BY a
   14466   }
   14467 } {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}
   14468 do_test boundary2-4.60.ge.2 {
   14469   db eval {
   14470     SELECT a FROM t1 WHERE r >= 1 ORDER BY a DESC
   14471   }
   14472 } {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}
   14473 do_test boundary2-4.60.ge.3 {
   14474   db eval {
   14475     SELECT a FROM t1 WHERE r >= 1 ORDER BY r
   14476   }
   14477 } {60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   14478 do_test boundary2-4.60.ge.4 {
   14479   db eval {
   14480     SELECT a FROM t1 WHERE r >= 1 ORDER BY r DESC
   14481   }
   14482 } {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}
   14483 do_test boundary2-4.60.ge.5 {
   14484   db eval {
   14485     SELECT a FROM t1 WHERE r >= 1 ORDER BY x
   14486   }
   14487 } {60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   14488 do_test boundary2-4.60.lt.1 {
   14489   db eval {
   14490     SELECT a FROM t1 WHERE r < 1 ORDER BY a
   14491   }
   14492 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 63 64}
   14493 do_test boundary2-4.60.lt.2 {
   14494   db eval {
   14495     SELECT a FROM t1 WHERE r < 1 ORDER BY a DESC
   14496   }
   14497 } {64 63 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
   14498 do_test boundary2-4.60.lt.3 {
   14499   db eval {
   14500     SELECT a FROM t1 WHERE r < 1 ORDER BY r
   14501   }
   14502 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59}
   14503 do_test boundary2-4.60.lt.4 {
   14504   db eval {
   14505     SELECT a FROM t1 WHERE r < 1 ORDER BY r DESC
   14506   }
   14507 } {59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   14508 do_test boundary2-4.60.lt.5 {
   14509   db eval {
   14510     SELECT a FROM t1 WHERE r < 1 ORDER BY x
   14511   }
   14512 } {59 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   14513 do_test boundary2-4.60.le.1 {
   14514   db eval {
   14515     SELECT a FROM t1 WHERE r <= 1 ORDER BY a
   14516   }
   14517 } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 60 63 64}
   14518 do_test boundary2-4.60.le.2 {
   14519   db eval {
   14520     SELECT a FROM t1 WHERE r <= 1 ORDER BY a DESC
   14521   }
   14522 } {64 63 60 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
   14523 do_test boundary2-4.60.le.3 {
   14524   db eval {
   14525     SELECT a FROM t1 WHERE r <= 1 ORDER BY r
   14526   }
   14527 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60}
   14528 do_test boundary2-4.60.le.4 {
   14529   db eval {
   14530     SELECT a FROM t1 WHERE r <= 1 ORDER BY r DESC
   14531   }
   14532 } {60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   14533 do_test boundary2-4.60.le.5 {
   14534   db eval {
   14535     SELECT a FROM t1 WHERE r <= 1 ORDER BY x
   14536   }
   14537 } {59 60 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   14538 do_test boundary2-4.61.1 {
   14539   db eval {
   14540     SELECT * FROM t1 WHERE r=36028797018963968
   14541   }
   14542 } {36028797018963968 45 0080000000000000}
   14543 do_test boundary2-4.61.2 {
   14544   db eval {
   14545     SELECT r, a FROM t1 WHERE x='0080000000000000'
   14546   }
   14547 } {36028797018963968 45}
   14548 do_test boundary2-4.61.3 {
   14549   db eval {
   14550     SELECT r, x FROM t1 WHERE a=45
   14551   }
   14552 } {36028797018963968 0080000000000000}
   14553 do_test boundary2-4.61.gt.1 {
   14554   db eval {
   14555     SELECT a FROM t1 WHERE r > 36028797018963968 ORDER BY a
   14556   }
   14557 } {3 17 28}
   14558 do_test boundary2-4.61.gt.2 {
   14559   db eval {
   14560     SELECT a FROM t1 WHERE r > 36028797018963968 ORDER BY a DESC
   14561   }
   14562 } {28 17 3}
   14563 do_test boundary2-4.61.gt.3 {
   14564   db eval {
   14565     SELECT a FROM t1 WHERE r > 36028797018963968 ORDER BY r
   14566   }
   14567 } {17 28 3}
   14568 do_test boundary2-4.61.gt.4 {
   14569   db eval {
   14570     SELECT a FROM t1 WHERE r > 36028797018963968 ORDER BY r DESC
   14571   }
   14572 } {3 28 17}
   14573 do_test boundary2-4.61.gt.5 {
   14574   db eval {
   14575     SELECT a FROM t1 WHERE r > 36028797018963968 ORDER BY x
   14576   }
   14577 } {17 28 3}
   14578 do_test boundary2-4.61.ge.1 {
   14579   db eval {
   14580     SELECT a FROM t1 WHERE r >= 36028797018963968 ORDER BY a
   14581   }
   14582 } {3 17 28 45}
   14583 do_test boundary2-4.61.ge.2 {
   14584   db eval {
   14585     SELECT a FROM t1 WHERE r >= 36028797018963968 ORDER BY a DESC
   14586   }
   14587 } {45 28 17 3}
   14588 do_test boundary2-4.61.ge.3 {
   14589   db eval {
   14590     SELECT a FROM t1 WHERE r >= 36028797018963968 ORDER BY r
   14591   }
   14592 } {45 17 28 3}
   14593 do_test boundary2-4.61.ge.4 {
   14594   db eval {
   14595     SELECT a FROM t1 WHERE r >= 36028797018963968 ORDER BY r DESC
   14596   }
   14597 } {3 28 17 45}
   14598 do_test boundary2-4.61.ge.5 {
   14599   db eval {
   14600     SELECT a FROM t1 WHERE r >= 36028797018963968 ORDER BY x
   14601   }
   14602 } {45 17 28 3}
   14603 do_test boundary2-4.61.lt.1 {
   14604   db eval {
   14605     SELECT a FROM t1 WHERE r < 36028797018963968 ORDER BY a
   14606   }
   14607 } {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}
   14608 do_test boundary2-4.61.lt.2 {
   14609   db eval {
   14610     SELECT a FROM t1 WHERE r < 36028797018963968 ORDER BY a DESC
   14611   }
   14612 } {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}
   14613 do_test boundary2-4.61.lt.3 {
   14614   db eval {
   14615     SELECT a FROM t1 WHERE r < 36028797018963968 ORDER BY r
   14616   }
   14617 } {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}
   14618 do_test boundary2-4.61.lt.4 {
   14619   db eval {
   14620     SELECT a FROM t1 WHERE r < 36028797018963968 ORDER BY r DESC
   14621   }
   14622 } {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}
   14623 do_test boundary2-4.61.lt.5 {
   14624   db eval {
   14625     SELECT a FROM t1 WHERE r < 36028797018963968 ORDER BY x
   14626   }
   14627 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 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}
   14628 do_test boundary2-4.61.le.1 {
   14629   db eval {
   14630     SELECT a FROM t1 WHERE r <= 36028797018963968 ORDER BY a
   14631   }
   14632 } {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}
   14633 do_test boundary2-4.61.le.2 {
   14634   db eval {
   14635     SELECT a FROM t1 WHERE r <= 36028797018963968 ORDER BY a DESC
   14636   }
   14637 } {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}
   14638 do_test boundary2-4.61.le.3 {
   14639   db eval {
   14640     SELECT a FROM t1 WHERE r <= 36028797018963968 ORDER BY r
   14641   }
   14642 } {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}
   14643 do_test boundary2-4.61.le.4 {
   14644   db eval {
   14645     SELECT a FROM t1 WHERE r <= 36028797018963968 ORDER BY r DESC
   14646   }
   14647 } {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}
   14648 do_test boundary2-4.61.le.5 {
   14649   db eval {
   14650     SELECT a FROM t1 WHERE r <= 36028797018963968 ORDER BY x
   14651   }
   14652 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 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}
   14653 do_test boundary2-4.62.1 {
   14654   db eval {
   14655     SELECT * FROM t1 WHERE r=-2147483649
   14656   }
   14657 } {-2147483649 47 ffffffff7fffffff}
   14658 do_test boundary2-4.62.2 {
   14659   db eval {
   14660     SELECT r, a FROM t1 WHERE x='ffffffff7fffffff'
   14661   }
   14662 } {-2147483649 47}
   14663 do_test boundary2-4.62.3 {
   14664   db eval {
   14665     SELECT r, x FROM t1 WHERE a=47
   14666   }
   14667 } {-2147483649 ffffffff7fffffff}
   14668 do_test boundary2-4.62.gt.1 {
   14669   db eval {
   14670     SELECT a FROM t1 WHERE r > -2147483649 ORDER BY a
   14671   }
   14672 } {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}
   14673 do_test boundary2-4.62.gt.2 {
   14674   db eval {
   14675     SELECT a FROM t1 WHERE r > -2147483649 ORDER BY a DESC
   14676   }
   14677 } {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}
   14678 do_test boundary2-4.62.gt.3 {
   14679   db eval {
   14680     SELECT a FROM t1 WHERE r > -2147483649 ORDER BY r
   14681   }
   14682 } {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}
   14683 do_test boundary2-4.62.gt.4 {
   14684   db eval {
   14685     SELECT a FROM t1 WHERE r > -2147483649 ORDER BY r DESC
   14686   }
   14687 } {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}
   14688 do_test boundary2-4.62.gt.5 {
   14689   db eval {
   14690     SELECT a FROM t1 WHERE r > -2147483649 ORDER BY x
   14691   }
   14692 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   14693 do_test boundary2-4.62.ge.1 {
   14694   db eval {
   14695     SELECT a FROM t1 WHERE r >= -2147483649 ORDER BY a
   14696   }
   14697 } {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}
   14698 do_test boundary2-4.62.ge.2 {
   14699   db eval {
   14700     SELECT a FROM t1 WHERE r >= -2147483649 ORDER BY a DESC
   14701   }
   14702 } {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}
   14703 do_test boundary2-4.62.ge.3 {
   14704   db eval {
   14705     SELECT a FROM t1 WHERE r >= -2147483649 ORDER BY r
   14706   }
   14707 } {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}
   14708 do_test boundary2-4.62.ge.4 {
   14709   db eval {
   14710     SELECT a FROM t1 WHERE r >= -2147483649 ORDER BY r DESC
   14711   }
   14712 } {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}
   14713 do_test boundary2-4.62.ge.5 {
   14714   db eval {
   14715     SELECT a FROM t1 WHERE r >= -2147483649 ORDER BY x
   14716   }
   14717 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   14718 do_test boundary2-4.62.lt.1 {
   14719   db eval {
   14720     SELECT a FROM t1 WHERE r < -2147483649 ORDER BY a
   14721   }
   14722 } {2 21 44 55 58 63 64}
   14723 do_test boundary2-4.62.lt.2 {
   14724   db eval {
   14725     SELECT a FROM t1 WHERE r < -2147483649 ORDER BY a DESC
   14726   }
   14727 } {64 63 58 55 44 21 2}
   14728 do_test boundary2-4.62.lt.3 {
   14729   db eval {
   14730     SELECT a FROM t1 WHERE r < -2147483649 ORDER BY r
   14731   }
   14732 } {55 2 64 21 44 58 63}
   14733 do_test boundary2-4.62.lt.4 {
   14734   db eval {
   14735     SELECT a FROM t1 WHERE r < -2147483649 ORDER BY r DESC
   14736   }
   14737 } {63 58 44 21 64 2 55}
   14738 do_test boundary2-4.62.lt.5 {
   14739   db eval {
   14740     SELECT a FROM t1 WHERE r < -2147483649 ORDER BY x
   14741   }
   14742 } {55 2 64 21 44 58 63}
   14743 do_test boundary2-4.62.le.1 {
   14744   db eval {
   14745     SELECT a FROM t1 WHERE r <= -2147483649 ORDER BY a
   14746   }
   14747 } {2 21 44 47 55 58 63 64}
   14748 do_test boundary2-4.62.le.2 {
   14749   db eval {
   14750     SELECT a FROM t1 WHERE r <= -2147483649 ORDER BY a DESC
   14751   }
   14752 } {64 63 58 55 47 44 21 2}
   14753 do_test boundary2-4.62.le.3 {
   14754   db eval {
   14755     SELECT a FROM t1 WHERE r <= -2147483649 ORDER BY r
   14756   }
   14757 } {55 2 64 21 44 58 63 47}
   14758 do_test boundary2-4.62.le.4 {
   14759   db eval {
   14760     SELECT a FROM t1 WHERE r <= -2147483649 ORDER BY r DESC
   14761   }
   14762 } {47 63 58 44 21 64 2 55}
   14763 do_test boundary2-4.62.le.5 {
   14764   db eval {
   14765     SELECT a FROM t1 WHERE r <= -2147483649 ORDER BY x
   14766   }
   14767 } {55 2 64 21 44 58 63 47}
   14768 do_test boundary2-4.63.1 {
   14769   db eval {
   14770     SELECT * FROM t1 WHERE r=-36028797018963969
   14771   }
   14772 } {-36028797018963969 2 ff7fffffffffffff}
   14773 do_test boundary2-4.63.2 {
   14774   db eval {
   14775     SELECT r, a FROM t1 WHERE x='ff7fffffffffffff'
   14776   }
   14777 } {-36028797018963969 2}
   14778 do_test boundary2-4.63.3 {
   14779   db eval {
   14780     SELECT r, x FROM t1 WHERE a=2
   14781   }
   14782 } {-36028797018963969 ff7fffffffffffff}
   14783 do_test boundary2-4.63.gt.1 {
   14784   db eval {
   14785     SELECT a FROM t1 WHERE r > -36028797018963969 ORDER BY a
   14786   }
   14787 } {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}
   14788 do_test boundary2-4.63.gt.2 {
   14789   db eval {
   14790     SELECT a FROM t1 WHERE r > -36028797018963969 ORDER BY a DESC
   14791   }
   14792 } {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}
   14793 do_test boundary2-4.63.gt.3 {
   14794   db eval {
   14795     SELECT a FROM t1 WHERE r > -36028797018963969 ORDER BY r
   14796   }
   14797 } {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}
   14798 do_test boundary2-4.63.gt.4 {
   14799   db eval {
   14800     SELECT a FROM t1 WHERE r > -36028797018963969 ORDER BY r DESC
   14801   }
   14802 } {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}
   14803 do_test boundary2-4.63.gt.5 {
   14804   db eval {
   14805     SELECT a FROM t1 WHERE r > -36028797018963969 ORDER BY x
   14806   }
   14807 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   14808 do_test boundary2-4.63.ge.1 {
   14809   db eval {
   14810     SELECT a FROM t1 WHERE r >= -36028797018963969 ORDER BY a
   14811   }
   14812 } {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}
   14813 do_test boundary2-4.63.ge.2 {
   14814   db eval {
   14815     SELECT a FROM t1 WHERE r >= -36028797018963969 ORDER BY a DESC
   14816   }
   14817 } {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}
   14818 do_test boundary2-4.63.ge.3 {
   14819   db eval {
   14820     SELECT a FROM t1 WHERE r >= -36028797018963969 ORDER BY r
   14821   }
   14822 } {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}
   14823 do_test boundary2-4.63.ge.4 {
   14824   db eval {
   14825     SELECT a FROM t1 WHERE r >= -36028797018963969 ORDER BY r DESC
   14826   }
   14827 } {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}
   14828 do_test boundary2-4.63.ge.5 {
   14829   db eval {
   14830     SELECT a FROM t1 WHERE r >= -36028797018963969 ORDER BY x
   14831   }
   14832 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   14833 do_test boundary2-4.63.lt.1 {
   14834   db eval {
   14835     SELECT a FROM t1 WHERE r < -36028797018963969 ORDER BY a
   14836   }
   14837 } {55}
   14838 do_test boundary2-4.63.lt.2 {
   14839   db eval {
   14840     SELECT a FROM t1 WHERE r < -36028797018963969 ORDER BY a DESC
   14841   }
   14842 } {55}
   14843 do_test boundary2-4.63.lt.3 {
   14844   db eval {
   14845     SELECT a FROM t1 WHERE r < -36028797018963969 ORDER BY r
   14846   }
   14847 } {55}
   14848 do_test boundary2-4.63.lt.4 {
   14849   db eval {
   14850     SELECT a FROM t1 WHERE r < -36028797018963969 ORDER BY r DESC
   14851   }
   14852 } {55}
   14853 do_test boundary2-4.63.lt.5 {
   14854   db eval {
   14855     SELECT a FROM t1 WHERE r < -36028797018963969 ORDER BY x
   14856   }
   14857 } {55}
   14858 do_test boundary2-4.63.le.1 {
   14859   db eval {
   14860     SELECT a FROM t1 WHERE r <= -36028797018963969 ORDER BY a
   14861   }
   14862 } {2 55}
   14863 do_test boundary2-4.63.le.2 {
   14864   db eval {
   14865     SELECT a FROM t1 WHERE r <= -36028797018963969 ORDER BY a DESC
   14866   }
   14867 } {55 2}
   14868 do_test boundary2-4.63.le.3 {
   14869   db eval {
   14870     SELECT a FROM t1 WHERE r <= -36028797018963969 ORDER BY r
   14871   }
   14872 } {55 2}
   14873 do_test boundary2-4.63.le.4 {
   14874   db eval {
   14875     SELECT a FROM t1 WHERE r <= -36028797018963969 ORDER BY r DESC
   14876   }
   14877 } {2 55}
   14878 do_test boundary2-4.63.le.5 {
   14879   db eval {
   14880     SELECT a FROM t1 WHERE r <= -36028797018963969 ORDER BY x
   14881   }
   14882 } {55 2}
   14883 do_test boundary2-4.64.1 {
   14884   db eval {
   14885     SELECT * FROM t1 WHERE r=3
   14886   }
   14887 } {3 5 0000000000000003}
   14888 do_test boundary2-4.64.2 {
   14889   db eval {
   14890     SELECT r, a FROM t1 WHERE x='0000000000000003'
   14891   }
   14892 } {3 5}
   14893 do_test boundary2-4.64.3 {
   14894   db eval {
   14895     SELECT r, x FROM t1 WHERE a=5
   14896   }
   14897 } {3 0000000000000003}
   14898 do_test boundary2-4.64.gt.1 {
   14899   db eval {
   14900     SELECT a FROM t1 WHERE r > 3 ORDER BY a
   14901   }
   14902 } {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}
   14903 do_test boundary2-4.64.gt.2 {
   14904   db eval {
   14905     SELECT a FROM t1 WHERE r > 3 ORDER BY a DESC
   14906   }
   14907 } {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}
   14908 do_test boundary2-4.64.gt.3 {
   14909   db eval {
   14910     SELECT a FROM t1 WHERE r > 3 ORDER BY r
   14911   }
   14912 } {31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   14913 do_test boundary2-4.64.gt.4 {
   14914   db eval {
   14915     SELECT a FROM t1 WHERE r > 3 ORDER BY r DESC
   14916   }
   14917 } {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}
   14918 do_test boundary2-4.64.gt.5 {
   14919   db eval {
   14920     SELECT a FROM t1 WHERE r > 3 ORDER BY x
   14921   }
   14922 } {31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   14923 do_test boundary2-4.64.ge.1 {
   14924   db eval {
   14925     SELECT a FROM t1 WHERE r >= 3 ORDER BY a
   14926   }
   14927 } {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}
   14928 do_test boundary2-4.64.ge.2 {
   14929   db eval {
   14930     SELECT a FROM t1 WHERE r >= 3 ORDER BY a DESC
   14931   }
   14932 } {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}
   14933 do_test boundary2-4.64.ge.3 {
   14934   db eval {
   14935     SELECT a FROM t1 WHERE r >= 3 ORDER BY r
   14936   }
   14937 } {5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   14938 do_test boundary2-4.64.ge.4 {
   14939   db eval {
   14940     SELECT a FROM t1 WHERE r >= 3 ORDER BY r DESC
   14941   }
   14942 } {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}
   14943 do_test boundary2-4.64.ge.5 {
   14944   db eval {
   14945     SELECT a FROM t1 WHERE r >= 3 ORDER BY x
   14946   }
   14947 } {5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
   14948 do_test boundary2-4.64.lt.1 {
   14949   db eval {
   14950     SELECT a FROM t1 WHERE r < 3 ORDER BY a
   14951   }
   14952 } {1 2 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
   14953 do_test boundary2-4.64.lt.2 {
   14954   db eval {
   14955     SELECT a FROM t1 WHERE r < 3 ORDER BY a DESC
   14956   }
   14957 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 2 1}
   14958 do_test boundary2-4.64.lt.3 {
   14959   db eval {
   14960     SELECT a FROM t1 WHERE r < 3 ORDER BY r
   14961   }
   14962 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41}
   14963 do_test boundary2-4.64.lt.4 {
   14964   db eval {
   14965     SELECT a FROM t1 WHERE r < 3 ORDER BY r DESC
   14966   }
   14967 } {41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   14968 do_test boundary2-4.64.lt.5 {
   14969   db eval {
   14970     SELECT a FROM t1 WHERE r < 3 ORDER BY x
   14971   }
   14972 } {59 60 41 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   14973 do_test boundary2-4.64.le.1 {
   14974   db eval {
   14975     SELECT a FROM t1 WHERE r <= 3 ORDER BY a
   14976   }
   14977 } {1 2 5 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
   14978 do_test boundary2-4.64.le.2 {
   14979   db eval {
   14980     SELECT a FROM t1 WHERE r <= 3 ORDER BY a DESC
   14981   }
   14982 } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 5 2 1}
   14983 do_test boundary2-4.64.le.3 {
   14984   db eval {
   14985     SELECT a FROM t1 WHERE r <= 3 ORDER BY r
   14986   }
   14987 } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5}
   14988 do_test boundary2-4.64.le.4 {
   14989   db eval {
   14990     SELECT a FROM t1 WHERE r <= 3 ORDER BY r DESC
   14991   }
   14992 } {5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
   14993 do_test boundary2-4.64.le.5 {
   14994   db eval {
   14995     SELECT a FROM t1 WHERE r <= 3 ORDER BY x
   14996   }
   14997 } {59 60 41 5 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
   14998 do_test boundary2-4.65.gt.1 {
   14999   db eval {
   15000     SELECT a FROM t1 WHERE r > 9.22337303685477580800e+18 ORDER BY a
   15001   }
   15002 } {}
   15003 do_test boundary2-4.65.gt.2 {
   15004   db eval {
   15005     SELECT a FROM t1 WHERE r > 9.22337303685477580800e+18 ORDER BY a DESC
   15006   }
   15007 } {}
   15008 do_test boundary2-4.65.gt.3 {
   15009   db eval {
   15010     SELECT a FROM t1 WHERE r > 9.22337303685477580800e+18 ORDER BY r
   15011   }
   15012 } {}
   15013 do_test boundary2-4.65.gt.4 {
   15014   db eval {
   15015     SELECT a FROM t1 WHERE r > 9.22337303685477580800e+18 ORDER BY r DESC
   15016   }
   15017 } {}
   15018 do_test boundary2-4.65.gt.5 {
   15019   db eval {
   15020     SELECT a FROM t1 WHERE r > 9.22337303685477580800e+18 ORDER BY x
   15021   }
   15022 } {}
   15023 do_test boundary2-4.65.ge.1 {
   15024   db eval {
   15025     SELECT a FROM t1 WHERE r >= 9.22337303685477580800e+18 ORDER BY a
   15026   }
   15027 } {}
   15028 do_test boundary2-4.65.ge.2 {
   15029   db eval {
   15030     SELECT a FROM t1 WHERE r >= 9.22337303685477580800e+18 ORDER BY a DESC
   15031   }
   15032 } {}
   15033 do_test boundary2-4.65.ge.3 {
   15034   db eval {
   15035     SELECT a FROM t1 WHERE r >= 9.22337303685477580800e+18 ORDER BY r
   15036   }
   15037 } {}
   15038 do_test boundary2-4.65.ge.4 {
   15039   db eval {
   15040     SELECT a FROM t1 WHERE r >= 9.22337303685477580800e+18 ORDER BY r DESC
   15041   }
   15042 } {}
   15043 do_test boundary2-4.65.ge.5 {
   15044   db eval {
   15045     SELECT a FROM t1 WHERE r >= 9.22337303685477580800e+18 ORDER BY x
   15046   }
   15047 } {}
   15048 do_test boundary2-4.65.lt.1 {
   15049   db eval {
   15050     SELECT a FROM t1 WHERE r < 9.22337303685477580800e+18 ORDER BY a
   15051   }
   15052 } {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}
   15053 do_test boundary2-4.65.lt.2 {
   15054   db eval {
   15055     SELECT a FROM t1 WHERE r < 9.22337303685477580800e+18 ORDER BY a DESC
   15056   }
   15057 } {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}
   15058 do_test boundary2-4.65.lt.3 {
   15059   db eval {
   15060     SELECT a FROM t1 WHERE r < 9.22337303685477580800e+18 ORDER BY r
   15061   }
   15062 } {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}
   15063 do_test boundary2-4.65.lt.4 {
   15064   db eval {
   15065     SELECT a FROM t1 WHERE r < 9.22337303685477580800e+18 ORDER BY r DESC
   15066   }
   15067 } {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}
   15068 do_test boundary2-4.65.lt.5 {
   15069   db eval {
   15070     SELECT a FROM t1 WHERE r < 9.22337303685477580800e+18 ORDER BY x
   15071   }
   15072 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   15073 do_test boundary2-4.65.le.1 {
   15074   db eval {
   15075     SELECT a FROM t1 WHERE r <= 9.22337303685477580800e+18 ORDER BY a
   15076   }
   15077 } {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}
   15078 do_test boundary2-4.65.le.2 {
   15079   db eval {
   15080     SELECT a FROM t1 WHERE r <= 9.22337303685477580800e+18 ORDER BY a DESC
   15081   }
   15082 } {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}
   15083 do_test boundary2-4.65.le.3 {
   15084   db eval {
   15085     SELECT a FROM t1 WHERE r <= 9.22337303685477580800e+18 ORDER BY r
   15086   }
   15087 } {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}
   15088 do_test boundary2-4.65.le.4 {
   15089   db eval {
   15090     SELECT a FROM t1 WHERE r <= 9.22337303685477580800e+18 ORDER BY r DESC
   15091   }
   15092 } {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}
   15093 do_test boundary2-4.65.le.5 {
   15094   db eval {
   15095     SELECT a FROM t1 WHERE r <= 9.22337303685477580800e+18 ORDER BY x
   15096   }
   15097 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   15098 do_test boundary2-4.66.gt.1 {
   15099   db eval {
   15100     SELECT a FROM t1 WHERE r > -9.22337303685477580800e+18 ORDER BY a
   15101   }
   15102 } {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}
   15103 do_test boundary2-4.66.gt.2 {
   15104   db eval {
   15105     SELECT a FROM t1 WHERE r > -9.22337303685477580800e+18 ORDER BY a DESC
   15106   }
   15107 } {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}
   15108 do_test boundary2-4.66.gt.3 {
   15109   db eval {
   15110     SELECT a FROM t1 WHERE r > -9.22337303685477580800e+18 ORDER BY r
   15111   }
   15112 } {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}
   15113 do_test boundary2-4.66.gt.4 {
   15114   db eval {
   15115     SELECT a FROM t1 WHERE r > -9.22337303685477580800e+18 ORDER BY r DESC
   15116   }
   15117 } {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}
   15118 do_test boundary2-4.66.gt.5 {
   15119   db eval {
   15120     SELECT a FROM t1 WHERE r > -9.22337303685477580800e+18 ORDER BY x
   15121   }
   15122 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   15123 do_test boundary2-4.66.ge.1 {
   15124   db eval {
   15125     SELECT a FROM t1 WHERE r >= -9.22337303685477580800e+18 ORDER BY a
   15126   }
   15127 } {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}
   15128 do_test boundary2-4.66.ge.2 {
   15129   db eval {
   15130     SELECT a FROM t1 WHERE r >= -9.22337303685477580800e+18 ORDER BY a DESC
   15131   }
   15132 } {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}
   15133 do_test boundary2-4.66.ge.3 {
   15134   db eval {
   15135     SELECT a FROM t1 WHERE r >= -9.22337303685477580800e+18 ORDER BY r
   15136   }
   15137 } {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}
   15138 do_test boundary2-4.66.ge.4 {
   15139   db eval {
   15140     SELECT a FROM t1 WHERE r >= -9.22337303685477580800e+18 ORDER BY r DESC
   15141   }
   15142 } {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}
   15143 do_test boundary2-4.66.ge.5 {
   15144   db eval {
   15145     SELECT a FROM t1 WHERE r >= -9.22337303685477580800e+18 ORDER BY x
   15146   }
   15147 } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 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}
   15148 do_test boundary2-4.66.lt.1 {
   15149   db eval {
   15150     SELECT a FROM t1 WHERE r < -9.22337303685477580800e+18 ORDER BY a
   15151   }
   15152 } {}
   15153 do_test boundary2-4.66.lt.2 {
   15154   db eval {
   15155     SELECT a FROM t1 WHERE r < -9.22337303685477580800e+18 ORDER BY a DESC
   15156   }
   15157 } {}
   15158 do_test boundary2-4.66.lt.3 {
   15159   db eval {
   15160     SELECT a FROM t1 WHERE r < -9.22337303685477580800e+18 ORDER BY r
   15161   }
   15162 } {}
   15163 do_test boundary2-4.66.lt.4 {
   15164   db eval {
   15165     SELECT a FROM t1 WHERE r < -9.22337303685477580800e+18 ORDER BY r DESC
   15166   }
   15167 } {}
   15168 do_test boundary2-4.66.lt.5 {
   15169   db eval {
   15170     SELECT a FROM t1 WHERE r < -9.22337303685477580800e+18 ORDER BY x
   15171   }
   15172 } {}
   15173 do_test boundary2-4.66.le.1 {
   15174   db eval {
   15175     SELECT a FROM t1 WHERE r <= -9.22337303685477580800e+18 ORDER BY a
   15176   }
   15177 } {}
   15178 do_test boundary2-4.66.le.2 {
   15179   db eval {
   15180     SELECT a FROM t1 WHERE r <= -9.22337303685477580800e+18 ORDER BY a DESC
   15181   }
   15182 } {}
   15183 do_test boundary2-4.66.le.3 {
   15184   db eval {
   15185     SELECT a FROM t1 WHERE r <= -9.22337303685477580800e+18 ORDER BY r
   15186   }
   15187 } {}
   15188 do_test boundary2-4.66.le.4 {
   15189   db eval {
   15190     SELECT a FROM t1 WHERE r <= -9.22337303685477580800e+18 ORDER BY r DESC
   15191   }
   15192 } {}
   15193 do_test boundary2-4.66.le.5 {
   15194   db eval {
   15195     SELECT a FROM t1 WHERE r <= -9.22337303685477580800e+18 ORDER BY x
   15196   }
   15197 } {}
   15198 finish_test
   15199