File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / sqlite3 / test / boundary1.test
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 17:04:16 2012 UTC (12 years, 10 months ago) by misho
Branches: sqlite3, MAIN
CVS tags: v3_7_10, HEAD
sqlite3

    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: boundary1.test,v 1.1.1.1 2012/02/21 17:04:16 misho 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 boundary1-1.1 {
   25:   db eval {
   26:     CREATE TABLE t1(a,x);
   27:     INSERT INTO t1(oid,a,x) VALUES(-8388609,1,'ffffffffff7fffff');
   28:     INSERT INTO t1(oid,a,x) VALUES(-36028797018963969,2,'ff7fffffffffffff');
   29:     INSERT INTO t1(oid,a,x) VALUES(9223372036854775807,3,'7fffffffffffffff');
   30:     INSERT INTO t1(oid,a,x) VALUES(127,4,'000000000000007f');
   31:     INSERT INTO t1(oid,a,x) VALUES(3,5,'0000000000000003');
   32:     INSERT INTO t1(oid,a,x) VALUES(16777216,6,'0000000001000000');
   33:     INSERT INTO t1(oid,a,x) VALUES(4398046511103,7,'000003ffffffffff');
   34:     INSERT INTO t1(oid,a,x) VALUES(16383,8,'0000000000003fff');
   35:     INSERT INTO t1(oid,a,x) VALUES(16777215,9,'0000000000ffffff');
   36:     INSERT INTO t1(oid,a,x) VALUES(281474976710655,10,'0000ffffffffffff');
   37:     INSERT INTO t1(oid,a,x) VALUES(-2147483648,11,'ffffffff80000000');
   38:     INSERT INTO t1(oid,a,x) VALUES(268435455,12,'000000000fffffff');
   39:     INSERT INTO t1(oid,a,x) VALUES(562949953421311,13,'0001ffffffffffff');
   40:     INSERT INTO t1(oid,a,x) VALUES(4294967295,14,'00000000ffffffff');
   41:     INSERT INTO t1(oid,a,x) VALUES(2097151,15,'00000000001fffff');
   42:     INSERT INTO t1(oid,a,x) VALUES(16384,16,'0000000000004000');
   43:     INSERT INTO t1(oid,a,x) VALUES(72057594037927935,17,'00ffffffffffffff');
   44:     INSERT INTO t1(oid,a,x) VALUES(8388607,18,'00000000007fffff');
   45:     INSERT INTO t1(oid,a,x) VALUES(1099511627776,19,'0000010000000000');
   46:     INSERT INTO t1(oid,a,x) VALUES(2147483647,20,'000000007fffffff');
   47:     INSERT INTO t1(oid,a,x) VALUES(-140737488355329,21,'ffff7fffffffffff');
   48:     INSERT INTO t1(oid,a,x) VALUES(34359738368,22,'0000000800000000');
   49:     INSERT INTO t1(oid,a,x) VALUES(32767,23,'0000000000007fff');
   50:     INSERT INTO t1(oid,a,x) VALUES(8388608,24,'0000000000800000');
   51:     INSERT INTO t1(oid,a,x) VALUES(140737488355327,25,'00007fffffffffff');
   52:     INSERT INTO t1(oid,a,x) VALUES(281474976710656,26,'0001000000000000');
   53:     INSERT INTO t1(oid,a,x) VALUES(36028797018963967,27,'007fffffffffffff');
   54:     INSERT INTO t1(oid,a,x) VALUES(72057594037927936,28,'0100000000000000');
   55:     INSERT INTO t1(oid,a,x) VALUES(-32769,29,'ffffffffffff7fff');
   56:     INSERT INTO t1(oid,a,x) VALUES(255,30,'00000000000000ff');
   57:     INSERT INTO t1(oid,a,x) VALUES(4,31,'0000000000000004');
   58:     INSERT INTO t1(oid,a,x) VALUES(-32768,32,'ffffffffffff8000');
   59:     INSERT INTO t1(oid,a,x) VALUES(-2,33,'fffffffffffffffe');
   60:     INSERT INTO t1(oid,a,x) VALUES(140737488355328,34,'0000800000000000');
   61:     INSERT INTO t1(oid,a,x) VALUES(549755813888,35,'0000008000000000');
   62:     INSERT INTO t1(oid,a,x) VALUES(4294967296,36,'0000000100000000');
   63:     INSERT INTO t1(oid,a,x) VALUES(-8388608,37,'ffffffffff800000');
   64:     INSERT INTO t1(oid,a,x) VALUES(-1,38,'ffffffffffffffff');
   65:     INSERT INTO t1(oid,a,x) VALUES(34359738367,39,'00000007ffffffff');
   66:     INSERT INTO t1(oid,a,x) VALUES(268435456,40,'0000000010000000');
   67:     INSERT INTO t1(oid,a,x) VALUES(2,41,'0000000000000002');
   68:     INSERT INTO t1(oid,a,x) VALUES(2097152,42,'0000000000200000');
   69:     INSERT INTO t1(oid,a,x) VALUES(562949953421312,43,'0002000000000000');
   70:     INSERT INTO t1(oid,a,x) VALUES(-140737488355328,44,'ffff800000000000');
   71:     INSERT INTO t1(oid,a,x) VALUES(36028797018963968,45,'0080000000000000');
   72:     INSERT INTO t1(oid,a,x) VALUES(549755813887,46,'0000007fffffffff');
   73:     INSERT INTO t1(oid,a,x) VALUES(-2147483649,47,'ffffffff7fffffff');
   74:     INSERT INTO t1(oid,a,x) VALUES(65535,48,'000000000000ffff');
   75:     INSERT INTO t1(oid,a,x) VALUES(128,49,'0000000000000080');
   76:     INSERT INTO t1(oid,a,x) VALUES(32768,50,'0000000000008000');
   77:     INSERT INTO t1(oid,a,x) VALUES(2147483648,51,'0000000080000000');
   78:     INSERT INTO t1(oid,a,x) VALUES(-3,52,'fffffffffffffffd');
   79:     INSERT INTO t1(oid,a,x) VALUES(-128,53,'ffffffffffffff80');
   80:     INSERT INTO t1(oid,a,x) VALUES(-129,54,'ffffffffffffff7f');
   81:     INSERT INTO t1(oid,a,x) VALUES(-9223372036854775808,55,'8000000000000000');
   82:     INSERT INTO t1(oid,a,x) VALUES(4398046511104,56,'0000040000000000');
   83:     INSERT INTO t1(oid,a,x) VALUES(1099511627775,57,'000000ffffffffff');
   84:     INSERT INTO t1(oid,a,x) VALUES(-549755813889,58,'ffffff7fffffffff');
   85:     INSERT INTO t1(oid,a,x) VALUES(0,59,'0000000000000000');
   86:     INSERT INTO t1(oid,a,x) VALUES(1,60,'0000000000000001');
   87:     INSERT INTO t1(oid,a,x) VALUES(256,61,'0000000000000100');
   88:     INSERT INTO t1(oid,a,x) VALUES(65536,62,'0000000000010000');
   89:     INSERT INTO t1(oid,a,x) VALUES(-549755813888,63,'ffffff8000000000');
   90:     INSERT INTO t1(oid,a,x) VALUES(-36028797018963968,64,'ff80000000000000');
   91:     CREATE INDEX t1i1 ON t1(a);
   92:     CREATE INDEX t1i2 ON t1(x);
   93:   }
   94: } {}
   95: do_test boundary1-1.2 {
   96:   db eval {
   97:     SELECT count(*) FROM t1
   98:   }
   99: } {64}
  100: do_test boundary1-2.1.1 {
  101:   db eval {
  102:     SELECT * FROM t1 WHERE rowid=72057594037927935
  103:   }
  104: } {17 00ffffffffffffff}
  105: do_test boundary1-2.1.2 {
  106:   db eval {
  107:     SELECT rowid, a FROM t1 WHERE x='00ffffffffffffff'
  108:   }
  109: } {72057594037927935 17}
  110: do_test boundary1-2.1.3 {
  111:   db eval {
  112:     SELECT rowid, x FROM t1 WHERE a=17
  113:   }
  114: } {72057594037927935 00ffffffffffffff}
  115: do_test boundary1-2.1.gt.1 {
  116:   db eval {
  117:     SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY a
  118:   }
  119: } {3 28}
  120: do_test boundary1-2.1.gt.2 {
  121:   db eval {
  122:     SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY a DESC
  123:   }
  124: } {28 3}
  125: do_test boundary1-2.1.gt.3 {
  126:   db eval {
  127:     SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY rowid
  128:   }
  129: } {28 3}
  130: do_test boundary1-2.1.gt.4 {
  131:   db eval {
  132:     SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY rowid DESC
  133:   }
  134: } {3 28}
  135: do_test boundary1-2.1.gt.5 {
  136:   db eval {
  137:     SELECT a FROM t1 WHERE rowid > 72057594037927935 ORDER BY x
  138:   }
  139: } {28 3}
  140: do_test boundary1-2.1.ge.1 {
  141:   db eval {
  142:     SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY a
  143:   }
  144: } {3 17 28}
  145: do_test boundary1-2.1.ge.2 {
  146:   db eval {
  147:     SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY a DESC
  148:   }
  149: } {28 17 3}
  150: do_test boundary1-2.1.ge.3 {
  151:   db eval {
  152:     SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY rowid
  153:   }
  154: } {17 28 3}
  155: do_test boundary1-2.1.ge.4 {
  156:   db eval {
  157:     SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY rowid DESC
  158:   }
  159: } {3 28 17}
  160: do_test boundary1-2.1.ge.5 {
  161:   db eval {
  162:     SELECT a FROM t1 WHERE rowid >= 72057594037927935 ORDER BY x
  163:   }
  164: } {17 28 3}
  165: do_test boundary1-2.1.lt.1 {
  166:   db eval {
  167:     SELECT a FROM t1 WHERE rowid < 72057594037927935 ORDER BY a
  168:   }
  169: } {1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
  170: do_test boundary1-2.1.lt.2 {
  171:   db eval {
  172:     SELECT a FROM t1 WHERE rowid < 72057594037927935 ORDER BY a DESC
  173:   }
  174: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 27 26 25 24 23 22 21 20 19 18 16 15 14 13 12 11 10 9 8 7 6 5 4 2 1}
  175: do_test boundary1-2.1.lt.3 {
  176:   db eval {
  177:     SELECT a FROM t1 WHERE rowid < 72057594037927935 ORDER BY rowid
  178:   }
  179: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45}
  180: do_test boundary1-2.1.lt.4 {
  181:   db eval {
  182:     SELECT a FROM t1 WHERE rowid < 72057594037927935 ORDER BY rowid DESC
  183:   }
  184: } {45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
  185: do_test boundary1-2.1.lt.5 {
  186:   db eval {
  187:     SELECT a FROM t1 WHERE rowid < 72057594037927935 ORDER BY x
  188:   }
  189: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
  190: do_test boundary1-2.1.le.1 {
  191:   db eval {
  192:     SELECT a FROM t1 WHERE rowid <= 72057594037927935 ORDER BY a
  193:   }
  194: } {1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
  195: do_test boundary1-2.1.le.2 {
  196:   db eval {
  197:     SELECT a FROM t1 WHERE rowid <= 72057594037927935 ORDER BY a DESC
  198:   }
  199: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 2 1}
  200: do_test boundary1-2.1.le.3 {
  201:   db eval {
  202:     SELECT a FROM t1 WHERE rowid <= 72057594037927935 ORDER BY rowid
  203:   }
  204: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17}
  205: do_test boundary1-2.1.le.4 {
  206:   db eval {
  207:     SELECT a FROM t1 WHERE rowid <= 72057594037927935 ORDER BY rowid DESC
  208:   }
  209: } {17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
  210: do_test boundary1-2.1.le.5 {
  211:   db eval {
  212:     SELECT a FROM t1 WHERE rowid <= 72057594037927935 ORDER BY x
  213:   }
  214: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
  215: do_test boundary1-2.2.1 {
  216:   db eval {
  217:     SELECT * FROM t1 WHERE rowid=16384
  218:   }
  219: } {16 0000000000004000}
  220: do_test boundary1-2.2.2 {
  221:   db eval {
  222:     SELECT rowid, a FROM t1 WHERE x='0000000000004000'
  223:   }
  224: } {16384 16}
  225: do_test boundary1-2.2.3 {
  226:   db eval {
  227:     SELECT rowid, x FROM t1 WHERE a=16
  228:   }
  229: } {16384 0000000000004000}
  230: do_test boundary1-2.2.gt.1 {
  231:   db eval {
  232:     SELECT a FROM t1 WHERE rowid > 16384 ORDER BY a
  233:   }
  234: } {3 6 7 9 10 12 13 14 15 17 18 19 20 22 23 24 25 26 27 28 34 35 36 39 40 42 43 45 46 48 50 51 56 57 62}
  235: do_test boundary1-2.2.gt.2 {
  236:   db eval {
  237:     SELECT a FROM t1 WHERE rowid > 16384 ORDER BY a DESC
  238:   }
  239: } {62 57 56 51 50 48 46 45 43 42 40 39 36 35 34 28 27 26 25 24 23 22 20 19 18 17 15 14 13 12 10 9 7 6 3}
  240: do_test boundary1-2.2.gt.3 {
  241:   db eval {
  242:     SELECT a FROM t1 WHERE rowid > 16384 ORDER BY rowid
  243:   }
  244: } {23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  245: do_test boundary1-2.2.gt.4 {
  246:   db eval {
  247:     SELECT a FROM t1 WHERE rowid > 16384 ORDER BY rowid DESC
  248:   }
  249: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23}
  250: do_test boundary1-2.2.gt.5 {
  251:   db eval {
  252:     SELECT a FROM t1 WHERE rowid > 16384 ORDER BY x
  253:   }
  254: } {23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  255: do_test boundary1-2.2.ge.1 {
  256:   db eval {
  257:     SELECT a FROM t1 WHERE rowid >= 16384 ORDER BY a
  258:   }
  259: } {3 6 7 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 34 35 36 39 40 42 43 45 46 48 50 51 56 57 62}
  260: do_test boundary1-2.2.ge.2 {
  261:   db eval {
  262:     SELECT a FROM t1 WHERE rowid >= 16384 ORDER BY a DESC
  263:   }
  264: } {62 57 56 51 50 48 46 45 43 42 40 39 36 35 34 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 7 6 3}
  265: do_test boundary1-2.2.ge.3 {
  266:   db eval {
  267:     SELECT a FROM t1 WHERE rowid >= 16384 ORDER BY rowid
  268:   }
  269: } {16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  270: do_test boundary1-2.2.ge.4 {
  271:   db eval {
  272:     SELECT a FROM t1 WHERE rowid >= 16384 ORDER BY rowid DESC
  273:   }
  274: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16}
  275: do_test boundary1-2.2.ge.5 {
  276:   db eval {
  277:     SELECT a FROM t1 WHERE rowid >= 16384 ORDER BY x
  278:   }
  279: } {16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  280: do_test boundary1-2.2.lt.1 {
  281:   db eval {
  282:     SELECT a FROM t1 WHERE rowid < 16384 ORDER BY a
  283:   }
  284: } {1 2 4 5 8 11 21 29 30 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 61 63 64}
  285: do_test boundary1-2.2.lt.2 {
  286:   db eval {
  287:     SELECT a FROM t1 WHERE rowid < 16384 ORDER BY a DESC
  288:   }
  289: } {64 63 61 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 30 29 21 11 8 5 4 2 1}
  290: do_test boundary1-2.2.lt.3 {
  291:   db eval {
  292:     SELECT a FROM t1 WHERE rowid < 16384 ORDER BY rowid
  293:   }
  294: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8}
  295: do_test boundary1-2.2.lt.4 {
  296:   db eval {
  297:     SELECT a FROM t1 WHERE rowid < 16384 ORDER BY rowid DESC
  298:   }
  299: } {8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
  300: do_test boundary1-2.2.lt.5 {
  301:   db eval {
  302:     SELECT a FROM t1 WHERE rowid < 16384 ORDER BY x
  303:   }
  304: } {59 60 41 5 31 4 49 30 61 8 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
  305: do_test boundary1-2.2.le.1 {
  306:   db eval {
  307:     SELECT a FROM t1 WHERE rowid <= 16384 ORDER BY a
  308:   }
  309: } {1 2 4 5 8 11 16 21 29 30 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 61 63 64}
  310: do_test boundary1-2.2.le.2 {
  311:   db eval {
  312:     SELECT a FROM t1 WHERE rowid <= 16384 ORDER BY a DESC
  313:   }
  314: } {64 63 61 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 30 29 21 16 11 8 5 4 2 1}
  315: do_test boundary1-2.2.le.3 {
  316:   db eval {
  317:     SELECT a FROM t1 WHERE rowid <= 16384 ORDER BY rowid
  318:   }
  319: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16}
  320: do_test boundary1-2.2.le.4 {
  321:   db eval {
  322:     SELECT a FROM t1 WHERE rowid <= 16384 ORDER BY rowid DESC
  323:   }
  324: } {16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
  325: do_test boundary1-2.2.le.5 {
  326:   db eval {
  327:     SELECT a FROM t1 WHERE rowid <= 16384 ORDER BY x
  328:   }
  329: } {59 60 41 5 31 4 49 30 61 8 16 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
  330: do_test boundary1-2.3.1 {
  331:   db eval {
  332:     SELECT * FROM t1 WHERE rowid=4294967296
  333:   }
  334: } {36 0000000100000000}
  335: do_test boundary1-2.3.2 {
  336:   db eval {
  337:     SELECT rowid, a FROM t1 WHERE x='0000000100000000'
  338:   }
  339: } {4294967296 36}
  340: do_test boundary1-2.3.3 {
  341:   db eval {
  342:     SELECT rowid, x FROM t1 WHERE a=36
  343:   }
  344: } {4294967296 0000000100000000}
  345: do_test boundary1-2.3.gt.1 {
  346:   db eval {
  347:     SELECT a FROM t1 WHERE rowid > 4294967296 ORDER BY a
  348:   }
  349: } {3 7 10 13 17 19 22 25 26 27 28 34 35 39 43 45 46 56 57}
  350: do_test boundary1-2.3.gt.2 {
  351:   db eval {
  352:     SELECT a FROM t1 WHERE rowid > 4294967296 ORDER BY a DESC
  353:   }
  354: } {57 56 46 45 43 39 35 34 28 27 26 25 22 19 17 13 10 7 3}
  355: do_test boundary1-2.3.gt.3 {
  356:   db eval {
  357:     SELECT a FROM t1 WHERE rowid > 4294967296 ORDER BY rowid
  358:   }
  359: } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  360: do_test boundary1-2.3.gt.4 {
  361:   db eval {
  362:     SELECT a FROM t1 WHERE rowid > 4294967296 ORDER BY rowid DESC
  363:   }
  364: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39}
  365: do_test boundary1-2.3.gt.5 {
  366:   db eval {
  367:     SELECT a FROM t1 WHERE rowid > 4294967296 ORDER BY x
  368:   }
  369: } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  370: do_test boundary1-2.3.ge.1 {
  371:   db eval {
  372:     SELECT a FROM t1 WHERE rowid >= 4294967296 ORDER BY a
  373:   }
  374: } {3 7 10 13 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
  375: do_test boundary1-2.3.ge.2 {
  376:   db eval {
  377:     SELECT a FROM t1 WHERE rowid >= 4294967296 ORDER BY a DESC
  378:   }
  379: } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 13 10 7 3}
  380: do_test boundary1-2.3.ge.3 {
  381:   db eval {
  382:     SELECT a FROM t1 WHERE rowid >= 4294967296 ORDER BY rowid
  383:   }
  384: } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  385: do_test boundary1-2.3.ge.4 {
  386:   db eval {
  387:     SELECT a FROM t1 WHERE rowid >= 4294967296 ORDER BY rowid DESC
  388:   }
  389: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36}
  390: do_test boundary1-2.3.ge.5 {
  391:   db eval {
  392:     SELECT a FROM t1 WHERE rowid >= 4294967296 ORDER BY x
  393:   }
  394: } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  395: do_test boundary1-2.3.lt.1 {
  396:   db eval {
  397:     SELECT a FROM t1 WHERE rowid < 4294967296 ORDER BY a
  398:   }
  399: } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 23 24 29 30 31 32 33 37 38 40 41 42 44 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
  400: do_test boundary1-2.3.lt.2 {
  401:   db eval {
  402:     SELECT a FROM t1 WHERE rowid < 4294967296 ORDER BY a DESC
  403:   }
  404: } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 44 42 41 40 38 37 33 32 31 30 29 24 23 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
  405: do_test boundary1-2.3.lt.3 {
  406:   db eval {
  407:     SELECT a FROM t1 WHERE rowid < 4294967296 ORDER BY rowid
  408:   }
  409: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14}
  410: do_test boundary1-2.3.lt.4 {
  411:   db eval {
  412:     SELECT a FROM t1 WHERE rowid < 4294967296 ORDER BY rowid DESC
  413:   }
  414: } {14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
  415: do_test boundary1-2.3.lt.5 {
  416:   db eval {
  417:     SELECT a FROM t1 WHERE rowid < 4294967296 ORDER BY x
  418:   }
  419: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
  420: do_test boundary1-2.3.le.1 {
  421:   db eval {
  422:     SELECT a FROM t1 WHERE rowid <= 4294967296 ORDER BY a
  423:   }
  424: } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 23 24 29 30 31 32 33 36 37 38 40 41 42 44 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
  425: do_test boundary1-2.3.le.2 {
  426:   db eval {
  427:     SELECT a FROM t1 WHERE rowid <= 4294967296 ORDER BY a DESC
  428:   }
  429: } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 44 42 41 40 38 37 36 33 32 31 30 29 24 23 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
  430: do_test boundary1-2.3.le.3 {
  431:   db eval {
  432:     SELECT a FROM t1 WHERE rowid <= 4294967296 ORDER BY rowid
  433:   }
  434: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36}
  435: do_test boundary1-2.3.le.4 {
  436:   db eval {
  437:     SELECT a FROM t1 WHERE rowid <= 4294967296 ORDER BY rowid DESC
  438:   }
  439: } {36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
  440: do_test boundary1-2.3.le.5 {
  441:   db eval {
  442:     SELECT a FROM t1 WHERE rowid <= 4294967296 ORDER BY x
  443:   }
  444: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
  445: do_test boundary1-2.4.1 {
  446:   db eval {
  447:     SELECT * FROM t1 WHERE rowid=16777216
  448:   }
  449: } {6 0000000001000000}
  450: do_test boundary1-2.4.2 {
  451:   db eval {
  452:     SELECT rowid, a FROM t1 WHERE x='0000000001000000'
  453:   }
  454: } {16777216 6}
  455: do_test boundary1-2.4.3 {
  456:   db eval {
  457:     SELECT rowid, x FROM t1 WHERE a=6
  458:   }
  459: } {16777216 0000000001000000}
  460: do_test boundary1-2.4.gt.1 {
  461:   db eval {
  462:     SELECT a FROM t1 WHERE rowid > 16777216 ORDER BY a
  463:   }
  464: } {3 7 10 12 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
  465: do_test boundary1-2.4.gt.2 {
  466:   db eval {
  467:     SELECT a FROM t1 WHERE rowid > 16777216 ORDER BY a DESC
  468:   }
  469: } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 12 10 7 3}
  470: do_test boundary1-2.4.gt.3 {
  471:   db eval {
  472:     SELECT a FROM t1 WHERE rowid > 16777216 ORDER BY rowid
  473:   }
  474: } {12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  475: do_test boundary1-2.4.gt.4 {
  476:   db eval {
  477:     SELECT a FROM t1 WHERE rowid > 16777216 ORDER BY rowid DESC
  478:   }
  479: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12}
  480: do_test boundary1-2.4.gt.5 {
  481:   db eval {
  482:     SELECT a FROM t1 WHERE rowid > 16777216 ORDER BY x
  483:   }
  484: } {12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  485: do_test boundary1-2.4.ge.1 {
  486:   db eval {
  487:     SELECT a FROM t1 WHERE rowid >= 16777216 ORDER BY a
  488:   }
  489: } {3 6 7 10 12 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
  490: do_test boundary1-2.4.ge.2 {
  491:   db eval {
  492:     SELECT a FROM t1 WHERE rowid >= 16777216 ORDER BY a DESC
  493:   }
  494: } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 12 10 7 6 3}
  495: do_test boundary1-2.4.ge.3 {
  496:   db eval {
  497:     SELECT a FROM t1 WHERE rowid >= 16777216 ORDER BY rowid
  498:   }
  499: } {6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  500: do_test boundary1-2.4.ge.4 {
  501:   db eval {
  502:     SELECT a FROM t1 WHERE rowid >= 16777216 ORDER BY rowid DESC
  503:   }
  504: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6}
  505: do_test boundary1-2.4.ge.5 {
  506:   db eval {
  507:     SELECT a FROM t1 WHERE rowid >= 16777216 ORDER BY x
  508:   }
  509: } {6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  510: do_test boundary1-2.4.lt.1 {
  511:   db eval {
  512:     SELECT a FROM t1 WHERE rowid < 16777216 ORDER BY a
  513:   }
  514: } {1 2 4 5 8 9 11 15 16 18 21 23 24 29 30 31 32 33 37 38 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
  515: do_test boundary1-2.4.lt.2 {
  516:   db eval {
  517:     SELECT a FROM t1 WHERE rowid < 16777216 ORDER BY a DESC
  518:   }
  519: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 38 37 33 32 31 30 29 24 23 21 18 16 15 11 9 8 5 4 2 1}
  520: do_test boundary1-2.4.lt.3 {
  521:   db eval {
  522:     SELECT a FROM t1 WHERE rowid < 16777216 ORDER BY rowid
  523:   }
  524: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9}
  525: do_test boundary1-2.4.lt.4 {
  526:   db eval {
  527:     SELECT a FROM t1 WHERE rowid < 16777216 ORDER BY rowid DESC
  528:   }
  529: } {9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
  530: do_test boundary1-2.4.lt.5 {
  531:   db eval {
  532:     SELECT a FROM t1 WHERE rowid < 16777216 ORDER BY x
  533:   }
  534: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
  535: do_test boundary1-2.4.le.1 {
  536:   db eval {
  537:     SELECT a FROM t1 WHERE rowid <= 16777216 ORDER BY a
  538:   }
  539: } {1 2 4 5 6 8 9 11 15 16 18 21 23 24 29 30 31 32 33 37 38 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
  540: do_test boundary1-2.4.le.2 {
  541:   db eval {
  542:     SELECT a FROM t1 WHERE rowid <= 16777216 ORDER BY a DESC
  543:   }
  544: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 38 37 33 32 31 30 29 24 23 21 18 16 15 11 9 8 6 5 4 2 1}
  545: do_test boundary1-2.4.le.3 {
  546:   db eval {
  547:     SELECT a FROM t1 WHERE rowid <= 16777216 ORDER BY rowid
  548:   }
  549: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6}
  550: do_test boundary1-2.4.le.4 {
  551:   db eval {
  552:     SELECT a FROM t1 WHERE rowid <= 16777216 ORDER BY rowid DESC
  553:   }
  554: } {6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
  555: do_test boundary1-2.4.le.5 {
  556:   db eval {
  557:     SELECT a FROM t1 WHERE rowid <= 16777216 ORDER BY x
  558:   }
  559: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
  560: do_test boundary1-2.5.1 {
  561:   db eval {
  562:     SELECT * FROM t1 WHERE rowid=-32769
  563:   }
  564: } {29 ffffffffffff7fff}
  565: do_test boundary1-2.5.2 {
  566:   db eval {
  567:     SELECT rowid, a FROM t1 WHERE x='ffffffffffff7fff'
  568:   }
  569: } {-32769 29}
  570: do_test boundary1-2.5.3 {
  571:   db eval {
  572:     SELECT rowid, x FROM t1 WHERE a=29
  573:   }
  574: } {-32769 ffffffffffff7fff}
  575: do_test boundary1-2.5.gt.1 {
  576:   db eval {
  577:     SELECT a FROM t1 WHERE rowid > -32769 ORDER BY a
  578:   }
  579: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 32 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
  580: do_test boundary1-2.5.gt.2 {
  581:   db eval {
  582:     SELECT a FROM t1 WHERE rowid > -32769 ORDER BY a DESC
  583:   }
  584: } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 32 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
  585: do_test boundary1-2.5.gt.3 {
  586:   db eval {
  587:     SELECT a FROM t1 WHERE rowid > -32769 ORDER BY rowid
  588:   }
  589: } {32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  590: do_test boundary1-2.5.gt.4 {
  591:   db eval {
  592:     SELECT a FROM t1 WHERE rowid > -32769 ORDER BY rowid DESC
  593:   }
  594: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32}
  595: do_test boundary1-2.5.gt.5 {
  596:   db eval {
  597:     SELECT a FROM t1 WHERE rowid > -32769 ORDER BY x
  598:   }
  599: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 32 54 53 52 33 38}
  600: do_test boundary1-2.5.ge.1 {
  601:   db eval {
  602:     SELECT a FROM t1 WHERE rowid >= -32769 ORDER BY a
  603:   }
  604: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
  605: do_test boundary1-2.5.ge.2 {
  606:   db eval {
  607:     SELECT a FROM t1 WHERE rowid >= -32769 ORDER BY a DESC
  608:   }
  609: } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
  610: do_test boundary1-2.5.ge.3 {
  611:   db eval {
  612:     SELECT a FROM t1 WHERE rowid >= -32769 ORDER BY rowid
  613:   }
  614: } {29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  615: do_test boundary1-2.5.ge.4 {
  616:   db eval {
  617:     SELECT a FROM t1 WHERE rowid >= -32769 ORDER BY rowid DESC
  618:   }
  619: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29}
  620: do_test boundary1-2.5.ge.5 {
  621:   db eval {
  622:     SELECT a FROM t1 WHERE rowid >= -32769 ORDER BY x
  623:   }
  624: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 29 32 54 53 52 33 38}
  625: do_test boundary1-2.5.lt.1 {
  626:   db eval {
  627:     SELECT a FROM t1 WHERE rowid < -32769 ORDER BY a
  628:   }
  629: } {1 2 11 21 37 44 47 55 58 63 64}
  630: do_test boundary1-2.5.lt.2 {
  631:   db eval {
  632:     SELECT a FROM t1 WHERE rowid < -32769 ORDER BY a DESC
  633:   }
  634: } {64 63 58 55 47 44 37 21 11 2 1}
  635: do_test boundary1-2.5.lt.3 {
  636:   db eval {
  637:     SELECT a FROM t1 WHERE rowid < -32769 ORDER BY rowid
  638:   }
  639: } {55 2 64 21 44 58 63 47 11 1 37}
  640: do_test boundary1-2.5.lt.4 {
  641:   db eval {
  642:     SELECT a FROM t1 WHERE rowid < -32769 ORDER BY rowid DESC
  643:   }
  644: } {37 1 11 47 63 58 44 21 64 2 55}
  645: do_test boundary1-2.5.lt.5 {
  646:   db eval {
  647:     SELECT a FROM t1 WHERE rowid < -32769 ORDER BY x
  648:   }
  649: } {55 2 64 21 44 58 63 47 11 1 37}
  650: do_test boundary1-2.5.le.1 {
  651:   db eval {
  652:     SELECT a FROM t1 WHERE rowid <= -32769 ORDER BY a
  653:   }
  654: } {1 2 11 21 29 37 44 47 55 58 63 64}
  655: do_test boundary1-2.5.le.2 {
  656:   db eval {
  657:     SELECT a FROM t1 WHERE rowid <= -32769 ORDER BY a DESC
  658:   }
  659: } {64 63 58 55 47 44 37 29 21 11 2 1}
  660: do_test boundary1-2.5.le.3 {
  661:   db eval {
  662:     SELECT a FROM t1 WHERE rowid <= -32769 ORDER BY rowid
  663:   }
  664: } {55 2 64 21 44 58 63 47 11 1 37 29}
  665: do_test boundary1-2.5.le.4 {
  666:   db eval {
  667:     SELECT a FROM t1 WHERE rowid <= -32769 ORDER BY rowid DESC
  668:   }
  669: } {29 37 1 11 47 63 58 44 21 64 2 55}
  670: do_test boundary1-2.5.le.5 {
  671:   db eval {
  672:     SELECT a FROM t1 WHERE rowid <= -32769 ORDER BY x
  673:   }
  674: } {55 2 64 21 44 58 63 47 11 1 37 29}
  675: do_test boundary1-2.6.1 {
  676:   db eval {
  677:     SELECT * FROM t1 WHERE rowid=-140737488355329
  678:   }
  679: } {21 ffff7fffffffffff}
  680: do_test boundary1-2.6.2 {
  681:   db eval {
  682:     SELECT rowid, a FROM t1 WHERE x='ffff7fffffffffff'
  683:   }
  684: } {-140737488355329 21}
  685: do_test boundary1-2.6.3 {
  686:   db eval {
  687:     SELECT rowid, x FROM t1 WHERE a=21
  688:   }
  689: } {-140737488355329 ffff7fffffffffff}
  690: do_test boundary1-2.6.gt.1 {
  691:   db eval {
  692:     SELECT a FROM t1 WHERE rowid > -140737488355329 ORDER BY a
  693:   }
  694: } {1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 56 57 58 59 60 61 62 63}
  695: do_test boundary1-2.6.gt.2 {
  696:   db eval {
  697:     SELECT a FROM t1 WHERE rowid > -140737488355329 ORDER BY a DESC
  698:   }
  699: } {63 62 61 60 59 58 57 56 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 1}
  700: do_test boundary1-2.6.gt.3 {
  701:   db eval {
  702:     SELECT a FROM t1 WHERE rowid > -140737488355329 ORDER BY rowid
  703:   }
  704: } {44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  705: do_test boundary1-2.6.gt.4 {
  706:   db eval {
  707:     SELECT a FROM t1 WHERE rowid > -140737488355329 ORDER BY rowid DESC
  708:   }
  709: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44}
  710: do_test boundary1-2.6.gt.5 {
  711:   db eval {
  712:     SELECT a FROM t1 WHERE rowid > -140737488355329 ORDER BY x
  713:   }
  714: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
  715: do_test boundary1-2.6.ge.1 {
  716:   db eval {
  717:     SELECT a FROM t1 WHERE rowid >= -140737488355329 ORDER BY a
  718:   }
  719: } {1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 56 57 58 59 60 61 62 63}
  720: do_test boundary1-2.6.ge.2 {
  721:   db eval {
  722:     SELECT a FROM t1 WHERE rowid >= -140737488355329 ORDER BY a DESC
  723:   }
  724: } {63 62 61 60 59 58 57 56 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 1}
  725: do_test boundary1-2.6.ge.3 {
  726:   db eval {
  727:     SELECT a FROM t1 WHERE rowid >= -140737488355329 ORDER BY rowid
  728:   }
  729: } {21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  730: do_test boundary1-2.6.ge.4 {
  731:   db eval {
  732:     SELECT a FROM t1 WHERE rowid >= -140737488355329 ORDER BY rowid DESC
  733:   }
  734: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21}
  735: do_test boundary1-2.6.ge.5 {
  736:   db eval {
  737:     SELECT a FROM t1 WHERE rowid >= -140737488355329 ORDER BY x
  738:   }
  739: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
  740: do_test boundary1-2.6.lt.1 {
  741:   db eval {
  742:     SELECT a FROM t1 WHERE rowid < -140737488355329 ORDER BY a
  743:   }
  744: } {2 55 64}
  745: do_test boundary1-2.6.lt.2 {
  746:   db eval {
  747:     SELECT a FROM t1 WHERE rowid < -140737488355329 ORDER BY a DESC
  748:   }
  749: } {64 55 2}
  750: do_test boundary1-2.6.lt.3 {
  751:   db eval {
  752:     SELECT a FROM t1 WHERE rowid < -140737488355329 ORDER BY rowid
  753:   }
  754: } {55 2 64}
  755: do_test boundary1-2.6.lt.4 {
  756:   db eval {
  757:     SELECT a FROM t1 WHERE rowid < -140737488355329 ORDER BY rowid DESC
  758:   }
  759: } {64 2 55}
  760: do_test boundary1-2.6.lt.5 {
  761:   db eval {
  762:     SELECT a FROM t1 WHERE rowid < -140737488355329 ORDER BY x
  763:   }
  764: } {55 2 64}
  765: do_test boundary1-2.6.le.1 {
  766:   db eval {
  767:     SELECT a FROM t1 WHERE rowid <= -140737488355329 ORDER BY a
  768:   }
  769: } {2 21 55 64}
  770: do_test boundary1-2.6.le.2 {
  771:   db eval {
  772:     SELECT a FROM t1 WHERE rowid <= -140737488355329 ORDER BY a DESC
  773:   }
  774: } {64 55 21 2}
  775: do_test boundary1-2.6.le.3 {
  776:   db eval {
  777:     SELECT a FROM t1 WHERE rowid <= -140737488355329 ORDER BY rowid
  778:   }
  779: } {55 2 64 21}
  780: do_test boundary1-2.6.le.4 {
  781:   db eval {
  782:     SELECT a FROM t1 WHERE rowid <= -140737488355329 ORDER BY rowid DESC
  783:   }
  784: } {21 64 2 55}
  785: do_test boundary1-2.6.le.5 {
  786:   db eval {
  787:     SELECT a FROM t1 WHERE rowid <= -140737488355329 ORDER BY x
  788:   }
  789: } {55 2 64 21}
  790: do_test boundary1-2.7.1 {
  791:   db eval {
  792:     SELECT * FROM t1 WHERE rowid=2
  793:   }
  794: } {41 0000000000000002}
  795: do_test boundary1-2.7.2 {
  796:   db eval {
  797:     SELECT rowid, a FROM t1 WHERE x='0000000000000002'
  798:   }
  799: } {2 41}
  800: do_test boundary1-2.7.3 {
  801:   db eval {
  802:     SELECT rowid, x FROM t1 WHERE a=41
  803:   }
  804: } {2 0000000000000002}
  805: do_test boundary1-2.7.gt.1 {
  806:   db eval {
  807:     SELECT a FROM t1 WHERE rowid > 2 ORDER BY a
  808:   }
  809: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 34 35 36 39 40 42 43 45 46 48 49 50 51 56 57 61 62}
  810: do_test boundary1-2.7.gt.2 {
  811:   db eval {
  812:     SELECT a FROM t1 WHERE rowid > 2 ORDER BY a DESC
  813:   }
  814: } {62 61 57 56 51 50 49 48 46 45 43 42 40 39 36 35 34 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
  815: do_test boundary1-2.7.gt.3 {
  816:   db eval {
  817:     SELECT a FROM t1 WHERE rowid > 2 ORDER BY rowid
  818:   }
  819: } {5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  820: do_test boundary1-2.7.gt.4 {
  821:   db eval {
  822:     SELECT a FROM t1 WHERE rowid > 2 ORDER BY rowid DESC
  823:   }
  824: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5}
  825: do_test boundary1-2.7.gt.5 {
  826:   db eval {
  827:     SELECT a FROM t1 WHERE rowid > 2 ORDER BY x
  828:   }
  829: } {5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  830: do_test boundary1-2.7.ge.1 {
  831:   db eval {
  832:     SELECT a FROM t1 WHERE rowid >= 2 ORDER BY a
  833:   }
  834: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 34 35 36 39 40 41 42 43 45 46 48 49 50 51 56 57 61 62}
  835: do_test boundary1-2.7.ge.2 {
  836:   db eval {
  837:     SELECT a FROM t1 WHERE rowid >= 2 ORDER BY a DESC
  838:   }
  839: } {62 61 57 56 51 50 49 48 46 45 43 42 41 40 39 36 35 34 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
  840: do_test boundary1-2.7.ge.3 {
  841:   db eval {
  842:     SELECT a FROM t1 WHERE rowid >= 2 ORDER BY rowid
  843:   }
  844: } {41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  845: do_test boundary1-2.7.ge.4 {
  846:   db eval {
  847:     SELECT a FROM t1 WHERE rowid >= 2 ORDER BY rowid DESC
  848:   }
  849: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41}
  850: do_test boundary1-2.7.ge.5 {
  851:   db eval {
  852:     SELECT a FROM t1 WHERE rowid >= 2 ORDER BY x
  853:   }
  854: } {41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  855: do_test boundary1-2.7.lt.1 {
  856:   db eval {
  857:     SELECT a FROM t1 WHERE rowid < 2 ORDER BY a
  858:   }
  859: } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 60 63 64}
  860: do_test boundary1-2.7.lt.2 {
  861:   db eval {
  862:     SELECT a FROM t1 WHERE rowid < 2 ORDER BY a DESC
  863:   }
  864: } {64 63 60 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
  865: do_test boundary1-2.7.lt.3 {
  866:   db eval {
  867:     SELECT a FROM t1 WHERE rowid < 2 ORDER BY rowid
  868:   }
  869: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60}
  870: do_test boundary1-2.7.lt.4 {
  871:   db eval {
  872:     SELECT a FROM t1 WHERE rowid < 2 ORDER BY rowid DESC
  873:   }
  874: } {60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
  875: do_test boundary1-2.7.lt.5 {
  876:   db eval {
  877:     SELECT a FROM t1 WHERE rowid < 2 ORDER BY x
  878:   }
  879: } {59 60 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
  880: do_test boundary1-2.7.le.1 {
  881:   db eval {
  882:     SELECT a FROM t1 WHERE rowid <= 2 ORDER BY a
  883:   }
  884: } {1 2 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
  885: do_test boundary1-2.7.le.2 {
  886:   db eval {
  887:     SELECT a FROM t1 WHERE rowid <= 2 ORDER BY a DESC
  888:   }
  889: } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 2 1}
  890: do_test boundary1-2.7.le.3 {
  891:   db eval {
  892:     SELECT a FROM t1 WHERE rowid <= 2 ORDER BY rowid
  893:   }
  894: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41}
  895: do_test boundary1-2.7.le.4 {
  896:   db eval {
  897:     SELECT a FROM t1 WHERE rowid <= 2 ORDER BY rowid DESC
  898:   }
  899: } {41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
  900: do_test boundary1-2.7.le.5 {
  901:   db eval {
  902:     SELECT a FROM t1 WHERE rowid <= 2 ORDER BY x
  903:   }
  904: } {59 60 41 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
  905: do_test boundary1-2.8.1 {
  906:   db eval {
  907:     SELECT * FROM t1 WHERE rowid=4
  908:   }
  909: } {31 0000000000000004}
  910: do_test boundary1-2.8.2 {
  911:   db eval {
  912:     SELECT rowid, a FROM t1 WHERE x='0000000000000004'
  913:   }
  914: } {4 31}
  915: do_test boundary1-2.8.3 {
  916:   db eval {
  917:     SELECT rowid, x FROM t1 WHERE a=31
  918:   }
  919: } {4 0000000000000004}
  920: do_test boundary1-2.8.gt.1 {
  921:   db eval {
  922:     SELECT a FROM t1 WHERE rowid > 4 ORDER BY a
  923:   }
  924: } {3 4 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 34 35 36 39 40 42 43 45 46 48 49 50 51 56 57 61 62}
  925: do_test boundary1-2.8.gt.2 {
  926:   db eval {
  927:     SELECT a FROM t1 WHERE rowid > 4 ORDER BY a DESC
  928:   }
  929: } {62 61 57 56 51 50 49 48 46 45 43 42 40 39 36 35 34 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 4 3}
  930: do_test boundary1-2.8.gt.3 {
  931:   db eval {
  932:     SELECT a FROM t1 WHERE rowid > 4 ORDER BY rowid
  933:   }
  934: } {4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  935: do_test boundary1-2.8.gt.4 {
  936:   db eval {
  937:     SELECT a FROM t1 WHERE rowid > 4 ORDER BY rowid DESC
  938:   }
  939: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4}
  940: do_test boundary1-2.8.gt.5 {
  941:   db eval {
  942:     SELECT a FROM t1 WHERE rowid > 4 ORDER BY x
  943:   }
  944: } {4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  945: do_test boundary1-2.8.ge.1 {
  946:   db eval {
  947:     SELECT a FROM t1 WHERE rowid >= 4 ORDER BY a
  948:   }
  949: } {3 4 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 34 35 36 39 40 42 43 45 46 48 49 50 51 56 57 61 62}
  950: do_test boundary1-2.8.ge.2 {
  951:   db eval {
  952:     SELECT a FROM t1 WHERE rowid >= 4 ORDER BY a DESC
  953:   }
  954: } {62 61 57 56 51 50 49 48 46 45 43 42 40 39 36 35 34 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 4 3}
  955: do_test boundary1-2.8.ge.3 {
  956:   db eval {
  957:     SELECT a FROM t1 WHERE rowid >= 4 ORDER BY rowid
  958:   }
  959: } {31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  960: do_test boundary1-2.8.ge.4 {
  961:   db eval {
  962:     SELECT a FROM t1 WHERE rowid >= 4 ORDER BY rowid DESC
  963:   }
  964: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31}
  965: do_test boundary1-2.8.ge.5 {
  966:   db eval {
  967:     SELECT a FROM t1 WHERE rowid >= 4 ORDER BY x
  968:   }
  969: } {31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
  970: do_test boundary1-2.8.lt.1 {
  971:   db eval {
  972:     SELECT a FROM t1 WHERE rowid < 4 ORDER BY a
  973:   }
  974: } {1 2 5 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
  975: do_test boundary1-2.8.lt.2 {
  976:   db eval {
  977:     SELECT a FROM t1 WHERE rowid < 4 ORDER BY a DESC
  978:   }
  979: } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 5 2 1}
  980: do_test boundary1-2.8.lt.3 {
  981:   db eval {
  982:     SELECT a FROM t1 WHERE rowid < 4 ORDER BY rowid
  983:   }
  984: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5}
  985: do_test boundary1-2.8.lt.4 {
  986:   db eval {
  987:     SELECT a FROM t1 WHERE rowid < 4 ORDER BY rowid DESC
  988:   }
  989: } {5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
  990: do_test boundary1-2.8.lt.5 {
  991:   db eval {
  992:     SELECT a FROM t1 WHERE rowid < 4 ORDER BY x
  993:   }
  994: } {59 60 41 5 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
  995: do_test boundary1-2.8.le.1 {
  996:   db eval {
  997:     SELECT a FROM t1 WHERE rowid <= 4 ORDER BY a
  998:   }
  999: } {1 2 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
 1000: do_test boundary1-2.8.le.2 {
 1001:   db eval {
 1002:     SELECT a FROM t1 WHERE rowid <= 4 ORDER BY a DESC
 1003:   }
 1004: } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 2 1}
 1005: do_test boundary1-2.8.le.3 {
 1006:   db eval {
 1007:     SELECT a FROM t1 WHERE rowid <= 4 ORDER BY rowid
 1008:   }
 1009: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31}
 1010: do_test boundary1-2.8.le.4 {
 1011:   db eval {
 1012:     SELECT a FROM t1 WHERE rowid <= 4 ORDER BY rowid DESC
 1013:   }
 1014: } {31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 1015: do_test boundary1-2.8.le.5 {
 1016:   db eval {
 1017:     SELECT a FROM t1 WHERE rowid <= 4 ORDER BY x
 1018:   }
 1019: } {59 60 41 5 31 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 1020: do_test boundary1-2.9.1 {
 1021:   db eval {
 1022:     SELECT * FROM t1 WHERE rowid=562949953421311
 1023:   }
 1024: } {13 0001ffffffffffff}
 1025: do_test boundary1-2.9.2 {
 1026:   db eval {
 1027:     SELECT rowid, a FROM t1 WHERE x='0001ffffffffffff'
 1028:   }
 1029: } {562949953421311 13}
 1030: do_test boundary1-2.9.3 {
 1031:   db eval {
 1032:     SELECT rowid, x FROM t1 WHERE a=13
 1033:   }
 1034: } {562949953421311 0001ffffffffffff}
 1035: do_test boundary1-2.9.gt.1 {
 1036:   db eval {
 1037:     SELECT a FROM t1 WHERE rowid > 562949953421311 ORDER BY a
 1038:   }
 1039: } {3 17 27 28 43 45}
 1040: do_test boundary1-2.9.gt.2 {
 1041:   db eval {
 1042:     SELECT a FROM t1 WHERE rowid > 562949953421311 ORDER BY a DESC
 1043:   }
 1044: } {45 43 28 27 17 3}
 1045: do_test boundary1-2.9.gt.3 {
 1046:   db eval {
 1047:     SELECT a FROM t1 WHERE rowid > 562949953421311 ORDER BY rowid
 1048:   }
 1049: } {43 27 45 17 28 3}
 1050: do_test boundary1-2.9.gt.4 {
 1051:   db eval {
 1052:     SELECT a FROM t1 WHERE rowid > 562949953421311 ORDER BY rowid DESC
 1053:   }
 1054: } {3 28 17 45 27 43}
 1055: do_test boundary1-2.9.gt.5 {
 1056:   db eval {
 1057:     SELECT a FROM t1 WHERE rowid > 562949953421311 ORDER BY x
 1058:   }
 1059: } {43 27 45 17 28 3}
 1060: do_test boundary1-2.9.ge.1 {
 1061:   db eval {
 1062:     SELECT a FROM t1 WHERE rowid >= 562949953421311 ORDER BY a
 1063:   }
 1064: } {3 13 17 27 28 43 45}
 1065: do_test boundary1-2.9.ge.2 {
 1066:   db eval {
 1067:     SELECT a FROM t1 WHERE rowid >= 562949953421311 ORDER BY a DESC
 1068:   }
 1069: } {45 43 28 27 17 13 3}
 1070: do_test boundary1-2.9.ge.3 {
 1071:   db eval {
 1072:     SELECT a FROM t1 WHERE rowid >= 562949953421311 ORDER BY rowid
 1073:   }
 1074: } {13 43 27 45 17 28 3}
 1075: do_test boundary1-2.9.ge.4 {
 1076:   db eval {
 1077:     SELECT a FROM t1 WHERE rowid >= 562949953421311 ORDER BY rowid DESC
 1078:   }
 1079: } {3 28 17 45 27 43 13}
 1080: do_test boundary1-2.9.ge.5 {
 1081:   db eval {
 1082:     SELECT a FROM t1 WHERE rowid >= 562949953421311 ORDER BY x
 1083:   }
 1084: } {13 43 27 45 17 28 3}
 1085: do_test boundary1-2.9.lt.1 {
 1086:   db eval {
 1087:     SELECT a FROM t1 WHERE rowid < 562949953421311 ORDER BY a
 1088:   }
 1089: } {1 2 4 5 6 7 8 9 10 11 12 14 15 16 18 19 20 21 22 23 24 25 26 29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 1090: do_test boundary1-2.9.lt.2 {
 1091:   db eval {
 1092:     SELECT a FROM t1 WHERE rowid < 562949953421311 ORDER BY a DESC
 1093:   }
 1094: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 34 33 32 31 30 29 26 25 24 23 22 21 20 19 18 16 15 14 12 11 10 9 8 7 6 5 4 2 1}
 1095: do_test boundary1-2.9.lt.3 {
 1096:   db eval {
 1097:     SELECT a FROM t1 WHERE rowid < 562949953421311 ORDER BY rowid
 1098:   }
 1099: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26}
 1100: do_test boundary1-2.9.lt.4 {
 1101:   db eval {
 1102:     SELECT a FROM t1 WHERE rowid < 562949953421311 ORDER BY rowid DESC
 1103:   }
 1104: } {26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 1105: do_test boundary1-2.9.lt.5 {
 1106:   db eval {
 1107:     SELECT a FROM t1 WHERE rowid < 562949953421311 ORDER BY x
 1108:   }
 1109: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 1110: do_test boundary1-2.9.le.1 {
 1111:   db eval {
 1112:     SELECT a FROM t1 WHERE rowid <= 562949953421311 ORDER BY a
 1113:   }
 1114: } {1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 1115: do_test boundary1-2.9.le.2 {
 1116:   db eval {
 1117:     SELECT a FROM t1 WHERE rowid <= 562949953421311 ORDER BY a DESC
 1118:   }
 1119: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 34 33 32 31 30 29 26 25 24 23 22 21 20 19 18 16 15 14 13 12 11 10 9 8 7 6 5 4 2 1}
 1120: do_test boundary1-2.9.le.3 {
 1121:   db eval {
 1122:     SELECT a FROM t1 WHERE rowid <= 562949953421311 ORDER BY rowid
 1123:   }
 1124: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13}
 1125: do_test boundary1-2.9.le.4 {
 1126:   db eval {
 1127:     SELECT a FROM t1 WHERE rowid <= 562949953421311 ORDER BY rowid DESC
 1128:   }
 1129: } {13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 1130: do_test boundary1-2.9.le.5 {
 1131:   db eval {
 1132:     SELECT a FROM t1 WHERE rowid <= 562949953421311 ORDER BY x
 1133:   }
 1134: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 1135: do_test boundary1-2.10.1 {
 1136:   db eval {
 1137:     SELECT * FROM t1 WHERE rowid=256
 1138:   }
 1139: } {61 0000000000000100}
 1140: do_test boundary1-2.10.2 {
 1141:   db eval {
 1142:     SELECT rowid, a FROM t1 WHERE x='0000000000000100'
 1143:   }
 1144: } {256 61}
 1145: do_test boundary1-2.10.3 {
 1146:   db eval {
 1147:     SELECT rowid, x FROM t1 WHERE a=61
 1148:   }
 1149: } {256 0000000000000100}
 1150: do_test boundary1-2.10.gt.1 {
 1151:   db eval {
 1152:     SELECT a FROM t1 WHERE rowid > 256 ORDER BY a
 1153:   }
 1154: } {3 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 34 35 36 39 40 42 43 45 46 48 50 51 56 57 62}
 1155: do_test boundary1-2.10.gt.2 {
 1156:   db eval {
 1157:     SELECT a FROM t1 WHERE rowid > 256 ORDER BY a DESC
 1158:   }
 1159: } {62 57 56 51 50 48 46 45 43 42 40 39 36 35 34 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 3}
 1160: do_test boundary1-2.10.gt.3 {
 1161:   db eval {
 1162:     SELECT a FROM t1 WHERE rowid > 256 ORDER BY rowid
 1163:   }
 1164: } {8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1165: do_test boundary1-2.10.gt.4 {
 1166:   db eval {
 1167:     SELECT a FROM t1 WHERE rowid > 256 ORDER BY rowid DESC
 1168:   }
 1169: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8}
 1170: do_test boundary1-2.10.gt.5 {
 1171:   db eval {
 1172:     SELECT a FROM t1 WHERE rowid > 256 ORDER BY x
 1173:   }
 1174: } {8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1175: do_test boundary1-2.10.ge.1 {
 1176:   db eval {
 1177:     SELECT a FROM t1 WHERE rowid >= 256 ORDER BY a
 1178:   }
 1179: } {3 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 34 35 36 39 40 42 43 45 46 48 50 51 56 57 61 62}
 1180: do_test boundary1-2.10.ge.2 {
 1181:   db eval {
 1182:     SELECT a FROM t1 WHERE rowid >= 256 ORDER BY a DESC
 1183:   }
 1184: } {62 61 57 56 51 50 48 46 45 43 42 40 39 36 35 34 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 3}
 1185: do_test boundary1-2.10.ge.3 {
 1186:   db eval {
 1187:     SELECT a FROM t1 WHERE rowid >= 256 ORDER BY rowid
 1188:   }
 1189: } {61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1190: do_test boundary1-2.10.ge.4 {
 1191:   db eval {
 1192:     SELECT a FROM t1 WHERE rowid >= 256 ORDER BY rowid DESC
 1193:   }
 1194: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61}
 1195: do_test boundary1-2.10.ge.5 {
 1196:   db eval {
 1197:     SELECT a FROM t1 WHERE rowid >= 256 ORDER BY x
 1198:   }
 1199: } {61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1200: do_test boundary1-2.10.lt.1 {
 1201:   db eval {
 1202:     SELECT a FROM t1 WHERE rowid < 256 ORDER BY a
 1203:   }
 1204: } {1 2 4 5 11 21 29 30 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 63 64}
 1205: do_test boundary1-2.10.lt.2 {
 1206:   db eval {
 1207:     SELECT a FROM t1 WHERE rowid < 256 ORDER BY a DESC
 1208:   }
 1209: } {64 63 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 30 29 21 11 5 4 2 1}
 1210: do_test boundary1-2.10.lt.3 {
 1211:   db eval {
 1212:     SELECT a FROM t1 WHERE rowid < 256 ORDER BY rowid
 1213:   }
 1214: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30}
 1215: do_test boundary1-2.10.lt.4 {
 1216:   db eval {
 1217:     SELECT a FROM t1 WHERE rowid < 256 ORDER BY rowid DESC
 1218:   }
 1219: } {30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 1220: do_test boundary1-2.10.lt.5 {
 1221:   db eval {
 1222:     SELECT a FROM t1 WHERE rowid < 256 ORDER BY x
 1223:   }
 1224: } {59 60 41 5 31 4 49 30 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 1225: do_test boundary1-2.10.le.1 {
 1226:   db eval {
 1227:     SELECT a FROM t1 WHERE rowid <= 256 ORDER BY a
 1228:   }
 1229: } {1 2 4 5 11 21 29 30 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 61 63 64}
 1230: do_test boundary1-2.10.le.2 {
 1231:   db eval {
 1232:     SELECT a FROM t1 WHERE rowid <= 256 ORDER BY a DESC
 1233:   }
 1234: } {64 63 61 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 30 29 21 11 5 4 2 1}
 1235: do_test boundary1-2.10.le.3 {
 1236:   db eval {
 1237:     SELECT a FROM t1 WHERE rowid <= 256 ORDER BY rowid
 1238:   }
 1239: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61}
 1240: do_test boundary1-2.10.le.4 {
 1241:   db eval {
 1242:     SELECT a FROM t1 WHERE rowid <= 256 ORDER BY rowid DESC
 1243:   }
 1244: } {61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 1245: do_test boundary1-2.10.le.5 {
 1246:   db eval {
 1247:     SELECT a FROM t1 WHERE rowid <= 256 ORDER BY x
 1248:   }
 1249: } {59 60 41 5 31 4 49 30 61 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 1250: do_test boundary1-2.11.1 {
 1251:   db eval {
 1252:     SELECT * FROM t1 WHERE rowid=34359738368
 1253:   }
 1254: } {22 0000000800000000}
 1255: do_test boundary1-2.11.2 {
 1256:   db eval {
 1257:     SELECT rowid, a FROM t1 WHERE x='0000000800000000'
 1258:   }
 1259: } {34359738368 22}
 1260: do_test boundary1-2.11.3 {
 1261:   db eval {
 1262:     SELECT rowid, x FROM t1 WHERE a=22
 1263:   }
 1264: } {34359738368 0000000800000000}
 1265: do_test boundary1-2.11.gt.1 {
 1266:   db eval {
 1267:     SELECT a FROM t1 WHERE rowid > 34359738368 ORDER BY a
 1268:   }
 1269: } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 46 56 57}
 1270: do_test boundary1-2.11.gt.2 {
 1271:   db eval {
 1272:     SELECT a FROM t1 WHERE rowid > 34359738368 ORDER BY a DESC
 1273:   }
 1274: } {57 56 46 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
 1275: do_test boundary1-2.11.gt.3 {
 1276:   db eval {
 1277:     SELECT a FROM t1 WHERE rowid > 34359738368 ORDER BY rowid
 1278:   }
 1279: } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1280: do_test boundary1-2.11.gt.4 {
 1281:   db eval {
 1282:     SELECT a FROM t1 WHERE rowid > 34359738368 ORDER BY rowid DESC
 1283:   }
 1284: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46}
 1285: do_test boundary1-2.11.gt.5 {
 1286:   db eval {
 1287:     SELECT a FROM t1 WHERE rowid > 34359738368 ORDER BY x
 1288:   }
 1289: } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1290: do_test boundary1-2.11.ge.1 {
 1291:   db eval {
 1292:     SELECT a FROM t1 WHERE rowid >= 34359738368 ORDER BY a
 1293:   }
 1294: } {3 7 10 13 17 19 22 25 26 27 28 34 35 43 45 46 56 57}
 1295: do_test boundary1-2.11.ge.2 {
 1296:   db eval {
 1297:     SELECT a FROM t1 WHERE rowid >= 34359738368 ORDER BY a DESC
 1298:   }
 1299: } {57 56 46 45 43 35 34 28 27 26 25 22 19 17 13 10 7 3}
 1300: do_test boundary1-2.11.ge.3 {
 1301:   db eval {
 1302:     SELECT a FROM t1 WHERE rowid >= 34359738368 ORDER BY rowid
 1303:   }
 1304: } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1305: do_test boundary1-2.11.ge.4 {
 1306:   db eval {
 1307:     SELECT a FROM t1 WHERE rowid >= 34359738368 ORDER BY rowid DESC
 1308:   }
 1309: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22}
 1310: do_test boundary1-2.11.ge.5 {
 1311:   db eval {
 1312:     SELECT a FROM t1 WHERE rowid >= 34359738368 ORDER BY x
 1313:   }
 1314: } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1315: do_test boundary1-2.11.lt.1 {
 1316:   db eval {
 1317:     SELECT a FROM t1 WHERE rowid < 34359738368 ORDER BY a
 1318:   }
 1319: } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 23 24 29 30 31 32 33 36 37 38 39 40 41 42 44 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
 1320: do_test boundary1-2.11.lt.2 {
 1321:   db eval {
 1322:     SELECT a FROM t1 WHERE rowid < 34359738368 ORDER BY a DESC
 1323:   }
 1324: } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 44 42 41 40 39 38 37 36 33 32 31 30 29 24 23 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
 1325: do_test boundary1-2.11.lt.3 {
 1326:   db eval {
 1327:     SELECT a FROM t1 WHERE rowid < 34359738368 ORDER BY rowid
 1328:   }
 1329: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39}
 1330: do_test boundary1-2.11.lt.4 {
 1331:   db eval {
 1332:     SELECT a FROM t1 WHERE rowid < 34359738368 ORDER BY rowid DESC
 1333:   }
 1334: } {39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 1335: do_test boundary1-2.11.lt.5 {
 1336:   db eval {
 1337:     SELECT a FROM t1 WHERE rowid < 34359738368 ORDER BY x
 1338:   }
 1339: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 1340: do_test boundary1-2.11.le.1 {
 1341:   db eval {
 1342:     SELECT a FROM t1 WHERE rowid <= 34359738368 ORDER BY a
 1343:   }
 1344: } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 22 23 24 29 30 31 32 33 36 37 38 39 40 41 42 44 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
 1345: do_test boundary1-2.11.le.2 {
 1346:   db eval {
 1347:     SELECT a FROM t1 WHERE rowid <= 34359738368 ORDER BY a DESC
 1348:   }
 1349: } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 44 42 41 40 39 38 37 36 33 32 31 30 29 24 23 22 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
 1350: do_test boundary1-2.11.le.3 {
 1351:   db eval {
 1352:     SELECT a FROM t1 WHERE rowid <= 34359738368 ORDER BY rowid
 1353:   }
 1354: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22}
 1355: do_test boundary1-2.11.le.4 {
 1356:   db eval {
 1357:     SELECT a FROM t1 WHERE rowid <= 34359738368 ORDER BY rowid DESC
 1358:   }
 1359: } {22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 1360: do_test boundary1-2.11.le.5 {
 1361:   db eval {
 1362:     SELECT a FROM t1 WHERE rowid <= 34359738368 ORDER BY x
 1363:   }
 1364: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 1365: do_test boundary1-2.12.1 {
 1366:   db eval {
 1367:     SELECT * FROM t1 WHERE rowid=65536
 1368:   }
 1369: } {62 0000000000010000}
 1370: do_test boundary1-2.12.2 {
 1371:   db eval {
 1372:     SELECT rowid, a FROM t1 WHERE x='0000000000010000'
 1373:   }
 1374: } {65536 62}
 1375: do_test boundary1-2.12.3 {
 1376:   db eval {
 1377:     SELECT rowid, x FROM t1 WHERE a=62
 1378:   }
 1379: } {65536 0000000000010000}
 1380: do_test boundary1-2.12.gt.1 {
 1381:   db eval {
 1382:     SELECT a FROM t1 WHERE rowid > 65536 ORDER BY a
 1383:   }
 1384: } {3 6 7 9 10 12 13 14 15 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 42 43 45 46 51 56 57}
 1385: do_test boundary1-2.12.gt.2 {
 1386:   db eval {
 1387:     SELECT a FROM t1 WHERE rowid > 65536 ORDER BY a DESC
 1388:   }
 1389: } {57 56 51 46 45 43 42 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 15 14 13 12 10 9 7 6 3}
 1390: do_test boundary1-2.12.gt.3 {
 1391:   db eval {
 1392:     SELECT a FROM t1 WHERE rowid > 65536 ORDER BY rowid
 1393:   }
 1394: } {15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1395: do_test boundary1-2.12.gt.4 {
 1396:   db eval {
 1397:     SELECT a FROM t1 WHERE rowid > 65536 ORDER BY rowid DESC
 1398:   }
 1399: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15}
 1400: do_test boundary1-2.12.gt.5 {
 1401:   db eval {
 1402:     SELECT a FROM t1 WHERE rowid > 65536 ORDER BY x
 1403:   }
 1404: } {15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1405: do_test boundary1-2.12.ge.1 {
 1406:   db eval {
 1407:     SELECT a FROM t1 WHERE rowid >= 65536 ORDER BY a
 1408:   }
 1409: } {3 6 7 9 10 12 13 14 15 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 42 43 45 46 51 56 57 62}
 1410: do_test boundary1-2.12.ge.2 {
 1411:   db eval {
 1412:     SELECT a FROM t1 WHERE rowid >= 65536 ORDER BY a DESC
 1413:   }
 1414: } {62 57 56 51 46 45 43 42 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 15 14 13 12 10 9 7 6 3}
 1415: do_test boundary1-2.12.ge.3 {
 1416:   db eval {
 1417:     SELECT a FROM t1 WHERE rowid >= 65536 ORDER BY rowid
 1418:   }
 1419: } {62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1420: do_test boundary1-2.12.ge.4 {
 1421:   db eval {
 1422:     SELECT a FROM t1 WHERE rowid >= 65536 ORDER BY rowid DESC
 1423:   }
 1424: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62}
 1425: do_test boundary1-2.12.ge.5 {
 1426:   db eval {
 1427:     SELECT a FROM t1 WHERE rowid >= 65536 ORDER BY x
 1428:   }
 1429: } {62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1430: do_test boundary1-2.12.lt.1 {
 1431:   db eval {
 1432:     SELECT a FROM t1 WHERE rowid < 65536 ORDER BY a
 1433:   }
 1434: } {1 2 4 5 8 11 16 21 23 29 30 31 32 33 37 38 41 44 47 48 49 50 52 53 54 55 58 59 60 61 63 64}
 1435: do_test boundary1-2.12.lt.2 {
 1436:   db eval {
 1437:     SELECT a FROM t1 WHERE rowid < 65536 ORDER BY a DESC
 1438:   }
 1439: } {64 63 61 60 59 58 55 54 53 52 50 49 48 47 44 41 38 37 33 32 31 30 29 23 21 16 11 8 5 4 2 1}
 1440: do_test boundary1-2.12.lt.3 {
 1441:   db eval {
 1442:     SELECT a FROM t1 WHERE rowid < 65536 ORDER BY rowid
 1443:   }
 1444: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48}
 1445: do_test boundary1-2.12.lt.4 {
 1446:   db eval {
 1447:     SELECT a FROM t1 WHERE rowid < 65536 ORDER BY rowid DESC
 1448:   }
 1449: } {48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 1450: do_test boundary1-2.12.lt.5 {
 1451:   db eval {
 1452:     SELECT a FROM t1 WHERE rowid < 65536 ORDER BY x
 1453:   }
 1454: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 1455: do_test boundary1-2.12.le.1 {
 1456:   db eval {
 1457:     SELECT a FROM t1 WHERE rowid <= 65536 ORDER BY a
 1458:   }
 1459: } {1 2 4 5 8 11 16 21 23 29 30 31 32 33 37 38 41 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 1460: do_test boundary1-2.12.le.2 {
 1461:   db eval {
 1462:     SELECT a FROM t1 WHERE rowid <= 65536 ORDER BY a DESC
 1463:   }
 1464: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 41 38 37 33 32 31 30 29 23 21 16 11 8 5 4 2 1}
 1465: do_test boundary1-2.12.le.3 {
 1466:   db eval {
 1467:     SELECT a FROM t1 WHERE rowid <= 65536 ORDER BY rowid
 1468:   }
 1469: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62}
 1470: do_test boundary1-2.12.le.4 {
 1471:   db eval {
 1472:     SELECT a FROM t1 WHERE rowid <= 65536 ORDER BY rowid DESC
 1473:   }
 1474: } {62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 1475: do_test boundary1-2.12.le.5 {
 1476:   db eval {
 1477:     SELECT a FROM t1 WHERE rowid <= 65536 ORDER BY x
 1478:   }
 1479: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 1480: do_test boundary1-2.13.1 {
 1481:   db eval {
 1482:     SELECT * FROM t1 WHERE rowid=268435456
 1483:   }
 1484: } {40 0000000010000000}
 1485: do_test boundary1-2.13.2 {
 1486:   db eval {
 1487:     SELECT rowid, a FROM t1 WHERE x='0000000010000000'
 1488:   }
 1489: } {268435456 40}
 1490: do_test boundary1-2.13.3 {
 1491:   db eval {
 1492:     SELECT rowid, x FROM t1 WHERE a=40
 1493:   }
 1494: } {268435456 0000000010000000}
 1495: do_test boundary1-2.13.gt.1 {
 1496:   db eval {
 1497:     SELECT a FROM t1 WHERE rowid > 268435456 ORDER BY a
 1498:   }
 1499: } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
 1500: do_test boundary1-2.13.gt.2 {
 1501:   db eval {
 1502:     SELECT a FROM t1 WHERE rowid > 268435456 ORDER BY a DESC
 1503:   }
 1504: } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
 1505: do_test boundary1-2.13.gt.3 {
 1506:   db eval {
 1507:     SELECT a FROM t1 WHERE rowid > 268435456 ORDER BY rowid
 1508:   }
 1509: } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1510: do_test boundary1-2.13.gt.4 {
 1511:   db eval {
 1512:     SELECT a FROM t1 WHERE rowid > 268435456 ORDER BY rowid DESC
 1513:   }
 1514: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20}
 1515: do_test boundary1-2.13.gt.5 {
 1516:   db eval {
 1517:     SELECT a FROM t1 WHERE rowid > 268435456 ORDER BY x
 1518:   }
 1519: } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1520: do_test boundary1-2.13.ge.1 {
 1521:   db eval {
 1522:     SELECT a FROM t1 WHERE rowid >= 268435456 ORDER BY a
 1523:   }
 1524: } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
 1525: do_test boundary1-2.13.ge.2 {
 1526:   db eval {
 1527:     SELECT a FROM t1 WHERE rowid >= 268435456 ORDER BY a DESC
 1528:   }
 1529: } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
 1530: do_test boundary1-2.13.ge.3 {
 1531:   db eval {
 1532:     SELECT a FROM t1 WHERE rowid >= 268435456 ORDER BY rowid
 1533:   }
 1534: } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1535: do_test boundary1-2.13.ge.4 {
 1536:   db eval {
 1537:     SELECT a FROM t1 WHERE rowid >= 268435456 ORDER BY rowid DESC
 1538:   }
 1539: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40}
 1540: do_test boundary1-2.13.ge.5 {
 1541:   db eval {
 1542:     SELECT a FROM t1 WHERE rowid >= 268435456 ORDER BY x
 1543:   }
 1544: } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1545: do_test boundary1-2.13.lt.1 {
 1546:   db eval {
 1547:     SELECT a FROM t1 WHERE rowid < 268435456 ORDER BY a
 1548:   }
 1549: } {1 2 4 5 6 8 9 11 12 15 16 18 21 23 24 29 30 31 32 33 37 38 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 1550: do_test boundary1-2.13.lt.2 {
 1551:   db eval {
 1552:     SELECT a FROM t1 WHERE rowid < 268435456 ORDER BY a DESC
 1553:   }
 1554: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 38 37 33 32 31 30 29 24 23 21 18 16 15 12 11 9 8 6 5 4 2 1}
 1555: do_test boundary1-2.13.lt.3 {
 1556:   db eval {
 1557:     SELECT a FROM t1 WHERE rowid < 268435456 ORDER BY rowid
 1558:   }
 1559: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12}
 1560: do_test boundary1-2.13.lt.4 {
 1561:   db eval {
 1562:     SELECT a FROM t1 WHERE rowid < 268435456 ORDER BY rowid DESC
 1563:   }
 1564: } {12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 1565: do_test boundary1-2.13.lt.5 {
 1566:   db eval {
 1567:     SELECT a FROM t1 WHERE rowid < 268435456 ORDER BY x
 1568:   }
 1569: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 1570: do_test boundary1-2.13.le.1 {
 1571:   db eval {
 1572:     SELECT a FROM t1 WHERE rowid <= 268435456 ORDER BY a
 1573:   }
 1574: } {1 2 4 5 6 8 9 11 12 15 16 18 21 23 24 29 30 31 32 33 37 38 40 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 1575: do_test boundary1-2.13.le.2 {
 1576:   db eval {
 1577:     SELECT a FROM t1 WHERE rowid <= 268435456 ORDER BY a DESC
 1578:   }
 1579: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 40 38 37 33 32 31 30 29 24 23 21 18 16 15 12 11 9 8 6 5 4 2 1}
 1580: do_test boundary1-2.13.le.3 {
 1581:   db eval {
 1582:     SELECT a FROM t1 WHERE rowid <= 268435456 ORDER BY rowid
 1583:   }
 1584: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40}
 1585: do_test boundary1-2.13.le.4 {
 1586:   db eval {
 1587:     SELECT a FROM t1 WHERE rowid <= 268435456 ORDER BY rowid DESC
 1588:   }
 1589: } {40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 1590: do_test boundary1-2.13.le.5 {
 1591:   db eval {
 1592:     SELECT a FROM t1 WHERE rowid <= 268435456 ORDER BY x
 1593:   }
 1594: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 1595: do_test boundary1-2.14.1 {
 1596:   db eval {
 1597:     SELECT * FROM t1 WHERE rowid=-140737488355328
 1598:   }
 1599: } {44 ffff800000000000}
 1600: do_test boundary1-2.14.2 {
 1601:   db eval {
 1602:     SELECT rowid, a FROM t1 WHERE x='ffff800000000000'
 1603:   }
 1604: } {-140737488355328 44}
 1605: do_test boundary1-2.14.3 {
 1606:   db eval {
 1607:     SELECT rowid, x FROM t1 WHERE a=44
 1608:   }
 1609: } {-140737488355328 ffff800000000000}
 1610: do_test boundary1-2.14.gt.1 {
 1611:   db eval {
 1612:     SELECT a FROM t1 WHERE rowid > -140737488355328 ORDER BY a
 1613:   }
 1614: } {1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 45 46 47 48 49 50 51 52 53 54 56 57 58 59 60 61 62 63}
 1615: do_test boundary1-2.14.gt.2 {
 1616:   db eval {
 1617:     SELECT a FROM t1 WHERE rowid > -140737488355328 ORDER BY a DESC
 1618:   }
 1619: } {63 62 61 60 59 58 57 56 54 53 52 51 50 49 48 47 46 45 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 1}
 1620: do_test boundary1-2.14.gt.3 {
 1621:   db eval {
 1622:     SELECT a FROM t1 WHERE rowid > -140737488355328 ORDER BY rowid
 1623:   }
 1624: } {58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1625: do_test boundary1-2.14.gt.4 {
 1626:   db eval {
 1627:     SELECT a FROM t1 WHERE rowid > -140737488355328 ORDER BY rowid DESC
 1628:   }
 1629: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58}
 1630: do_test boundary1-2.14.gt.5 {
 1631:   db eval {
 1632:     SELECT a FROM t1 WHERE rowid > -140737488355328 ORDER BY x
 1633:   }
 1634: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 58 63 47 11 1 37 29 32 54 53 52 33 38}
 1635: do_test boundary1-2.14.ge.1 {
 1636:   db eval {
 1637:     SELECT a FROM t1 WHERE rowid >= -140737488355328 ORDER BY a
 1638:   }
 1639: } {1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 56 57 58 59 60 61 62 63}
 1640: do_test boundary1-2.14.ge.2 {
 1641:   db eval {
 1642:     SELECT a FROM t1 WHERE rowid >= -140737488355328 ORDER BY a DESC
 1643:   }
 1644: } {63 62 61 60 59 58 57 56 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 1}
 1645: do_test boundary1-2.14.ge.3 {
 1646:   db eval {
 1647:     SELECT a FROM t1 WHERE rowid >= -140737488355328 ORDER BY rowid
 1648:   }
 1649: } {44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1650: do_test boundary1-2.14.ge.4 {
 1651:   db eval {
 1652:     SELECT a FROM t1 WHERE rowid >= -140737488355328 ORDER BY rowid DESC
 1653:   }
 1654: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44}
 1655: do_test boundary1-2.14.ge.5 {
 1656:   db eval {
 1657:     SELECT a FROM t1 WHERE rowid >= -140737488355328 ORDER BY x
 1658:   }
 1659: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 1660: do_test boundary1-2.14.lt.1 {
 1661:   db eval {
 1662:     SELECT a FROM t1 WHERE rowid < -140737488355328 ORDER BY a
 1663:   }
 1664: } {2 21 55 64}
 1665: do_test boundary1-2.14.lt.2 {
 1666:   db eval {
 1667:     SELECT a FROM t1 WHERE rowid < -140737488355328 ORDER BY a DESC
 1668:   }
 1669: } {64 55 21 2}
 1670: do_test boundary1-2.14.lt.3 {
 1671:   db eval {
 1672:     SELECT a FROM t1 WHERE rowid < -140737488355328 ORDER BY rowid
 1673:   }
 1674: } {55 2 64 21}
 1675: do_test boundary1-2.14.lt.4 {
 1676:   db eval {
 1677:     SELECT a FROM t1 WHERE rowid < -140737488355328 ORDER BY rowid DESC
 1678:   }
 1679: } {21 64 2 55}
 1680: do_test boundary1-2.14.lt.5 {
 1681:   db eval {
 1682:     SELECT a FROM t1 WHERE rowid < -140737488355328 ORDER BY x
 1683:   }
 1684: } {55 2 64 21}
 1685: do_test boundary1-2.14.le.1 {
 1686:   db eval {
 1687:     SELECT a FROM t1 WHERE rowid <= -140737488355328 ORDER BY a
 1688:   }
 1689: } {2 21 44 55 64}
 1690: do_test boundary1-2.14.le.2 {
 1691:   db eval {
 1692:     SELECT a FROM t1 WHERE rowid <= -140737488355328 ORDER BY a DESC
 1693:   }
 1694: } {64 55 44 21 2}
 1695: do_test boundary1-2.14.le.3 {
 1696:   db eval {
 1697:     SELECT a FROM t1 WHERE rowid <= -140737488355328 ORDER BY rowid
 1698:   }
 1699: } {55 2 64 21 44}
 1700: do_test boundary1-2.14.le.4 {
 1701:   db eval {
 1702:     SELECT a FROM t1 WHERE rowid <= -140737488355328 ORDER BY rowid DESC
 1703:   }
 1704: } {44 21 64 2 55}
 1705: do_test boundary1-2.14.le.5 {
 1706:   db eval {
 1707:     SELECT a FROM t1 WHERE rowid <= -140737488355328 ORDER BY x
 1708:   }
 1709: } {55 2 64 21 44}
 1710: do_test boundary1-2.15.1 {
 1711:   db eval {
 1712:     SELECT * FROM t1 WHERE rowid=1099511627776
 1713:   }
 1714: } {19 0000010000000000}
 1715: do_test boundary1-2.15.2 {
 1716:   db eval {
 1717:     SELECT rowid, a FROM t1 WHERE x='0000010000000000'
 1718:   }
 1719: } {1099511627776 19}
 1720: do_test boundary1-2.15.3 {
 1721:   db eval {
 1722:     SELECT rowid, x FROM t1 WHERE a=19
 1723:   }
 1724: } {1099511627776 0000010000000000}
 1725: do_test boundary1-2.15.gt.1 {
 1726:   db eval {
 1727:     SELECT a FROM t1 WHERE rowid > 1099511627776 ORDER BY a
 1728:   }
 1729: } {3 7 10 13 17 25 26 27 28 34 43 45 56}
 1730: do_test boundary1-2.15.gt.2 {
 1731:   db eval {
 1732:     SELECT a FROM t1 WHERE rowid > 1099511627776 ORDER BY a DESC
 1733:   }
 1734: } {56 45 43 34 28 27 26 25 17 13 10 7 3}
 1735: do_test boundary1-2.15.gt.3 {
 1736:   db eval {
 1737:     SELECT a FROM t1 WHERE rowid > 1099511627776 ORDER BY rowid
 1738:   }
 1739: } {7 56 25 34 10 26 13 43 27 45 17 28 3}
 1740: do_test boundary1-2.15.gt.4 {
 1741:   db eval {
 1742:     SELECT a FROM t1 WHERE rowid > 1099511627776 ORDER BY rowid DESC
 1743:   }
 1744: } {3 28 17 45 27 43 13 26 10 34 25 56 7}
 1745: do_test boundary1-2.15.gt.5 {
 1746:   db eval {
 1747:     SELECT a FROM t1 WHERE rowid > 1099511627776 ORDER BY x
 1748:   }
 1749: } {7 56 25 34 10 26 13 43 27 45 17 28 3}
 1750: do_test boundary1-2.15.ge.1 {
 1751:   db eval {
 1752:     SELECT a FROM t1 WHERE rowid >= 1099511627776 ORDER BY a
 1753:   }
 1754: } {3 7 10 13 17 19 25 26 27 28 34 43 45 56}
 1755: do_test boundary1-2.15.ge.2 {
 1756:   db eval {
 1757:     SELECT a FROM t1 WHERE rowid >= 1099511627776 ORDER BY a DESC
 1758:   }
 1759: } {56 45 43 34 28 27 26 25 19 17 13 10 7 3}
 1760: do_test boundary1-2.15.ge.3 {
 1761:   db eval {
 1762:     SELECT a FROM t1 WHERE rowid >= 1099511627776 ORDER BY rowid
 1763:   }
 1764: } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1765: do_test boundary1-2.15.ge.4 {
 1766:   db eval {
 1767:     SELECT a FROM t1 WHERE rowid >= 1099511627776 ORDER BY rowid DESC
 1768:   }
 1769: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19}
 1770: do_test boundary1-2.15.ge.5 {
 1771:   db eval {
 1772:     SELECT a FROM t1 WHERE rowid >= 1099511627776 ORDER BY x
 1773:   }
 1774: } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1775: do_test boundary1-2.15.lt.1 {
 1776:   db eval {
 1777:     SELECT a FROM t1 WHERE rowid < 1099511627776 ORDER BY a
 1778:   }
 1779: } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64}
 1780: do_test boundary1-2.15.lt.2 {
 1781:   db eval {
 1782:     SELECT a FROM t1 WHERE rowid < 1099511627776 ORDER BY a DESC
 1783:   }
 1784: } {64 63 62 61 60 59 58 57 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
 1785: do_test boundary1-2.15.lt.3 {
 1786:   db eval {
 1787:     SELECT a FROM t1 WHERE rowid < 1099511627776 ORDER BY rowid
 1788:   }
 1789: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57}
 1790: do_test boundary1-2.15.lt.4 {
 1791:   db eval {
 1792:     SELECT a FROM t1 WHERE rowid < 1099511627776 ORDER BY rowid DESC
 1793:   }
 1794: } {57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 1795: do_test boundary1-2.15.lt.5 {
 1796:   db eval {
 1797:     SELECT a FROM t1 WHERE rowid < 1099511627776 ORDER BY x
 1798:   }
 1799: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 1800: do_test boundary1-2.15.le.1 {
 1801:   db eval {
 1802:     SELECT a FROM t1 WHERE rowid <= 1099511627776 ORDER BY a
 1803:   }
 1804: } {1 2 4 5 6 8 9 11 12 14 15 16 18 19 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64}
 1805: do_test boundary1-2.15.le.2 {
 1806:   db eval {
 1807:     SELECT a FROM t1 WHERE rowid <= 1099511627776 ORDER BY a DESC
 1808:   }
 1809: } {64 63 62 61 60 59 58 57 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 19 18 16 15 14 12 11 9 8 6 5 4 2 1}
 1810: do_test boundary1-2.15.le.3 {
 1811:   db eval {
 1812:     SELECT a FROM t1 WHERE rowid <= 1099511627776 ORDER BY rowid
 1813:   }
 1814: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19}
 1815: do_test boundary1-2.15.le.4 {
 1816:   db eval {
 1817:     SELECT a FROM t1 WHERE rowid <= 1099511627776 ORDER BY rowid DESC
 1818:   }
 1819: } {19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 1820: do_test boundary1-2.15.le.5 {
 1821:   db eval {
 1822:     SELECT a FROM t1 WHERE rowid <= 1099511627776 ORDER BY x
 1823:   }
 1824: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 1825: do_test boundary1-2.16.gt.1 {
 1826:   db eval {
 1827:     SELECT a FROM t1 WHERE rowid > 9223372036854775807 ORDER BY a
 1828:   }
 1829: } {}
 1830: do_test boundary1-2.16.gt.2 {
 1831:   db eval {
 1832:     SELECT a FROM t1 WHERE rowid > 9223372036854775807 ORDER BY a DESC
 1833:   }
 1834: } {}
 1835: do_test boundary1-2.16.gt.3 {
 1836:   db eval {
 1837:     SELECT a FROM t1 WHERE rowid > 9223372036854775807 ORDER BY rowid
 1838:   }
 1839: } {}
 1840: do_test boundary1-2.16.gt.4 {
 1841:   db eval {
 1842:     SELECT a FROM t1 WHERE rowid > 9223372036854775807 ORDER BY rowid DESC
 1843:   }
 1844: } {}
 1845: do_test boundary1-2.16.gt.5 {
 1846:   db eval {
 1847:     SELECT a FROM t1 WHERE rowid > 9223372036854775807 ORDER BY x
 1848:   }
 1849: } {}
 1850: do_test boundary1-2.16.ge.1 {
 1851:   db eval {
 1852:     SELECT a FROM t1 WHERE rowid >= 9223372036854775807 ORDER BY a
 1853:   }
 1854: } {3}
 1855: do_test boundary1-2.16.ge.2 {
 1856:   db eval {
 1857:     SELECT a FROM t1 WHERE rowid >= 9223372036854775807 ORDER BY a DESC
 1858:   }
 1859: } {3}
 1860: do_test boundary1-2.16.ge.3 {
 1861:   db eval {
 1862:     SELECT a FROM t1 WHERE rowid >= 9223372036854775807 ORDER BY rowid
 1863:   }
 1864: } {3}
 1865: do_test boundary1-2.16.ge.4 {
 1866:   db eval {
 1867:     SELECT a FROM t1 WHERE rowid >= 9223372036854775807 ORDER BY rowid DESC
 1868:   }
 1869: } {3}
 1870: do_test boundary1-2.16.ge.5 {
 1871:   db eval {
 1872:     SELECT a FROM t1 WHERE rowid >= 9223372036854775807 ORDER BY x
 1873:   }
 1874: } {3}
 1875: do_test boundary1-2.16.lt.1 {
 1876:   db eval {
 1877:     SELECT a FROM t1 WHERE rowid < 9223372036854775807 ORDER BY a
 1878:   }
 1879: } {1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 1880: do_test boundary1-2.16.lt.2 {
 1881:   db eval {
 1882:     SELECT a FROM t1 WHERE rowid < 9223372036854775807 ORDER BY a DESC
 1883:   }
 1884: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 2 1}
 1885: do_test boundary1-2.16.lt.3 {
 1886:   db eval {
 1887:     SELECT a FROM t1 WHERE rowid < 9223372036854775807 ORDER BY rowid
 1888:   }
 1889: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28}
 1890: do_test boundary1-2.16.lt.4 {
 1891:   db eval {
 1892:     SELECT a FROM t1 WHERE rowid < 9223372036854775807 ORDER BY rowid DESC
 1893:   }
 1894: } {28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 1895: do_test boundary1-2.16.lt.5 {
 1896:   db eval {
 1897:     SELECT a FROM t1 WHERE rowid < 9223372036854775807 ORDER BY x
 1898:   }
 1899: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 1900: do_test boundary1-2.16.le.1 {
 1901:   db eval {
 1902:     SELECT a FROM t1 WHERE rowid <= 9223372036854775807 ORDER BY a
 1903:   }
 1904: } {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 1905: do_test boundary1-2.16.le.2 {
 1906:   db eval {
 1907:     SELECT a FROM t1 WHERE rowid <= 9223372036854775807 ORDER BY a DESC
 1908:   }
 1909: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1}
 1910: do_test boundary1-2.16.le.3 {
 1911:   db eval {
 1912:     SELECT a FROM t1 WHERE rowid <= 9223372036854775807 ORDER BY rowid
 1913:   }
 1914: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1915: do_test boundary1-2.16.le.4 {
 1916:   db eval {
 1917:     SELECT a FROM t1 WHERE rowid <= 9223372036854775807 ORDER BY rowid DESC
 1918:   }
 1919: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 1920: do_test boundary1-2.16.le.5 {
 1921:   db eval {
 1922:     SELECT a FROM t1 WHERE rowid <= 9223372036854775807 ORDER BY x
 1923:   }
 1924: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 1925: do_test boundary1-2.17.1 {
 1926:   db eval {
 1927:     SELECT * FROM t1 WHERE rowid=32768
 1928:   }
 1929: } {50 0000000000008000}
 1930: do_test boundary1-2.17.2 {
 1931:   db eval {
 1932:     SELECT rowid, a FROM t1 WHERE x='0000000000008000'
 1933:   }
 1934: } {32768 50}
 1935: do_test boundary1-2.17.3 {
 1936:   db eval {
 1937:     SELECT rowid, x FROM t1 WHERE a=50
 1938:   }
 1939: } {32768 0000000000008000}
 1940: do_test boundary1-2.17.gt.1 {
 1941:   db eval {
 1942:     SELECT a FROM t1 WHERE rowid > 32768 ORDER BY a
 1943:   }
 1944: } {3 6 7 9 10 12 13 14 15 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 42 43 45 46 48 51 56 57 62}
 1945: do_test boundary1-2.17.gt.2 {
 1946:   db eval {
 1947:     SELECT a FROM t1 WHERE rowid > 32768 ORDER BY a DESC
 1948:   }
 1949: } {62 57 56 51 48 46 45 43 42 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 15 14 13 12 10 9 7 6 3}
 1950: do_test boundary1-2.17.gt.3 {
 1951:   db eval {
 1952:     SELECT a FROM t1 WHERE rowid > 32768 ORDER BY rowid
 1953:   }
 1954: } {48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1955: do_test boundary1-2.17.gt.4 {
 1956:   db eval {
 1957:     SELECT a FROM t1 WHERE rowid > 32768 ORDER BY rowid DESC
 1958:   }
 1959: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48}
 1960: do_test boundary1-2.17.gt.5 {
 1961:   db eval {
 1962:     SELECT a FROM t1 WHERE rowid > 32768 ORDER BY x
 1963:   }
 1964: } {48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1965: do_test boundary1-2.17.ge.1 {
 1966:   db eval {
 1967:     SELECT a FROM t1 WHERE rowid >= 32768 ORDER BY a
 1968:   }
 1969: } {3 6 7 9 10 12 13 14 15 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 42 43 45 46 48 50 51 56 57 62}
 1970: do_test boundary1-2.17.ge.2 {
 1971:   db eval {
 1972:     SELECT a FROM t1 WHERE rowid >= 32768 ORDER BY a DESC
 1973:   }
 1974: } {62 57 56 51 50 48 46 45 43 42 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 15 14 13 12 10 9 7 6 3}
 1975: do_test boundary1-2.17.ge.3 {
 1976:   db eval {
 1977:     SELECT a FROM t1 WHERE rowid >= 32768 ORDER BY rowid
 1978:   }
 1979: } {50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1980: do_test boundary1-2.17.ge.4 {
 1981:   db eval {
 1982:     SELECT a FROM t1 WHERE rowid >= 32768 ORDER BY rowid DESC
 1983:   }
 1984: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50}
 1985: do_test boundary1-2.17.ge.5 {
 1986:   db eval {
 1987:     SELECT a FROM t1 WHERE rowid >= 32768 ORDER BY x
 1988:   }
 1989: } {50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 1990: do_test boundary1-2.17.lt.1 {
 1991:   db eval {
 1992:     SELECT a FROM t1 WHERE rowid < 32768 ORDER BY a
 1993:   }
 1994: } {1 2 4 5 8 11 16 21 23 29 30 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 61 63 64}
 1995: do_test boundary1-2.17.lt.2 {
 1996:   db eval {
 1997:     SELECT a FROM t1 WHERE rowid < 32768 ORDER BY a DESC
 1998:   }
 1999: } {64 63 61 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 30 29 23 21 16 11 8 5 4 2 1}
 2000: do_test boundary1-2.17.lt.3 {
 2001:   db eval {
 2002:     SELECT a FROM t1 WHERE rowid < 32768 ORDER BY rowid
 2003:   }
 2004: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23}
 2005: do_test boundary1-2.17.lt.4 {
 2006:   db eval {
 2007:     SELECT a FROM t1 WHERE rowid < 32768 ORDER BY rowid DESC
 2008:   }
 2009: } {23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 2010: do_test boundary1-2.17.lt.5 {
 2011:   db eval {
 2012:     SELECT a FROM t1 WHERE rowid < 32768 ORDER BY x
 2013:   }
 2014: } {59 60 41 5 31 4 49 30 61 8 16 23 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 2015: do_test boundary1-2.17.le.1 {
 2016:   db eval {
 2017:     SELECT a FROM t1 WHERE rowid <= 32768 ORDER BY a
 2018:   }
 2019: } {1 2 4 5 8 11 16 21 23 29 30 31 32 33 37 38 41 44 47 49 50 52 53 54 55 58 59 60 61 63 64}
 2020: do_test boundary1-2.17.le.2 {
 2021:   db eval {
 2022:     SELECT a FROM t1 WHERE rowid <= 32768 ORDER BY a DESC
 2023:   }
 2024: } {64 63 61 60 59 58 55 54 53 52 50 49 47 44 41 38 37 33 32 31 30 29 23 21 16 11 8 5 4 2 1}
 2025: do_test boundary1-2.17.le.3 {
 2026:   db eval {
 2027:     SELECT a FROM t1 WHERE rowid <= 32768 ORDER BY rowid
 2028:   }
 2029: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50}
 2030: do_test boundary1-2.17.le.4 {
 2031:   db eval {
 2032:     SELECT a FROM t1 WHERE rowid <= 32768 ORDER BY rowid DESC
 2033:   }
 2034: } {50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 2035: do_test boundary1-2.17.le.5 {
 2036:   db eval {
 2037:     SELECT a FROM t1 WHERE rowid <= 32768 ORDER BY x
 2038:   }
 2039: } {59 60 41 5 31 4 49 30 61 8 16 23 50 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 2040: do_test boundary1-2.18.1 {
 2041:   db eval {
 2042:     SELECT * FROM t1 WHERE rowid=-36028797018963968
 2043:   }
 2044: } {64 ff80000000000000}
 2045: do_test boundary1-2.18.2 {
 2046:   db eval {
 2047:     SELECT rowid, a FROM t1 WHERE x='ff80000000000000'
 2048:   }
 2049: } {-36028797018963968 64}
 2050: do_test boundary1-2.18.3 {
 2051:   db eval {
 2052:     SELECT rowid, x FROM t1 WHERE a=64
 2053:   }
 2054: } {-36028797018963968 ff80000000000000}
 2055: do_test boundary1-2.18.gt.1 {
 2056:   db eval {
 2057:     SELECT a FROM t1 WHERE rowid > -36028797018963968 ORDER BY a
 2058:   }
 2059: } {1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 56 57 58 59 60 61 62 63}
 2060: do_test boundary1-2.18.gt.2 {
 2061:   db eval {
 2062:     SELECT a FROM t1 WHERE rowid > -36028797018963968 ORDER BY a DESC
 2063:   }
 2064: } {63 62 61 60 59 58 57 56 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 1}
 2065: do_test boundary1-2.18.gt.3 {
 2066:   db eval {
 2067:     SELECT a FROM t1 WHERE rowid > -36028797018963968 ORDER BY rowid
 2068:   }
 2069: } {21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2070: do_test boundary1-2.18.gt.4 {
 2071:   db eval {
 2072:     SELECT a FROM t1 WHERE rowid > -36028797018963968 ORDER BY rowid DESC
 2073:   }
 2074: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21}
 2075: do_test boundary1-2.18.gt.5 {
 2076:   db eval {
 2077:     SELECT a FROM t1 WHERE rowid > -36028797018963968 ORDER BY x
 2078:   }
 2079: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 2080: do_test boundary1-2.18.ge.1 {
 2081:   db eval {
 2082:     SELECT a FROM t1 WHERE rowid >= -36028797018963968 ORDER BY a
 2083:   }
 2084: } {1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 56 57 58 59 60 61 62 63 64}
 2085: do_test boundary1-2.18.ge.2 {
 2086:   db eval {
 2087:     SELECT a FROM t1 WHERE rowid >= -36028797018963968 ORDER BY a DESC
 2088:   }
 2089: } {64 63 62 61 60 59 58 57 56 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 1}
 2090: do_test boundary1-2.18.ge.3 {
 2091:   db eval {
 2092:     SELECT a FROM t1 WHERE rowid >= -36028797018963968 ORDER BY rowid
 2093:   }
 2094: } {64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2095: do_test boundary1-2.18.ge.4 {
 2096:   db eval {
 2097:     SELECT a FROM t1 WHERE rowid >= -36028797018963968 ORDER BY rowid DESC
 2098:   }
 2099: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64}
 2100: do_test boundary1-2.18.ge.5 {
 2101:   db eval {
 2102:     SELECT a FROM t1 WHERE rowid >= -36028797018963968 ORDER BY x
 2103:   }
 2104: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 2105: do_test boundary1-2.18.lt.1 {
 2106:   db eval {
 2107:     SELECT a FROM t1 WHERE rowid < -36028797018963968 ORDER BY a
 2108:   }
 2109: } {2 55}
 2110: do_test boundary1-2.18.lt.2 {
 2111:   db eval {
 2112:     SELECT a FROM t1 WHERE rowid < -36028797018963968 ORDER BY a DESC
 2113:   }
 2114: } {55 2}
 2115: do_test boundary1-2.18.lt.3 {
 2116:   db eval {
 2117:     SELECT a FROM t1 WHERE rowid < -36028797018963968 ORDER BY rowid
 2118:   }
 2119: } {55 2}
 2120: do_test boundary1-2.18.lt.4 {
 2121:   db eval {
 2122:     SELECT a FROM t1 WHERE rowid < -36028797018963968 ORDER BY rowid DESC
 2123:   }
 2124: } {2 55}
 2125: do_test boundary1-2.18.lt.5 {
 2126:   db eval {
 2127:     SELECT a FROM t1 WHERE rowid < -36028797018963968 ORDER BY x
 2128:   }
 2129: } {55 2}
 2130: do_test boundary1-2.18.le.1 {
 2131:   db eval {
 2132:     SELECT a FROM t1 WHERE rowid <= -36028797018963968 ORDER BY a
 2133:   }
 2134: } {2 55 64}
 2135: do_test boundary1-2.18.le.2 {
 2136:   db eval {
 2137:     SELECT a FROM t1 WHERE rowid <= -36028797018963968 ORDER BY a DESC
 2138:   }
 2139: } {64 55 2}
 2140: do_test boundary1-2.18.le.3 {
 2141:   db eval {
 2142:     SELECT a FROM t1 WHERE rowid <= -36028797018963968 ORDER BY rowid
 2143:   }
 2144: } {55 2 64}
 2145: do_test boundary1-2.18.le.4 {
 2146:   db eval {
 2147:     SELECT a FROM t1 WHERE rowid <= -36028797018963968 ORDER BY rowid DESC
 2148:   }
 2149: } {64 2 55}
 2150: do_test boundary1-2.18.le.5 {
 2151:   db eval {
 2152:     SELECT a FROM t1 WHERE rowid <= -36028797018963968 ORDER BY x
 2153:   }
 2154: } {55 2 64}
 2155: do_test boundary1-2.19.1 {
 2156:   db eval {
 2157:     SELECT * FROM t1 WHERE rowid=65535
 2158:   }
 2159: } {48 000000000000ffff}
 2160: do_test boundary1-2.19.2 {
 2161:   db eval {
 2162:     SELECT rowid, a FROM t1 WHERE x='000000000000ffff'
 2163:   }
 2164: } {65535 48}
 2165: do_test boundary1-2.19.3 {
 2166:   db eval {
 2167:     SELECT rowid, x FROM t1 WHERE a=48
 2168:   }
 2169: } {65535 000000000000ffff}
 2170: do_test boundary1-2.19.gt.1 {
 2171:   db eval {
 2172:     SELECT a FROM t1 WHERE rowid > 65535 ORDER BY a
 2173:   }
 2174: } {3 6 7 9 10 12 13 14 15 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 42 43 45 46 51 56 57 62}
 2175: do_test boundary1-2.19.gt.2 {
 2176:   db eval {
 2177:     SELECT a FROM t1 WHERE rowid > 65535 ORDER BY a DESC
 2178:   }
 2179: } {62 57 56 51 46 45 43 42 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 15 14 13 12 10 9 7 6 3}
 2180: do_test boundary1-2.19.gt.3 {
 2181:   db eval {
 2182:     SELECT a FROM t1 WHERE rowid > 65535 ORDER BY rowid
 2183:   }
 2184: } {62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2185: do_test boundary1-2.19.gt.4 {
 2186:   db eval {
 2187:     SELECT a FROM t1 WHERE rowid > 65535 ORDER BY rowid DESC
 2188:   }
 2189: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62}
 2190: do_test boundary1-2.19.gt.5 {
 2191:   db eval {
 2192:     SELECT a FROM t1 WHERE rowid > 65535 ORDER BY x
 2193:   }
 2194: } {62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2195: do_test boundary1-2.19.ge.1 {
 2196:   db eval {
 2197:     SELECT a FROM t1 WHERE rowid >= 65535 ORDER BY a
 2198:   }
 2199: } {3 6 7 9 10 12 13 14 15 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 42 43 45 46 48 51 56 57 62}
 2200: do_test boundary1-2.19.ge.2 {
 2201:   db eval {
 2202:     SELECT a FROM t1 WHERE rowid >= 65535 ORDER BY a DESC
 2203:   }
 2204: } {62 57 56 51 48 46 45 43 42 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 15 14 13 12 10 9 7 6 3}
 2205: do_test boundary1-2.19.ge.3 {
 2206:   db eval {
 2207:     SELECT a FROM t1 WHERE rowid >= 65535 ORDER BY rowid
 2208:   }
 2209: } {48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2210: do_test boundary1-2.19.ge.4 {
 2211:   db eval {
 2212:     SELECT a FROM t1 WHERE rowid >= 65535 ORDER BY rowid DESC
 2213:   }
 2214: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48}
 2215: do_test boundary1-2.19.ge.5 {
 2216:   db eval {
 2217:     SELECT a FROM t1 WHERE rowid >= 65535 ORDER BY x
 2218:   }
 2219: } {48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2220: do_test boundary1-2.19.lt.1 {
 2221:   db eval {
 2222:     SELECT a FROM t1 WHERE rowid < 65535 ORDER BY a
 2223:   }
 2224: } {1 2 4 5 8 11 16 21 23 29 30 31 32 33 37 38 41 44 47 49 50 52 53 54 55 58 59 60 61 63 64}
 2225: do_test boundary1-2.19.lt.2 {
 2226:   db eval {
 2227:     SELECT a FROM t1 WHERE rowid < 65535 ORDER BY a DESC
 2228:   }
 2229: } {64 63 61 60 59 58 55 54 53 52 50 49 47 44 41 38 37 33 32 31 30 29 23 21 16 11 8 5 4 2 1}
 2230: do_test boundary1-2.19.lt.3 {
 2231:   db eval {
 2232:     SELECT a FROM t1 WHERE rowid < 65535 ORDER BY rowid
 2233:   }
 2234: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50}
 2235: do_test boundary1-2.19.lt.4 {
 2236:   db eval {
 2237:     SELECT a FROM t1 WHERE rowid < 65535 ORDER BY rowid DESC
 2238:   }
 2239: } {50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 2240: do_test boundary1-2.19.lt.5 {
 2241:   db eval {
 2242:     SELECT a FROM t1 WHERE rowid < 65535 ORDER BY x
 2243:   }
 2244: } {59 60 41 5 31 4 49 30 61 8 16 23 50 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 2245: do_test boundary1-2.19.le.1 {
 2246:   db eval {
 2247:     SELECT a FROM t1 WHERE rowid <= 65535 ORDER BY a
 2248:   }
 2249: } {1 2 4 5 8 11 16 21 23 29 30 31 32 33 37 38 41 44 47 48 49 50 52 53 54 55 58 59 60 61 63 64}
 2250: do_test boundary1-2.19.le.2 {
 2251:   db eval {
 2252:     SELECT a FROM t1 WHERE rowid <= 65535 ORDER BY a DESC
 2253:   }
 2254: } {64 63 61 60 59 58 55 54 53 52 50 49 48 47 44 41 38 37 33 32 31 30 29 23 21 16 11 8 5 4 2 1}
 2255: do_test boundary1-2.19.le.3 {
 2256:   db eval {
 2257:     SELECT a FROM t1 WHERE rowid <= 65535 ORDER BY rowid
 2258:   }
 2259: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48}
 2260: do_test boundary1-2.19.le.4 {
 2261:   db eval {
 2262:     SELECT a FROM t1 WHERE rowid <= 65535 ORDER BY rowid DESC
 2263:   }
 2264: } {48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 2265: do_test boundary1-2.19.le.5 {
 2266:   db eval {
 2267:     SELECT a FROM t1 WHERE rowid <= 65535 ORDER BY x
 2268:   }
 2269: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 2270: do_test boundary1-2.20.1 {
 2271:   db eval {
 2272:     SELECT * FROM t1 WHERE rowid=4294967295
 2273:   }
 2274: } {14 00000000ffffffff}
 2275: do_test boundary1-2.20.2 {
 2276:   db eval {
 2277:     SELECT rowid, a FROM t1 WHERE x='00000000ffffffff'
 2278:   }
 2279: } {4294967295 14}
 2280: do_test boundary1-2.20.3 {
 2281:   db eval {
 2282:     SELECT rowid, x FROM t1 WHERE a=14
 2283:   }
 2284: } {4294967295 00000000ffffffff}
 2285: do_test boundary1-2.20.gt.1 {
 2286:   db eval {
 2287:     SELECT a FROM t1 WHERE rowid > 4294967295 ORDER BY a
 2288:   }
 2289: } {3 7 10 13 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
 2290: do_test boundary1-2.20.gt.2 {
 2291:   db eval {
 2292:     SELECT a FROM t1 WHERE rowid > 4294967295 ORDER BY a DESC
 2293:   }
 2294: } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 13 10 7 3}
 2295: do_test boundary1-2.20.gt.3 {
 2296:   db eval {
 2297:     SELECT a FROM t1 WHERE rowid > 4294967295 ORDER BY rowid
 2298:   }
 2299: } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2300: do_test boundary1-2.20.gt.4 {
 2301:   db eval {
 2302:     SELECT a FROM t1 WHERE rowid > 4294967295 ORDER BY rowid DESC
 2303:   }
 2304: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36}
 2305: do_test boundary1-2.20.gt.5 {
 2306:   db eval {
 2307:     SELECT a FROM t1 WHERE rowid > 4294967295 ORDER BY x
 2308:   }
 2309: } {36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2310: do_test boundary1-2.20.ge.1 {
 2311:   db eval {
 2312:     SELECT a FROM t1 WHERE rowid >= 4294967295 ORDER BY a
 2313:   }
 2314: } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
 2315: do_test boundary1-2.20.ge.2 {
 2316:   db eval {
 2317:     SELECT a FROM t1 WHERE rowid >= 4294967295 ORDER BY a DESC
 2318:   }
 2319: } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
 2320: do_test boundary1-2.20.ge.3 {
 2321:   db eval {
 2322:     SELECT a FROM t1 WHERE rowid >= 4294967295 ORDER BY rowid
 2323:   }
 2324: } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2325: do_test boundary1-2.20.ge.4 {
 2326:   db eval {
 2327:     SELECT a FROM t1 WHERE rowid >= 4294967295 ORDER BY rowid DESC
 2328:   }
 2329: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14}
 2330: do_test boundary1-2.20.ge.5 {
 2331:   db eval {
 2332:     SELECT a FROM t1 WHERE rowid >= 4294967295 ORDER BY x
 2333:   }
 2334: } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2335: do_test boundary1-2.20.lt.1 {
 2336:   db eval {
 2337:     SELECT a FROM t1 WHERE rowid < 4294967295 ORDER BY a
 2338:   }
 2339: } {1 2 4 5 6 8 9 11 12 15 16 18 20 21 23 24 29 30 31 32 33 37 38 40 41 42 44 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
 2340: do_test boundary1-2.20.lt.2 {
 2341:   db eval {
 2342:     SELECT a FROM t1 WHERE rowid < 4294967295 ORDER BY a DESC
 2343:   }
 2344: } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 44 42 41 40 38 37 33 32 31 30 29 24 23 21 20 18 16 15 12 11 9 8 6 5 4 2 1}
 2345: do_test boundary1-2.20.lt.3 {
 2346:   db eval {
 2347:     SELECT a FROM t1 WHERE rowid < 4294967295 ORDER BY rowid
 2348:   }
 2349: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51}
 2350: do_test boundary1-2.20.lt.4 {
 2351:   db eval {
 2352:     SELECT a FROM t1 WHERE rowid < 4294967295 ORDER BY rowid DESC
 2353:   }
 2354: } {51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 2355: do_test boundary1-2.20.lt.5 {
 2356:   db eval {
 2357:     SELECT a FROM t1 WHERE rowid < 4294967295 ORDER BY x
 2358:   }
 2359: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 2360: do_test boundary1-2.20.le.1 {
 2361:   db eval {
 2362:     SELECT a FROM t1 WHERE rowid <= 4294967295 ORDER BY a
 2363:   }
 2364: } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 23 24 29 30 31 32 33 37 38 40 41 42 44 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
 2365: do_test boundary1-2.20.le.2 {
 2366:   db eval {
 2367:     SELECT a FROM t1 WHERE rowid <= 4294967295 ORDER BY a DESC
 2368:   }
 2369: } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 44 42 41 40 38 37 33 32 31 30 29 24 23 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
 2370: do_test boundary1-2.20.le.3 {
 2371:   db eval {
 2372:     SELECT a FROM t1 WHERE rowid <= 4294967295 ORDER BY rowid
 2373:   }
 2374: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14}
 2375: do_test boundary1-2.20.le.4 {
 2376:   db eval {
 2377:     SELECT a FROM t1 WHERE rowid <= 4294967295 ORDER BY rowid DESC
 2378:   }
 2379: } {14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 2380: do_test boundary1-2.20.le.5 {
 2381:   db eval {
 2382:     SELECT a FROM t1 WHERE rowid <= 4294967295 ORDER BY x
 2383:   }
 2384: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 2385: do_test boundary1-2.21.1 {
 2386:   db eval {
 2387:     SELECT * FROM t1 WHERE rowid=1099511627775
 2388:   }
 2389: } {57 000000ffffffffff}
 2390: do_test boundary1-2.21.2 {
 2391:   db eval {
 2392:     SELECT rowid, a FROM t1 WHERE x='000000ffffffffff'
 2393:   }
 2394: } {1099511627775 57}
 2395: do_test boundary1-2.21.3 {
 2396:   db eval {
 2397:     SELECT rowid, x FROM t1 WHERE a=57
 2398:   }
 2399: } {1099511627775 000000ffffffffff}
 2400: do_test boundary1-2.21.gt.1 {
 2401:   db eval {
 2402:     SELECT a FROM t1 WHERE rowid > 1099511627775 ORDER BY a
 2403:   }
 2404: } {3 7 10 13 17 19 25 26 27 28 34 43 45 56}
 2405: do_test boundary1-2.21.gt.2 {
 2406:   db eval {
 2407:     SELECT a FROM t1 WHERE rowid > 1099511627775 ORDER BY a DESC
 2408:   }
 2409: } {56 45 43 34 28 27 26 25 19 17 13 10 7 3}
 2410: do_test boundary1-2.21.gt.3 {
 2411:   db eval {
 2412:     SELECT a FROM t1 WHERE rowid > 1099511627775 ORDER BY rowid
 2413:   }
 2414: } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2415: do_test boundary1-2.21.gt.4 {
 2416:   db eval {
 2417:     SELECT a FROM t1 WHERE rowid > 1099511627775 ORDER BY rowid DESC
 2418:   }
 2419: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19}
 2420: do_test boundary1-2.21.gt.5 {
 2421:   db eval {
 2422:     SELECT a FROM t1 WHERE rowid > 1099511627775 ORDER BY x
 2423:   }
 2424: } {19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2425: do_test boundary1-2.21.ge.1 {
 2426:   db eval {
 2427:     SELECT a FROM t1 WHERE rowid >= 1099511627775 ORDER BY a
 2428:   }
 2429: } {3 7 10 13 17 19 25 26 27 28 34 43 45 56 57}
 2430: do_test boundary1-2.21.ge.2 {
 2431:   db eval {
 2432:     SELECT a FROM t1 WHERE rowid >= 1099511627775 ORDER BY a DESC
 2433:   }
 2434: } {57 56 45 43 34 28 27 26 25 19 17 13 10 7 3}
 2435: do_test boundary1-2.21.ge.3 {
 2436:   db eval {
 2437:     SELECT a FROM t1 WHERE rowid >= 1099511627775 ORDER BY rowid
 2438:   }
 2439: } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2440: do_test boundary1-2.21.ge.4 {
 2441:   db eval {
 2442:     SELECT a FROM t1 WHERE rowid >= 1099511627775 ORDER BY rowid DESC
 2443:   }
 2444: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57}
 2445: do_test boundary1-2.21.ge.5 {
 2446:   db eval {
 2447:     SELECT a FROM t1 WHERE rowid >= 1099511627775 ORDER BY x
 2448:   }
 2449: } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2450: do_test boundary1-2.21.lt.1 {
 2451:   db eval {
 2452:     SELECT a FROM t1 WHERE rowid < 1099511627775 ORDER BY a
 2453:   }
 2454: } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
 2455: do_test boundary1-2.21.lt.2 {
 2456:   db eval {
 2457:     SELECT a FROM t1 WHERE rowid < 1099511627775 ORDER BY a DESC
 2458:   }
 2459: } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
 2460: do_test boundary1-2.21.lt.3 {
 2461:   db eval {
 2462:     SELECT a FROM t1 WHERE rowid < 1099511627775 ORDER BY rowid
 2463:   }
 2464: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35}
 2465: do_test boundary1-2.21.lt.4 {
 2466:   db eval {
 2467:     SELECT a FROM t1 WHERE rowid < 1099511627775 ORDER BY rowid DESC
 2468:   }
 2469: } {35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 2470: do_test boundary1-2.21.lt.5 {
 2471:   db eval {
 2472:     SELECT a FROM t1 WHERE rowid < 1099511627775 ORDER BY x
 2473:   }
 2474: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 2475: do_test boundary1-2.21.le.1 {
 2476:   db eval {
 2477:     SELECT a FROM t1 WHERE rowid <= 1099511627775 ORDER BY a
 2478:   }
 2479: } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64}
 2480: do_test boundary1-2.21.le.2 {
 2481:   db eval {
 2482:     SELECT a FROM t1 WHERE rowid <= 1099511627775 ORDER BY a DESC
 2483:   }
 2484: } {64 63 62 61 60 59 58 57 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
 2485: do_test boundary1-2.21.le.3 {
 2486:   db eval {
 2487:     SELECT a FROM t1 WHERE rowid <= 1099511627775 ORDER BY rowid
 2488:   }
 2489: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57}
 2490: do_test boundary1-2.21.le.4 {
 2491:   db eval {
 2492:     SELECT a FROM t1 WHERE rowid <= 1099511627775 ORDER BY rowid DESC
 2493:   }
 2494: } {57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 2495: do_test boundary1-2.21.le.5 {
 2496:   db eval {
 2497:     SELECT a FROM t1 WHERE rowid <= 1099511627775 ORDER BY x
 2498:   }
 2499: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 2500: do_test boundary1-2.22.1 {
 2501:   db eval {
 2502:     SELECT * FROM t1 WHERE rowid=-8388608
 2503:   }
 2504: } {37 ffffffffff800000}
 2505: do_test boundary1-2.22.2 {
 2506:   db eval {
 2507:     SELECT rowid, a FROM t1 WHERE x='ffffffffff800000'
 2508:   }
 2509: } {-8388608 37}
 2510: do_test boundary1-2.22.3 {
 2511:   db eval {
 2512:     SELECT rowid, x FROM t1 WHERE a=37
 2513:   }
 2514: } {-8388608 ffffffffff800000}
 2515: do_test boundary1-2.22.gt.1 {
 2516:   db eval {
 2517:     SELECT a FROM t1 WHERE rowid > -8388608 ORDER BY a
 2518:   }
 2519: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
 2520: do_test boundary1-2.22.gt.2 {
 2521:   db eval {
 2522:     SELECT a FROM t1 WHERE rowid > -8388608 ORDER BY a DESC
 2523:   }
 2524: } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 2525: do_test boundary1-2.22.gt.3 {
 2526:   db eval {
 2527:     SELECT a FROM t1 WHERE rowid > -8388608 ORDER BY rowid
 2528:   }
 2529: } {29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2530: do_test boundary1-2.22.gt.4 {
 2531:   db eval {
 2532:     SELECT a FROM t1 WHERE rowid > -8388608 ORDER BY rowid DESC
 2533:   }
 2534: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29}
 2535: do_test boundary1-2.22.gt.5 {
 2536:   db eval {
 2537:     SELECT a FROM t1 WHERE rowid > -8388608 ORDER BY x
 2538:   }
 2539: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 29 32 54 53 52 33 38}
 2540: do_test boundary1-2.22.ge.1 {
 2541:   db eval {
 2542:     SELECT a FROM t1 WHERE rowid >= -8388608 ORDER BY a
 2543:   }
 2544: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
 2545: do_test boundary1-2.22.ge.2 {
 2546:   db eval {
 2547:     SELECT a FROM t1 WHERE rowid >= -8388608 ORDER BY a DESC
 2548:   }
 2549: } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 2550: do_test boundary1-2.22.ge.3 {
 2551:   db eval {
 2552:     SELECT a FROM t1 WHERE rowid >= -8388608 ORDER BY rowid
 2553:   }
 2554: } {37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2555: do_test boundary1-2.22.ge.4 {
 2556:   db eval {
 2557:     SELECT a FROM t1 WHERE rowid >= -8388608 ORDER BY rowid DESC
 2558:   }
 2559: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37}
 2560: do_test boundary1-2.22.ge.5 {
 2561:   db eval {
 2562:     SELECT a FROM t1 WHERE rowid >= -8388608 ORDER BY x
 2563:   }
 2564: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 37 29 32 54 53 52 33 38}
 2565: do_test boundary1-2.22.lt.1 {
 2566:   db eval {
 2567:     SELECT a FROM t1 WHERE rowid < -8388608 ORDER BY a
 2568:   }
 2569: } {1 2 11 21 44 47 55 58 63 64}
 2570: do_test boundary1-2.22.lt.2 {
 2571:   db eval {
 2572:     SELECT a FROM t1 WHERE rowid < -8388608 ORDER BY a DESC
 2573:   }
 2574: } {64 63 58 55 47 44 21 11 2 1}
 2575: do_test boundary1-2.22.lt.3 {
 2576:   db eval {
 2577:     SELECT a FROM t1 WHERE rowid < -8388608 ORDER BY rowid
 2578:   }
 2579: } {55 2 64 21 44 58 63 47 11 1}
 2580: do_test boundary1-2.22.lt.4 {
 2581:   db eval {
 2582:     SELECT a FROM t1 WHERE rowid < -8388608 ORDER BY rowid DESC
 2583:   }
 2584: } {1 11 47 63 58 44 21 64 2 55}
 2585: do_test boundary1-2.22.lt.5 {
 2586:   db eval {
 2587:     SELECT a FROM t1 WHERE rowid < -8388608 ORDER BY x
 2588:   }
 2589: } {55 2 64 21 44 58 63 47 11 1}
 2590: do_test boundary1-2.22.le.1 {
 2591:   db eval {
 2592:     SELECT a FROM t1 WHERE rowid <= -8388608 ORDER BY a
 2593:   }
 2594: } {1 2 11 21 37 44 47 55 58 63 64}
 2595: do_test boundary1-2.22.le.2 {
 2596:   db eval {
 2597:     SELECT a FROM t1 WHERE rowid <= -8388608 ORDER BY a DESC
 2598:   }
 2599: } {64 63 58 55 47 44 37 21 11 2 1}
 2600: do_test boundary1-2.22.le.3 {
 2601:   db eval {
 2602:     SELECT a FROM t1 WHERE rowid <= -8388608 ORDER BY rowid
 2603:   }
 2604: } {55 2 64 21 44 58 63 47 11 1 37}
 2605: do_test boundary1-2.22.le.4 {
 2606:   db eval {
 2607:     SELECT a FROM t1 WHERE rowid <= -8388608 ORDER BY rowid DESC
 2608:   }
 2609: } {37 1 11 47 63 58 44 21 64 2 55}
 2610: do_test boundary1-2.22.le.5 {
 2611:   db eval {
 2612:     SELECT a FROM t1 WHERE rowid <= -8388608 ORDER BY x
 2613:   }
 2614: } {55 2 64 21 44 58 63 47 11 1 37}
 2615: do_test boundary1-2.23.1 {
 2616:   db eval {
 2617:     SELECT * FROM t1 WHERE rowid=549755813888
 2618:   }
 2619: } {35 0000008000000000}
 2620: do_test boundary1-2.23.2 {
 2621:   db eval {
 2622:     SELECT rowid, a FROM t1 WHERE x='0000008000000000'
 2623:   }
 2624: } {549755813888 35}
 2625: do_test boundary1-2.23.3 {
 2626:   db eval {
 2627:     SELECT rowid, x FROM t1 WHERE a=35
 2628:   }
 2629: } {549755813888 0000008000000000}
 2630: do_test boundary1-2.23.gt.1 {
 2631:   db eval {
 2632:     SELECT a FROM t1 WHERE rowid > 549755813888 ORDER BY a
 2633:   }
 2634: } {3 7 10 13 17 19 25 26 27 28 34 43 45 56 57}
 2635: do_test boundary1-2.23.gt.2 {
 2636:   db eval {
 2637:     SELECT a FROM t1 WHERE rowid > 549755813888 ORDER BY a DESC
 2638:   }
 2639: } {57 56 45 43 34 28 27 26 25 19 17 13 10 7 3}
 2640: do_test boundary1-2.23.gt.3 {
 2641:   db eval {
 2642:     SELECT a FROM t1 WHERE rowid > 549755813888 ORDER BY rowid
 2643:   }
 2644: } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2645: do_test boundary1-2.23.gt.4 {
 2646:   db eval {
 2647:     SELECT a FROM t1 WHERE rowid > 549755813888 ORDER BY rowid DESC
 2648:   }
 2649: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57}
 2650: do_test boundary1-2.23.gt.5 {
 2651:   db eval {
 2652:     SELECT a FROM t1 WHERE rowid > 549755813888 ORDER BY x
 2653:   }
 2654: } {57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2655: do_test boundary1-2.23.ge.1 {
 2656:   db eval {
 2657:     SELECT a FROM t1 WHERE rowid >= 549755813888 ORDER BY a
 2658:   }
 2659: } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 56 57}
 2660: do_test boundary1-2.23.ge.2 {
 2661:   db eval {
 2662:     SELECT a FROM t1 WHERE rowid >= 549755813888 ORDER BY a DESC
 2663:   }
 2664: } {57 56 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
 2665: do_test boundary1-2.23.ge.3 {
 2666:   db eval {
 2667:     SELECT a FROM t1 WHERE rowid >= 549755813888 ORDER BY rowid
 2668:   }
 2669: } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2670: do_test boundary1-2.23.ge.4 {
 2671:   db eval {
 2672:     SELECT a FROM t1 WHERE rowid >= 549755813888 ORDER BY rowid DESC
 2673:   }
 2674: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35}
 2675: do_test boundary1-2.23.ge.5 {
 2676:   db eval {
 2677:     SELECT a FROM t1 WHERE rowid >= 549755813888 ORDER BY x
 2678:   }
 2679: } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2680: do_test boundary1-2.23.lt.1 {
 2681:   db eval {
 2682:     SELECT a FROM t1 WHERE rowid < 549755813888 ORDER BY a
 2683:   }
 2684: } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 22 23 24 29 30 31 32 33 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
 2685: do_test boundary1-2.23.lt.2 {
 2686:   db eval {
 2687:     SELECT a FROM t1 WHERE rowid < 549755813888 ORDER BY a DESC
 2688:   }
 2689: } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 33 32 31 30 29 24 23 22 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
 2690: do_test boundary1-2.23.lt.3 {
 2691:   db eval {
 2692:     SELECT a FROM t1 WHERE rowid < 549755813888 ORDER BY rowid
 2693:   }
 2694: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46}
 2695: do_test boundary1-2.23.lt.4 {
 2696:   db eval {
 2697:     SELECT a FROM t1 WHERE rowid < 549755813888 ORDER BY rowid DESC
 2698:   }
 2699: } {46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 2700: do_test boundary1-2.23.lt.5 {
 2701:   db eval {
 2702:     SELECT a FROM t1 WHERE rowid < 549755813888 ORDER BY x
 2703:   }
 2704: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 2705: do_test boundary1-2.23.le.1 {
 2706:   db eval {
 2707:     SELECT a FROM t1 WHERE rowid <= 549755813888 ORDER BY a
 2708:   }
 2709: } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
 2710: do_test boundary1-2.23.le.2 {
 2711:   db eval {
 2712:     SELECT a FROM t1 WHERE rowid <= 549755813888 ORDER BY a DESC
 2713:   }
 2714: } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
 2715: do_test boundary1-2.23.le.3 {
 2716:   db eval {
 2717:     SELECT a FROM t1 WHERE rowid <= 549755813888 ORDER BY rowid
 2718:   }
 2719: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35}
 2720: do_test boundary1-2.23.le.4 {
 2721:   db eval {
 2722:     SELECT a FROM t1 WHERE rowid <= 549755813888 ORDER BY rowid DESC
 2723:   }
 2724: } {35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 2725: do_test boundary1-2.23.le.5 {
 2726:   db eval {
 2727:     SELECT a FROM t1 WHERE rowid <= 549755813888 ORDER BY x
 2728:   }
 2729: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 2730: do_test boundary1-2.24.1 {
 2731:   db eval {
 2732:     SELECT * FROM t1 WHERE rowid=8388607
 2733:   }
 2734: } {18 00000000007fffff}
 2735: do_test boundary1-2.24.2 {
 2736:   db eval {
 2737:     SELECT rowid, a FROM t1 WHERE x='00000000007fffff'
 2738:   }
 2739: } {8388607 18}
 2740: do_test boundary1-2.24.3 {
 2741:   db eval {
 2742:     SELECT rowid, x FROM t1 WHERE a=18
 2743:   }
 2744: } {8388607 00000000007fffff}
 2745: do_test boundary1-2.24.gt.1 {
 2746:   db eval {
 2747:     SELECT a FROM t1 WHERE rowid > 8388607 ORDER BY a
 2748:   }
 2749: } {3 6 7 9 10 12 13 14 17 19 20 22 24 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
 2750: do_test boundary1-2.24.gt.2 {
 2751:   db eval {
 2752:     SELECT a FROM t1 WHERE rowid > 8388607 ORDER BY a DESC
 2753:   }
 2754: } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 24 22 20 19 17 14 13 12 10 9 7 6 3}
 2755: do_test boundary1-2.24.gt.3 {
 2756:   db eval {
 2757:     SELECT a FROM t1 WHERE rowid > 8388607 ORDER BY rowid
 2758:   }
 2759: } {24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2760: do_test boundary1-2.24.gt.4 {
 2761:   db eval {
 2762:     SELECT a FROM t1 WHERE rowid > 8388607 ORDER BY rowid DESC
 2763:   }
 2764: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24}
 2765: do_test boundary1-2.24.gt.5 {
 2766:   db eval {
 2767:     SELECT a FROM t1 WHERE rowid > 8388607 ORDER BY x
 2768:   }
 2769: } {24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2770: do_test boundary1-2.24.ge.1 {
 2771:   db eval {
 2772:     SELECT a FROM t1 WHERE rowid >= 8388607 ORDER BY a
 2773:   }
 2774: } {3 6 7 9 10 12 13 14 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
 2775: do_test boundary1-2.24.ge.2 {
 2776:   db eval {
 2777:     SELECT a FROM t1 WHERE rowid >= 8388607 ORDER BY a DESC
 2778:   }
 2779: } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 14 13 12 10 9 7 6 3}
 2780: do_test boundary1-2.24.ge.3 {
 2781:   db eval {
 2782:     SELECT a FROM t1 WHERE rowid >= 8388607 ORDER BY rowid
 2783:   }
 2784: } {18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2785: do_test boundary1-2.24.ge.4 {
 2786:   db eval {
 2787:     SELECT a FROM t1 WHERE rowid >= 8388607 ORDER BY rowid DESC
 2788:   }
 2789: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18}
 2790: do_test boundary1-2.24.ge.5 {
 2791:   db eval {
 2792:     SELECT a FROM t1 WHERE rowid >= 8388607 ORDER BY x
 2793:   }
 2794: } {18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2795: do_test boundary1-2.24.lt.1 {
 2796:   db eval {
 2797:     SELECT a FROM t1 WHERE rowid < 8388607 ORDER BY a
 2798:   }
 2799: } {1 2 4 5 8 11 15 16 21 23 29 30 31 32 33 37 38 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 2800: do_test boundary1-2.24.lt.2 {
 2801:   db eval {
 2802:     SELECT a FROM t1 WHERE rowid < 8388607 ORDER BY a DESC
 2803:   }
 2804: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 38 37 33 32 31 30 29 23 21 16 15 11 8 5 4 2 1}
 2805: do_test boundary1-2.24.lt.3 {
 2806:   db eval {
 2807:     SELECT a FROM t1 WHERE rowid < 8388607 ORDER BY rowid
 2808:   }
 2809: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42}
 2810: do_test boundary1-2.24.lt.4 {
 2811:   db eval {
 2812:     SELECT a FROM t1 WHERE rowid < 8388607 ORDER BY rowid DESC
 2813:   }
 2814: } {42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 2815: do_test boundary1-2.24.lt.5 {
 2816:   db eval {
 2817:     SELECT a FROM t1 WHERE rowid < 8388607 ORDER BY x
 2818:   }
 2819: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 2820: do_test boundary1-2.24.le.1 {
 2821:   db eval {
 2822:     SELECT a FROM t1 WHERE rowid <= 8388607 ORDER BY a
 2823:   }
 2824: } {1 2 4 5 8 11 15 16 18 21 23 29 30 31 32 33 37 38 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 2825: do_test boundary1-2.24.le.2 {
 2826:   db eval {
 2827:     SELECT a FROM t1 WHERE rowid <= 8388607 ORDER BY a DESC
 2828:   }
 2829: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 38 37 33 32 31 30 29 23 21 18 16 15 11 8 5 4 2 1}
 2830: do_test boundary1-2.24.le.3 {
 2831:   db eval {
 2832:     SELECT a FROM t1 WHERE rowid <= 8388607 ORDER BY rowid
 2833:   }
 2834: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18}
 2835: do_test boundary1-2.24.le.4 {
 2836:   db eval {
 2837:     SELECT a FROM t1 WHERE rowid <= 8388607 ORDER BY rowid DESC
 2838:   }
 2839: } {18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 2840: do_test boundary1-2.24.le.5 {
 2841:   db eval {
 2842:     SELECT a FROM t1 WHERE rowid <= 8388607 ORDER BY x
 2843:   }
 2844: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 2845: do_test boundary1-2.25.1 {
 2846:   db eval {
 2847:     SELECT * FROM t1 WHERE rowid=-3
 2848:   }
 2849: } {52 fffffffffffffffd}
 2850: do_test boundary1-2.25.2 {
 2851:   db eval {
 2852:     SELECT rowid, a FROM t1 WHERE x='fffffffffffffffd'
 2853:   }
 2854: } {-3 52}
 2855: do_test boundary1-2.25.3 {
 2856:   db eval {
 2857:     SELECT rowid, x FROM t1 WHERE a=52
 2858:   }
 2859: } {-3 fffffffffffffffd}
 2860: do_test boundary1-2.25.gt.1 {
 2861:   db eval {
 2862:     SELECT a FROM t1 WHERE rowid > -3 ORDER BY a
 2863:   }
 2864: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 56 57 59 60 61 62}
 2865: do_test boundary1-2.25.gt.2 {
 2866:   db eval {
 2867:     SELECT a FROM t1 WHERE rowid > -3 ORDER BY a DESC
 2868:   }
 2869: } {62 61 60 59 57 56 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 2870: do_test boundary1-2.25.gt.3 {
 2871:   db eval {
 2872:     SELECT a FROM t1 WHERE rowid > -3 ORDER BY rowid
 2873:   }
 2874: } {33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2875: do_test boundary1-2.25.gt.4 {
 2876:   db eval {
 2877:     SELECT a FROM t1 WHERE rowid > -3 ORDER BY rowid DESC
 2878:   }
 2879: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33}
 2880: do_test boundary1-2.25.gt.5 {
 2881:   db eval {
 2882:     SELECT a FROM t1 WHERE rowid > -3 ORDER BY x
 2883:   }
 2884: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 33 38}
 2885: do_test boundary1-2.25.ge.1 {
 2886:   db eval {
 2887:     SELECT a FROM t1 WHERE rowid >= -3 ORDER BY a
 2888:   }
 2889: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 52 56 57 59 60 61 62}
 2890: do_test boundary1-2.25.ge.2 {
 2891:   db eval {
 2892:     SELECT a FROM t1 WHERE rowid >= -3 ORDER BY a DESC
 2893:   }
 2894: } {62 61 60 59 57 56 52 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 2895: do_test boundary1-2.25.ge.3 {
 2896:   db eval {
 2897:     SELECT a FROM t1 WHERE rowid >= -3 ORDER BY rowid
 2898:   }
 2899: } {52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2900: do_test boundary1-2.25.ge.4 {
 2901:   db eval {
 2902:     SELECT a FROM t1 WHERE rowid >= -3 ORDER BY rowid DESC
 2903:   }
 2904: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52}
 2905: do_test boundary1-2.25.ge.5 {
 2906:   db eval {
 2907:     SELECT a FROM t1 WHERE rowid >= -3 ORDER BY x
 2908:   }
 2909: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 52 33 38}
 2910: do_test boundary1-2.25.lt.1 {
 2911:   db eval {
 2912:     SELECT a FROM t1 WHERE rowid < -3 ORDER BY a
 2913:   }
 2914: } {1 2 11 21 29 32 37 44 47 53 54 55 58 63 64}
 2915: do_test boundary1-2.25.lt.2 {
 2916:   db eval {
 2917:     SELECT a FROM t1 WHERE rowid < -3 ORDER BY a DESC
 2918:   }
 2919: } {64 63 58 55 54 53 47 44 37 32 29 21 11 2 1}
 2920: do_test boundary1-2.25.lt.3 {
 2921:   db eval {
 2922:     SELECT a FROM t1 WHERE rowid < -3 ORDER BY rowid
 2923:   }
 2924: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
 2925: do_test boundary1-2.25.lt.4 {
 2926:   db eval {
 2927:     SELECT a FROM t1 WHERE rowid < -3 ORDER BY rowid DESC
 2928:   }
 2929: } {53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 2930: do_test boundary1-2.25.lt.5 {
 2931:   db eval {
 2932:     SELECT a FROM t1 WHERE rowid < -3 ORDER BY x
 2933:   }
 2934: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
 2935: do_test boundary1-2.25.le.1 {
 2936:   db eval {
 2937:     SELECT a FROM t1 WHERE rowid <= -3 ORDER BY a
 2938:   }
 2939: } {1 2 11 21 29 32 37 44 47 52 53 54 55 58 63 64}
 2940: do_test boundary1-2.25.le.2 {
 2941:   db eval {
 2942:     SELECT a FROM t1 WHERE rowid <= -3 ORDER BY a DESC
 2943:   }
 2944: } {64 63 58 55 54 53 52 47 44 37 32 29 21 11 2 1}
 2945: do_test boundary1-2.25.le.3 {
 2946:   db eval {
 2947:     SELECT a FROM t1 WHERE rowid <= -3 ORDER BY rowid
 2948:   }
 2949: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
 2950: do_test boundary1-2.25.le.4 {
 2951:   db eval {
 2952:     SELECT a FROM t1 WHERE rowid <= -3 ORDER BY rowid DESC
 2953:   }
 2954: } {52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 2955: do_test boundary1-2.25.le.5 {
 2956:   db eval {
 2957:     SELECT a FROM t1 WHERE rowid <= -3 ORDER BY x
 2958:   }
 2959: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
 2960: do_test boundary1-2.26.1 {
 2961:   db eval {
 2962:     SELECT * FROM t1 WHERE rowid=0
 2963:   }
 2964: } {59 0000000000000000}
 2965: do_test boundary1-2.26.2 {
 2966:   db eval {
 2967:     SELECT rowid, a FROM t1 WHERE x='0000000000000000'
 2968:   }
 2969: } {0 59}
 2970: do_test boundary1-2.26.3 {
 2971:   db eval {
 2972:     SELECT rowid, x FROM t1 WHERE a=59
 2973:   }
 2974: } {0 0000000000000000}
 2975: do_test boundary1-2.26.gt.1 {
 2976:   db eval {
 2977:     SELECT a FROM t1 WHERE rowid > 0 ORDER BY a
 2978:   }
 2979: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 34 35 36 39 40 41 42 43 45 46 48 49 50 51 56 57 60 61 62}
 2980: do_test boundary1-2.26.gt.2 {
 2981:   db eval {
 2982:     SELECT a FROM t1 WHERE rowid > 0 ORDER BY a DESC
 2983:   }
 2984: } {62 61 60 57 56 51 50 49 48 46 45 43 42 41 40 39 36 35 34 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 2985: do_test boundary1-2.26.gt.3 {
 2986:   db eval {
 2987:     SELECT a FROM t1 WHERE rowid > 0 ORDER BY rowid
 2988:   }
 2989: } {60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 2990: do_test boundary1-2.26.gt.4 {
 2991:   db eval {
 2992:     SELECT a FROM t1 WHERE rowid > 0 ORDER BY rowid DESC
 2993:   }
 2994: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60}
 2995: do_test boundary1-2.26.gt.5 {
 2996:   db eval {
 2997:     SELECT a FROM t1 WHERE rowid > 0 ORDER BY x
 2998:   }
 2999: } {60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3000: do_test boundary1-2.26.ge.1 {
 3001:   db eval {
 3002:     SELECT a FROM t1 WHERE rowid >= 0 ORDER BY a
 3003:   }
 3004: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 34 35 36 39 40 41 42 43 45 46 48 49 50 51 56 57 59 60 61 62}
 3005: do_test boundary1-2.26.ge.2 {
 3006:   db eval {
 3007:     SELECT a FROM t1 WHERE rowid >= 0 ORDER BY a DESC
 3008:   }
 3009: } {62 61 60 59 57 56 51 50 49 48 46 45 43 42 41 40 39 36 35 34 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 3010: do_test boundary1-2.26.ge.3 {
 3011:   db eval {
 3012:     SELECT a FROM t1 WHERE rowid >= 0 ORDER BY rowid
 3013:   }
 3014: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3015: do_test boundary1-2.26.ge.4 {
 3016:   db eval {
 3017:     SELECT a FROM t1 WHERE rowid >= 0 ORDER BY rowid DESC
 3018:   }
 3019: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59}
 3020: do_test boundary1-2.26.ge.5 {
 3021:   db eval {
 3022:     SELECT a FROM t1 WHERE rowid >= 0 ORDER BY x
 3023:   }
 3024: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3025: do_test boundary1-2.26.lt.1 {
 3026:   db eval {
 3027:     SELECT a FROM t1 WHERE rowid < 0 ORDER BY a
 3028:   }
 3029: } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 63 64}
 3030: do_test boundary1-2.26.lt.2 {
 3031:   db eval {
 3032:     SELECT a FROM t1 WHERE rowid < 0 ORDER BY a DESC
 3033:   }
 3034: } {64 63 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
 3035: do_test boundary1-2.26.lt.3 {
 3036:   db eval {
 3037:     SELECT a FROM t1 WHERE rowid < 0 ORDER BY rowid
 3038:   }
 3039: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 3040: do_test boundary1-2.26.lt.4 {
 3041:   db eval {
 3042:     SELECT a FROM t1 WHERE rowid < 0 ORDER BY rowid DESC
 3043:   }
 3044: } {38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 3045: do_test boundary1-2.26.lt.5 {
 3046:   db eval {
 3047:     SELECT a FROM t1 WHERE rowid < 0 ORDER BY x
 3048:   }
 3049: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 3050: do_test boundary1-2.26.le.1 {
 3051:   db eval {
 3052:     SELECT a FROM t1 WHERE rowid <= 0 ORDER BY a
 3053:   }
 3054: } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 63 64}
 3055: do_test boundary1-2.26.le.2 {
 3056:   db eval {
 3057:     SELECT a FROM t1 WHERE rowid <= 0 ORDER BY a DESC
 3058:   }
 3059: } {64 63 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
 3060: do_test boundary1-2.26.le.3 {
 3061:   db eval {
 3062:     SELECT a FROM t1 WHERE rowid <= 0 ORDER BY rowid
 3063:   }
 3064: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59}
 3065: do_test boundary1-2.26.le.4 {
 3066:   db eval {
 3067:     SELECT a FROM t1 WHERE rowid <= 0 ORDER BY rowid DESC
 3068:   }
 3069: } {59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 3070: do_test boundary1-2.26.le.5 {
 3071:   db eval {
 3072:     SELECT a FROM t1 WHERE rowid <= 0 ORDER BY x
 3073:   }
 3074: } {59 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 3075: do_test boundary1-2.27.1 {
 3076:   db eval {
 3077:     SELECT * FROM t1 WHERE rowid=-1
 3078:   }
 3079: } {38 ffffffffffffffff}
 3080: do_test boundary1-2.27.2 {
 3081:   db eval {
 3082:     SELECT rowid, a FROM t1 WHERE x='ffffffffffffffff'
 3083:   }
 3084: } {-1 38}
 3085: do_test boundary1-2.27.3 {
 3086:   db eval {
 3087:     SELECT rowid, x FROM t1 WHERE a=38
 3088:   }
 3089: } {-1 ffffffffffffffff}
 3090: do_test boundary1-2.27.gt.1 {
 3091:   db eval {
 3092:     SELECT a FROM t1 WHERE rowid > -1 ORDER BY a
 3093:   }
 3094: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 34 35 36 39 40 41 42 43 45 46 48 49 50 51 56 57 59 60 61 62}
 3095: do_test boundary1-2.27.gt.2 {
 3096:   db eval {
 3097:     SELECT a FROM t1 WHERE rowid > -1 ORDER BY a DESC
 3098:   }
 3099: } {62 61 60 59 57 56 51 50 49 48 46 45 43 42 41 40 39 36 35 34 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 3100: do_test boundary1-2.27.gt.3 {
 3101:   db eval {
 3102:     SELECT a FROM t1 WHERE rowid > -1 ORDER BY rowid
 3103:   }
 3104: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3105: do_test boundary1-2.27.gt.4 {
 3106:   db eval {
 3107:     SELECT a FROM t1 WHERE rowid > -1 ORDER BY rowid DESC
 3108:   }
 3109: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59}
 3110: do_test boundary1-2.27.gt.5 {
 3111:   db eval {
 3112:     SELECT a FROM t1 WHERE rowid > -1 ORDER BY x
 3113:   }
 3114: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3115: do_test boundary1-2.27.ge.1 {
 3116:   db eval {
 3117:     SELECT a FROM t1 WHERE rowid >= -1 ORDER BY a
 3118:   }
 3119: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 56 57 59 60 61 62}
 3120: do_test boundary1-2.27.ge.2 {
 3121:   db eval {
 3122:     SELECT a FROM t1 WHERE rowid >= -1 ORDER BY a DESC
 3123:   }
 3124: } {62 61 60 59 57 56 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 3125: do_test boundary1-2.27.ge.3 {
 3126:   db eval {
 3127:     SELECT a FROM t1 WHERE rowid >= -1 ORDER BY rowid
 3128:   }
 3129: } {38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3130: do_test boundary1-2.27.ge.4 {
 3131:   db eval {
 3132:     SELECT a FROM t1 WHERE rowid >= -1 ORDER BY rowid DESC
 3133:   }
 3134: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38}
 3135: do_test boundary1-2.27.ge.5 {
 3136:   db eval {
 3137:     SELECT a FROM t1 WHERE rowid >= -1 ORDER BY x
 3138:   }
 3139: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 38}
 3140: do_test boundary1-2.27.lt.1 {
 3141:   db eval {
 3142:     SELECT a FROM t1 WHERE rowid < -1 ORDER BY a
 3143:   }
 3144: } {1 2 11 21 29 32 33 37 44 47 52 53 54 55 58 63 64}
 3145: do_test boundary1-2.27.lt.2 {
 3146:   db eval {
 3147:     SELECT a FROM t1 WHERE rowid < -1 ORDER BY a DESC
 3148:   }
 3149: } {64 63 58 55 54 53 52 47 44 37 33 32 29 21 11 2 1}
 3150: do_test boundary1-2.27.lt.3 {
 3151:   db eval {
 3152:     SELECT a FROM t1 WHERE rowid < -1 ORDER BY rowid
 3153:   }
 3154: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
 3155: do_test boundary1-2.27.lt.4 {
 3156:   db eval {
 3157:     SELECT a FROM t1 WHERE rowid < -1 ORDER BY rowid DESC
 3158:   }
 3159: } {33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 3160: do_test boundary1-2.27.lt.5 {
 3161:   db eval {
 3162:     SELECT a FROM t1 WHERE rowid < -1 ORDER BY x
 3163:   }
 3164: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
 3165: do_test boundary1-2.27.le.1 {
 3166:   db eval {
 3167:     SELECT a FROM t1 WHERE rowid <= -1 ORDER BY a
 3168:   }
 3169: } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 63 64}
 3170: do_test boundary1-2.27.le.2 {
 3171:   db eval {
 3172:     SELECT a FROM t1 WHERE rowid <= -1 ORDER BY a DESC
 3173:   }
 3174: } {64 63 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
 3175: do_test boundary1-2.27.le.3 {
 3176:   db eval {
 3177:     SELECT a FROM t1 WHERE rowid <= -1 ORDER BY rowid
 3178:   }
 3179: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 3180: do_test boundary1-2.27.le.4 {
 3181:   db eval {
 3182:     SELECT a FROM t1 WHERE rowid <= -1 ORDER BY rowid DESC
 3183:   }
 3184: } {38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 3185: do_test boundary1-2.27.le.5 {
 3186:   db eval {
 3187:     SELECT a FROM t1 WHERE rowid <= -1 ORDER BY x
 3188:   }
 3189: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 3190: do_test boundary1-2.28.1 {
 3191:   db eval {
 3192:     SELECT * FROM t1 WHERE rowid=-2
 3193:   }
 3194: } {33 fffffffffffffffe}
 3195: do_test boundary1-2.28.2 {
 3196:   db eval {
 3197:     SELECT rowid, a FROM t1 WHERE x='fffffffffffffffe'
 3198:   }
 3199: } {-2 33}
 3200: do_test boundary1-2.28.3 {
 3201:   db eval {
 3202:     SELECT rowid, x FROM t1 WHERE a=33
 3203:   }
 3204: } {-2 fffffffffffffffe}
 3205: do_test boundary1-2.28.gt.1 {
 3206:   db eval {
 3207:     SELECT a FROM t1 WHERE rowid > -2 ORDER BY a
 3208:   }
 3209: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 56 57 59 60 61 62}
 3210: do_test boundary1-2.28.gt.2 {
 3211:   db eval {
 3212:     SELECT a FROM t1 WHERE rowid > -2 ORDER BY a DESC
 3213:   }
 3214: } {62 61 60 59 57 56 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 3215: do_test boundary1-2.28.gt.3 {
 3216:   db eval {
 3217:     SELECT a FROM t1 WHERE rowid > -2 ORDER BY rowid
 3218:   }
 3219: } {38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3220: do_test boundary1-2.28.gt.4 {
 3221:   db eval {
 3222:     SELECT a FROM t1 WHERE rowid > -2 ORDER BY rowid DESC
 3223:   }
 3224: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38}
 3225: do_test boundary1-2.28.gt.5 {
 3226:   db eval {
 3227:     SELECT a FROM t1 WHERE rowid > -2 ORDER BY x
 3228:   }
 3229: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 38}
 3230: do_test boundary1-2.28.ge.1 {
 3231:   db eval {
 3232:     SELECT a FROM t1 WHERE rowid >= -2 ORDER BY a
 3233:   }
 3234: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 56 57 59 60 61 62}
 3235: do_test boundary1-2.28.ge.2 {
 3236:   db eval {
 3237:     SELECT a FROM t1 WHERE rowid >= -2 ORDER BY a DESC
 3238:   }
 3239: } {62 61 60 59 57 56 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 3240: do_test boundary1-2.28.ge.3 {
 3241:   db eval {
 3242:     SELECT a FROM t1 WHERE rowid >= -2 ORDER BY rowid
 3243:   }
 3244: } {33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3245: do_test boundary1-2.28.ge.4 {
 3246:   db eval {
 3247:     SELECT a FROM t1 WHERE rowid >= -2 ORDER BY rowid DESC
 3248:   }
 3249: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33}
 3250: do_test boundary1-2.28.ge.5 {
 3251:   db eval {
 3252:     SELECT a FROM t1 WHERE rowid >= -2 ORDER BY x
 3253:   }
 3254: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 33 38}
 3255: do_test boundary1-2.28.lt.1 {
 3256:   db eval {
 3257:     SELECT a FROM t1 WHERE rowid < -2 ORDER BY a
 3258:   }
 3259: } {1 2 11 21 29 32 37 44 47 52 53 54 55 58 63 64}
 3260: do_test boundary1-2.28.lt.2 {
 3261:   db eval {
 3262:     SELECT a FROM t1 WHERE rowid < -2 ORDER BY a DESC
 3263:   }
 3264: } {64 63 58 55 54 53 52 47 44 37 32 29 21 11 2 1}
 3265: do_test boundary1-2.28.lt.3 {
 3266:   db eval {
 3267:     SELECT a FROM t1 WHERE rowid < -2 ORDER BY rowid
 3268:   }
 3269: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
 3270: do_test boundary1-2.28.lt.4 {
 3271:   db eval {
 3272:     SELECT a FROM t1 WHERE rowid < -2 ORDER BY rowid DESC
 3273:   }
 3274: } {52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 3275: do_test boundary1-2.28.lt.5 {
 3276:   db eval {
 3277:     SELECT a FROM t1 WHERE rowid < -2 ORDER BY x
 3278:   }
 3279: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52}
 3280: do_test boundary1-2.28.le.1 {
 3281:   db eval {
 3282:     SELECT a FROM t1 WHERE rowid <= -2 ORDER BY a
 3283:   }
 3284: } {1 2 11 21 29 32 33 37 44 47 52 53 54 55 58 63 64}
 3285: do_test boundary1-2.28.le.2 {
 3286:   db eval {
 3287:     SELECT a FROM t1 WHERE rowid <= -2 ORDER BY a DESC
 3288:   }
 3289: } {64 63 58 55 54 53 52 47 44 37 33 32 29 21 11 2 1}
 3290: do_test boundary1-2.28.le.3 {
 3291:   db eval {
 3292:     SELECT a FROM t1 WHERE rowid <= -2 ORDER BY rowid
 3293:   }
 3294: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
 3295: do_test boundary1-2.28.le.4 {
 3296:   db eval {
 3297:     SELECT a FROM t1 WHERE rowid <= -2 ORDER BY rowid DESC
 3298:   }
 3299: } {33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 3300: do_test boundary1-2.28.le.5 {
 3301:   db eval {
 3302:     SELECT a FROM t1 WHERE rowid <= -2 ORDER BY x
 3303:   }
 3304: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33}
 3305: do_test boundary1-2.29.1 {
 3306:   db eval {
 3307:     SELECT * FROM t1 WHERE rowid=2097152
 3308:   }
 3309: } {42 0000000000200000}
 3310: do_test boundary1-2.29.2 {
 3311:   db eval {
 3312:     SELECT rowid, a FROM t1 WHERE x='0000000000200000'
 3313:   }
 3314: } {2097152 42}
 3315: do_test boundary1-2.29.3 {
 3316:   db eval {
 3317:     SELECT rowid, x FROM t1 WHERE a=42
 3318:   }
 3319: } {2097152 0000000000200000}
 3320: do_test boundary1-2.29.gt.1 {
 3321:   db eval {
 3322:     SELECT a FROM t1 WHERE rowid > 2097152 ORDER BY a
 3323:   }
 3324: } {3 6 7 9 10 12 13 14 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
 3325: do_test boundary1-2.29.gt.2 {
 3326:   db eval {
 3327:     SELECT a FROM t1 WHERE rowid > 2097152 ORDER BY a DESC
 3328:   }
 3329: } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 14 13 12 10 9 7 6 3}
 3330: do_test boundary1-2.29.gt.3 {
 3331:   db eval {
 3332:     SELECT a FROM t1 WHERE rowid > 2097152 ORDER BY rowid
 3333:   }
 3334: } {18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3335: do_test boundary1-2.29.gt.4 {
 3336:   db eval {
 3337:     SELECT a FROM t1 WHERE rowid > 2097152 ORDER BY rowid DESC
 3338:   }
 3339: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18}
 3340: do_test boundary1-2.29.gt.5 {
 3341:   db eval {
 3342:     SELECT a FROM t1 WHERE rowid > 2097152 ORDER BY x
 3343:   }
 3344: } {18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3345: do_test boundary1-2.29.ge.1 {
 3346:   db eval {
 3347:     SELECT a FROM t1 WHERE rowid >= 2097152 ORDER BY a
 3348:   }
 3349: } {3 6 7 9 10 12 13 14 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 42 43 45 46 51 56 57}
 3350: do_test boundary1-2.29.ge.2 {
 3351:   db eval {
 3352:     SELECT a FROM t1 WHERE rowid >= 2097152 ORDER BY a DESC
 3353:   }
 3354: } {57 56 51 46 45 43 42 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 14 13 12 10 9 7 6 3}
 3355: do_test boundary1-2.29.ge.3 {
 3356:   db eval {
 3357:     SELECT a FROM t1 WHERE rowid >= 2097152 ORDER BY rowid
 3358:   }
 3359: } {42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3360: do_test boundary1-2.29.ge.4 {
 3361:   db eval {
 3362:     SELECT a FROM t1 WHERE rowid >= 2097152 ORDER BY rowid DESC
 3363:   }
 3364: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42}
 3365: do_test boundary1-2.29.ge.5 {
 3366:   db eval {
 3367:     SELECT a FROM t1 WHERE rowid >= 2097152 ORDER BY x
 3368:   }
 3369: } {42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3370: do_test boundary1-2.29.lt.1 {
 3371:   db eval {
 3372:     SELECT a FROM t1 WHERE rowid < 2097152 ORDER BY a
 3373:   }
 3374: } {1 2 4 5 8 11 15 16 21 23 29 30 31 32 33 37 38 41 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 3375: do_test boundary1-2.29.lt.2 {
 3376:   db eval {
 3377:     SELECT a FROM t1 WHERE rowid < 2097152 ORDER BY a DESC
 3378:   }
 3379: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 41 38 37 33 32 31 30 29 23 21 16 15 11 8 5 4 2 1}
 3380: do_test boundary1-2.29.lt.3 {
 3381:   db eval {
 3382:     SELECT a FROM t1 WHERE rowid < 2097152 ORDER BY rowid
 3383:   }
 3384: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15}
 3385: do_test boundary1-2.29.lt.4 {
 3386:   db eval {
 3387:     SELECT a FROM t1 WHERE rowid < 2097152 ORDER BY rowid DESC
 3388:   }
 3389: } {15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 3390: do_test boundary1-2.29.lt.5 {
 3391:   db eval {
 3392:     SELECT a FROM t1 WHERE rowid < 2097152 ORDER BY x
 3393:   }
 3394: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 3395: do_test boundary1-2.29.le.1 {
 3396:   db eval {
 3397:     SELECT a FROM t1 WHERE rowid <= 2097152 ORDER BY a
 3398:   }
 3399: } {1 2 4 5 8 11 15 16 21 23 29 30 31 32 33 37 38 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 3400: do_test boundary1-2.29.le.2 {
 3401:   db eval {
 3402:     SELECT a FROM t1 WHERE rowid <= 2097152 ORDER BY a DESC
 3403:   }
 3404: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 38 37 33 32 31 30 29 23 21 16 15 11 8 5 4 2 1}
 3405: do_test boundary1-2.29.le.3 {
 3406:   db eval {
 3407:     SELECT a FROM t1 WHERE rowid <= 2097152 ORDER BY rowid
 3408:   }
 3409: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42}
 3410: do_test boundary1-2.29.le.4 {
 3411:   db eval {
 3412:     SELECT a FROM t1 WHERE rowid <= 2097152 ORDER BY rowid DESC
 3413:   }
 3414: } {42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 3415: do_test boundary1-2.29.le.5 {
 3416:   db eval {
 3417:     SELECT a FROM t1 WHERE rowid <= 2097152 ORDER BY x
 3418:   }
 3419: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 3420: do_test boundary1-2.30.1 {
 3421:   db eval {
 3422:     SELECT * FROM t1 WHERE rowid=128
 3423:   }
 3424: } {49 0000000000000080}
 3425: do_test boundary1-2.30.2 {
 3426:   db eval {
 3427:     SELECT rowid, a FROM t1 WHERE x='0000000000000080'
 3428:   }
 3429: } {128 49}
 3430: do_test boundary1-2.30.3 {
 3431:   db eval {
 3432:     SELECT rowid, x FROM t1 WHERE a=49
 3433:   }
 3434: } {128 0000000000000080}
 3435: do_test boundary1-2.30.gt.1 {
 3436:   db eval {
 3437:     SELECT a FROM t1 WHERE rowid > 128 ORDER BY a
 3438:   }
 3439: } {3 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 34 35 36 39 40 42 43 45 46 48 50 51 56 57 61 62}
 3440: do_test boundary1-2.30.gt.2 {
 3441:   db eval {
 3442:     SELECT a FROM t1 WHERE rowid > 128 ORDER BY a DESC
 3443:   }
 3444: } {62 61 57 56 51 50 48 46 45 43 42 40 39 36 35 34 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 3}
 3445: do_test boundary1-2.30.gt.3 {
 3446:   db eval {
 3447:     SELECT a FROM t1 WHERE rowid > 128 ORDER BY rowid
 3448:   }
 3449: } {30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3450: do_test boundary1-2.30.gt.4 {
 3451:   db eval {
 3452:     SELECT a FROM t1 WHERE rowid > 128 ORDER BY rowid DESC
 3453:   }
 3454: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30}
 3455: do_test boundary1-2.30.gt.5 {
 3456:   db eval {
 3457:     SELECT a FROM t1 WHERE rowid > 128 ORDER BY x
 3458:   }
 3459: } {30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3460: do_test boundary1-2.30.ge.1 {
 3461:   db eval {
 3462:     SELECT a FROM t1 WHERE rowid >= 128 ORDER BY a
 3463:   }
 3464: } {3 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 34 35 36 39 40 42 43 45 46 48 49 50 51 56 57 61 62}
 3465: do_test boundary1-2.30.ge.2 {
 3466:   db eval {
 3467:     SELECT a FROM t1 WHERE rowid >= 128 ORDER BY a DESC
 3468:   }
 3469: } {62 61 57 56 51 50 49 48 46 45 43 42 40 39 36 35 34 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 3}
 3470: do_test boundary1-2.30.ge.3 {
 3471:   db eval {
 3472:     SELECT a FROM t1 WHERE rowid >= 128 ORDER BY rowid
 3473:   }
 3474: } {49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3475: do_test boundary1-2.30.ge.4 {
 3476:   db eval {
 3477:     SELECT a FROM t1 WHERE rowid >= 128 ORDER BY rowid DESC
 3478:   }
 3479: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49}
 3480: do_test boundary1-2.30.ge.5 {
 3481:   db eval {
 3482:     SELECT a FROM t1 WHERE rowid >= 128 ORDER BY x
 3483:   }
 3484: } {49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3485: do_test boundary1-2.30.lt.1 {
 3486:   db eval {
 3487:     SELECT a FROM t1 WHERE rowid < 128 ORDER BY a
 3488:   }
 3489: } {1 2 4 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
 3490: do_test boundary1-2.30.lt.2 {
 3491:   db eval {
 3492:     SELECT a FROM t1 WHERE rowid < 128 ORDER BY a DESC
 3493:   }
 3494: } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 4 2 1}
 3495: do_test boundary1-2.30.lt.3 {
 3496:   db eval {
 3497:     SELECT a FROM t1 WHERE rowid < 128 ORDER BY rowid
 3498:   }
 3499: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4}
 3500: do_test boundary1-2.30.lt.4 {
 3501:   db eval {
 3502:     SELECT a FROM t1 WHERE rowid < 128 ORDER BY rowid DESC
 3503:   }
 3504: } {4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 3505: do_test boundary1-2.30.lt.5 {
 3506:   db eval {
 3507:     SELECT a FROM t1 WHERE rowid < 128 ORDER BY x
 3508:   }
 3509: } {59 60 41 5 31 4 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 3510: do_test boundary1-2.30.le.1 {
 3511:   db eval {
 3512:     SELECT a FROM t1 WHERE rowid <= 128 ORDER BY a
 3513:   }
 3514: } {1 2 4 5 11 21 29 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 63 64}
 3515: do_test boundary1-2.30.le.2 {
 3516:   db eval {
 3517:     SELECT a FROM t1 WHERE rowid <= 128 ORDER BY a DESC
 3518:   }
 3519: } {64 63 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 29 21 11 5 4 2 1}
 3520: do_test boundary1-2.30.le.3 {
 3521:   db eval {
 3522:     SELECT a FROM t1 WHERE rowid <= 128 ORDER BY rowid
 3523:   }
 3524: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49}
 3525: do_test boundary1-2.30.le.4 {
 3526:   db eval {
 3527:     SELECT a FROM t1 WHERE rowid <= 128 ORDER BY rowid DESC
 3528:   }
 3529: } {49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 3530: do_test boundary1-2.30.le.5 {
 3531:   db eval {
 3532:     SELECT a FROM t1 WHERE rowid <= 128 ORDER BY x
 3533:   }
 3534: } {59 60 41 5 31 4 49 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 3535: do_test boundary1-2.31.1 {
 3536:   db eval {
 3537:     SELECT * FROM t1 WHERE rowid=255
 3538:   }
 3539: } {30 00000000000000ff}
 3540: do_test boundary1-2.31.2 {
 3541:   db eval {
 3542:     SELECT rowid, a FROM t1 WHERE x='00000000000000ff'
 3543:   }
 3544: } {255 30}
 3545: do_test boundary1-2.31.3 {
 3546:   db eval {
 3547:     SELECT rowid, x FROM t1 WHERE a=30
 3548:   }
 3549: } {255 00000000000000ff}
 3550: do_test boundary1-2.31.gt.1 {
 3551:   db eval {
 3552:     SELECT a FROM t1 WHERE rowid > 255 ORDER BY a
 3553:   }
 3554: } {3 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 34 35 36 39 40 42 43 45 46 48 50 51 56 57 61 62}
 3555: do_test boundary1-2.31.gt.2 {
 3556:   db eval {
 3557:     SELECT a FROM t1 WHERE rowid > 255 ORDER BY a DESC
 3558:   }
 3559: } {62 61 57 56 51 50 48 46 45 43 42 40 39 36 35 34 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 3}
 3560: do_test boundary1-2.31.gt.3 {
 3561:   db eval {
 3562:     SELECT a FROM t1 WHERE rowid > 255 ORDER BY rowid
 3563:   }
 3564: } {61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3565: do_test boundary1-2.31.gt.4 {
 3566:   db eval {
 3567:     SELECT a FROM t1 WHERE rowid > 255 ORDER BY rowid DESC
 3568:   }
 3569: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61}
 3570: do_test boundary1-2.31.gt.5 {
 3571:   db eval {
 3572:     SELECT a FROM t1 WHERE rowid > 255 ORDER BY x
 3573:   }
 3574: } {61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3575: do_test boundary1-2.31.ge.1 {
 3576:   db eval {
 3577:     SELECT a FROM t1 WHERE rowid >= 255 ORDER BY a
 3578:   }
 3579: } {3 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 34 35 36 39 40 42 43 45 46 48 50 51 56 57 61 62}
 3580: do_test boundary1-2.31.ge.2 {
 3581:   db eval {
 3582:     SELECT a FROM t1 WHERE rowid >= 255 ORDER BY a DESC
 3583:   }
 3584: } {62 61 57 56 51 50 48 46 45 43 42 40 39 36 35 34 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 3}
 3585: do_test boundary1-2.31.ge.3 {
 3586:   db eval {
 3587:     SELECT a FROM t1 WHERE rowid >= 255 ORDER BY rowid
 3588:   }
 3589: } {30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3590: do_test boundary1-2.31.ge.4 {
 3591:   db eval {
 3592:     SELECT a FROM t1 WHERE rowid >= 255 ORDER BY rowid DESC
 3593:   }
 3594: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30}
 3595: do_test boundary1-2.31.ge.5 {
 3596:   db eval {
 3597:     SELECT a FROM t1 WHERE rowid >= 255 ORDER BY x
 3598:   }
 3599: } {30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3600: do_test boundary1-2.31.lt.1 {
 3601:   db eval {
 3602:     SELECT a FROM t1 WHERE rowid < 255 ORDER BY a
 3603:   }
 3604: } {1 2 4 5 11 21 29 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 63 64}
 3605: do_test boundary1-2.31.lt.2 {
 3606:   db eval {
 3607:     SELECT a FROM t1 WHERE rowid < 255 ORDER BY a DESC
 3608:   }
 3609: } {64 63 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 29 21 11 5 4 2 1}
 3610: do_test boundary1-2.31.lt.3 {
 3611:   db eval {
 3612:     SELECT a FROM t1 WHERE rowid < 255 ORDER BY rowid
 3613:   }
 3614: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49}
 3615: do_test boundary1-2.31.lt.4 {
 3616:   db eval {
 3617:     SELECT a FROM t1 WHERE rowid < 255 ORDER BY rowid DESC
 3618:   }
 3619: } {49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 3620: do_test boundary1-2.31.lt.5 {
 3621:   db eval {
 3622:     SELECT a FROM t1 WHERE rowid < 255 ORDER BY x
 3623:   }
 3624: } {59 60 41 5 31 4 49 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 3625: do_test boundary1-2.31.le.1 {
 3626:   db eval {
 3627:     SELECT a FROM t1 WHERE rowid <= 255 ORDER BY a
 3628:   }
 3629: } {1 2 4 5 11 21 29 30 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 63 64}
 3630: do_test boundary1-2.31.le.2 {
 3631:   db eval {
 3632:     SELECT a FROM t1 WHERE rowid <= 255 ORDER BY a DESC
 3633:   }
 3634: } {64 63 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 30 29 21 11 5 4 2 1}
 3635: do_test boundary1-2.31.le.3 {
 3636:   db eval {
 3637:     SELECT a FROM t1 WHERE rowid <= 255 ORDER BY rowid
 3638:   }
 3639: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30}
 3640: do_test boundary1-2.31.le.4 {
 3641:   db eval {
 3642:     SELECT a FROM t1 WHERE rowid <= 255 ORDER BY rowid DESC
 3643:   }
 3644: } {30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 3645: do_test boundary1-2.31.le.5 {
 3646:   db eval {
 3647:     SELECT a FROM t1 WHERE rowid <= 255 ORDER BY x
 3648:   }
 3649: } {59 60 41 5 31 4 49 30 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 3650: do_test boundary1-2.32.1 {
 3651:   db eval {
 3652:     SELECT * FROM t1 WHERE rowid=-2147483648
 3653:   }
 3654: } {11 ffffffff80000000}
 3655: do_test boundary1-2.32.2 {
 3656:   db eval {
 3657:     SELECT rowid, a FROM t1 WHERE x='ffffffff80000000'
 3658:   }
 3659: } {-2147483648 11}
 3660: do_test boundary1-2.32.3 {
 3661:   db eval {
 3662:     SELECT rowid, x FROM t1 WHERE a=11
 3663:   }
 3664: } {-2147483648 ffffffff80000000}
 3665: do_test boundary1-2.32.gt.1 {
 3666:   db eval {
 3667:     SELECT a FROM t1 WHERE rowid > -2147483648 ORDER BY a
 3668:   }
 3669: } {1 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
 3670: do_test boundary1-2.32.gt.2 {
 3671:   db eval {
 3672:     SELECT a FROM t1 WHERE rowid > -2147483648 ORDER BY a DESC
 3673:   }
 3674: } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3 1}
 3675: do_test boundary1-2.32.gt.3 {
 3676:   db eval {
 3677:     SELECT a FROM t1 WHERE rowid > -2147483648 ORDER BY rowid
 3678:   }
 3679: } {1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3680: do_test boundary1-2.32.gt.4 {
 3681:   db eval {
 3682:     SELECT a FROM t1 WHERE rowid > -2147483648 ORDER BY rowid DESC
 3683:   }
 3684: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1}
 3685: do_test boundary1-2.32.gt.5 {
 3686:   db eval {
 3687:     SELECT a FROM t1 WHERE rowid > -2147483648 ORDER BY x
 3688:   }
 3689: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 1 37 29 32 54 53 52 33 38}
 3690: do_test boundary1-2.32.ge.1 {
 3691:   db eval {
 3692:     SELECT a FROM t1 WHERE rowid >= -2147483648 ORDER BY a
 3693:   }
 3694: } {1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
 3695: do_test boundary1-2.32.ge.2 {
 3696:   db eval {
 3697:     SELECT a FROM t1 WHERE rowid >= -2147483648 ORDER BY a DESC
 3698:   }
 3699: } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 1}
 3700: do_test boundary1-2.32.ge.3 {
 3701:   db eval {
 3702:     SELECT a FROM t1 WHERE rowid >= -2147483648 ORDER BY rowid
 3703:   }
 3704: } {11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3705: do_test boundary1-2.32.ge.4 {
 3706:   db eval {
 3707:     SELECT a FROM t1 WHERE rowid >= -2147483648 ORDER BY rowid DESC
 3708:   }
 3709: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11}
 3710: do_test boundary1-2.32.ge.5 {
 3711:   db eval {
 3712:     SELECT a FROM t1 WHERE rowid >= -2147483648 ORDER BY x
 3713:   }
 3714: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 11 1 37 29 32 54 53 52 33 38}
 3715: do_test boundary1-2.32.lt.1 {
 3716:   db eval {
 3717:     SELECT a FROM t1 WHERE rowid < -2147483648 ORDER BY a
 3718:   }
 3719: } {2 21 44 47 55 58 63 64}
 3720: do_test boundary1-2.32.lt.2 {
 3721:   db eval {
 3722:     SELECT a FROM t1 WHERE rowid < -2147483648 ORDER BY a DESC
 3723:   }
 3724: } {64 63 58 55 47 44 21 2}
 3725: do_test boundary1-2.32.lt.3 {
 3726:   db eval {
 3727:     SELECT a FROM t1 WHERE rowid < -2147483648 ORDER BY rowid
 3728:   }
 3729: } {55 2 64 21 44 58 63 47}
 3730: do_test boundary1-2.32.lt.4 {
 3731:   db eval {
 3732:     SELECT a FROM t1 WHERE rowid < -2147483648 ORDER BY rowid DESC
 3733:   }
 3734: } {47 63 58 44 21 64 2 55}
 3735: do_test boundary1-2.32.lt.5 {
 3736:   db eval {
 3737:     SELECT a FROM t1 WHERE rowid < -2147483648 ORDER BY x
 3738:   }
 3739: } {55 2 64 21 44 58 63 47}
 3740: do_test boundary1-2.32.le.1 {
 3741:   db eval {
 3742:     SELECT a FROM t1 WHERE rowid <= -2147483648 ORDER BY a
 3743:   }
 3744: } {2 11 21 44 47 55 58 63 64}
 3745: do_test boundary1-2.32.le.2 {
 3746:   db eval {
 3747:     SELECT a FROM t1 WHERE rowid <= -2147483648 ORDER BY a DESC
 3748:   }
 3749: } {64 63 58 55 47 44 21 11 2}
 3750: do_test boundary1-2.32.le.3 {
 3751:   db eval {
 3752:     SELECT a FROM t1 WHERE rowid <= -2147483648 ORDER BY rowid
 3753:   }
 3754: } {55 2 64 21 44 58 63 47 11}
 3755: do_test boundary1-2.32.le.4 {
 3756:   db eval {
 3757:     SELECT a FROM t1 WHERE rowid <= -2147483648 ORDER BY rowid DESC
 3758:   }
 3759: } {11 47 63 58 44 21 64 2 55}
 3760: do_test boundary1-2.32.le.5 {
 3761:   db eval {
 3762:     SELECT a FROM t1 WHERE rowid <= -2147483648 ORDER BY x
 3763:   }
 3764: } {55 2 64 21 44 58 63 47 11}
 3765: do_test boundary1-2.33.1 {
 3766:   db eval {
 3767:     SELECT * FROM t1 WHERE rowid=34359738367
 3768:   }
 3769: } {39 00000007ffffffff}
 3770: do_test boundary1-2.33.2 {
 3771:   db eval {
 3772:     SELECT rowid, a FROM t1 WHERE x='00000007ffffffff'
 3773:   }
 3774: } {34359738367 39}
 3775: do_test boundary1-2.33.3 {
 3776:   db eval {
 3777:     SELECT rowid, x FROM t1 WHERE a=39
 3778:   }
 3779: } {34359738367 00000007ffffffff}
 3780: do_test boundary1-2.33.gt.1 {
 3781:   db eval {
 3782:     SELECT a FROM t1 WHERE rowid > 34359738367 ORDER BY a
 3783:   }
 3784: } {3 7 10 13 17 19 22 25 26 27 28 34 35 43 45 46 56 57}
 3785: do_test boundary1-2.33.gt.2 {
 3786:   db eval {
 3787:     SELECT a FROM t1 WHERE rowid > 34359738367 ORDER BY a DESC
 3788:   }
 3789: } {57 56 46 45 43 35 34 28 27 26 25 22 19 17 13 10 7 3}
 3790: do_test boundary1-2.33.gt.3 {
 3791:   db eval {
 3792:     SELECT a FROM t1 WHERE rowid > 34359738367 ORDER BY rowid
 3793:   }
 3794: } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3795: do_test boundary1-2.33.gt.4 {
 3796:   db eval {
 3797:     SELECT a FROM t1 WHERE rowid > 34359738367 ORDER BY rowid DESC
 3798:   }
 3799: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22}
 3800: do_test boundary1-2.33.gt.5 {
 3801:   db eval {
 3802:     SELECT a FROM t1 WHERE rowid > 34359738367 ORDER BY x
 3803:   }
 3804: } {22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3805: do_test boundary1-2.33.ge.1 {
 3806:   db eval {
 3807:     SELECT a FROM t1 WHERE rowid >= 34359738367 ORDER BY a
 3808:   }
 3809: } {3 7 10 13 17 19 22 25 26 27 28 34 35 39 43 45 46 56 57}
 3810: do_test boundary1-2.33.ge.2 {
 3811:   db eval {
 3812:     SELECT a FROM t1 WHERE rowid >= 34359738367 ORDER BY a DESC
 3813:   }
 3814: } {57 56 46 45 43 39 35 34 28 27 26 25 22 19 17 13 10 7 3}
 3815: do_test boundary1-2.33.ge.3 {
 3816:   db eval {
 3817:     SELECT a FROM t1 WHERE rowid >= 34359738367 ORDER BY rowid
 3818:   }
 3819: } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3820: do_test boundary1-2.33.ge.4 {
 3821:   db eval {
 3822:     SELECT a FROM t1 WHERE rowid >= 34359738367 ORDER BY rowid DESC
 3823:   }
 3824: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39}
 3825: do_test boundary1-2.33.ge.5 {
 3826:   db eval {
 3827:     SELECT a FROM t1 WHERE rowid >= 34359738367 ORDER BY x
 3828:   }
 3829: } {39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3830: do_test boundary1-2.33.lt.1 {
 3831:   db eval {
 3832:     SELECT a FROM t1 WHERE rowid < 34359738367 ORDER BY a
 3833:   }
 3834: } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 23 24 29 30 31 32 33 36 37 38 40 41 42 44 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
 3835: do_test boundary1-2.33.lt.2 {
 3836:   db eval {
 3837:     SELECT a FROM t1 WHERE rowid < 34359738367 ORDER BY a DESC
 3838:   }
 3839: } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 44 42 41 40 38 37 36 33 32 31 30 29 24 23 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
 3840: do_test boundary1-2.33.lt.3 {
 3841:   db eval {
 3842:     SELECT a FROM t1 WHERE rowid < 34359738367 ORDER BY rowid
 3843:   }
 3844: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36}
 3845: do_test boundary1-2.33.lt.4 {
 3846:   db eval {
 3847:     SELECT a FROM t1 WHERE rowid < 34359738367 ORDER BY rowid DESC
 3848:   }
 3849: } {36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 3850: do_test boundary1-2.33.lt.5 {
 3851:   db eval {
 3852:     SELECT a FROM t1 WHERE rowid < 34359738367 ORDER BY x
 3853:   }
 3854: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 3855: do_test boundary1-2.33.le.1 {
 3856:   db eval {
 3857:     SELECT a FROM t1 WHERE rowid <= 34359738367 ORDER BY a
 3858:   }
 3859: } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 23 24 29 30 31 32 33 36 37 38 39 40 41 42 44 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
 3860: do_test boundary1-2.33.le.2 {
 3861:   db eval {
 3862:     SELECT a FROM t1 WHERE rowid <= 34359738367 ORDER BY a DESC
 3863:   }
 3864: } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 44 42 41 40 39 38 37 36 33 32 31 30 29 24 23 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
 3865: do_test boundary1-2.33.le.3 {
 3866:   db eval {
 3867:     SELECT a FROM t1 WHERE rowid <= 34359738367 ORDER BY rowid
 3868:   }
 3869: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39}
 3870: do_test boundary1-2.33.le.4 {
 3871:   db eval {
 3872:     SELECT a FROM t1 WHERE rowid <= 34359738367 ORDER BY rowid DESC
 3873:   }
 3874: } {39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 3875: do_test boundary1-2.33.le.5 {
 3876:   db eval {
 3877:     SELECT a FROM t1 WHERE rowid <= 34359738367 ORDER BY x
 3878:   }
 3879: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 3880: do_test boundary1-2.34.1 {
 3881:   db eval {
 3882:     SELECT * FROM t1 WHERE rowid=-549755813889
 3883:   }
 3884: } {58 ffffff7fffffffff}
 3885: do_test boundary1-2.34.2 {
 3886:   db eval {
 3887:     SELECT rowid, a FROM t1 WHERE x='ffffff7fffffffff'
 3888:   }
 3889: } {-549755813889 58}
 3890: do_test boundary1-2.34.3 {
 3891:   db eval {
 3892:     SELECT rowid, x FROM t1 WHERE a=58
 3893:   }
 3894: } {-549755813889 ffffff7fffffffff}
 3895: do_test boundary1-2.34.gt.1 {
 3896:   db eval {
 3897:     SELECT a FROM t1 WHERE rowid > -549755813889 ORDER BY a
 3898:   }
 3899: } {1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 45 46 47 48 49 50 51 52 53 54 56 57 59 60 61 62 63}
 3900: do_test boundary1-2.34.gt.2 {
 3901:   db eval {
 3902:     SELECT a FROM t1 WHERE rowid > -549755813889 ORDER BY a DESC
 3903:   }
 3904: } {63 62 61 60 59 57 56 54 53 52 51 50 49 48 47 46 45 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 1}
 3905: do_test boundary1-2.34.gt.3 {
 3906:   db eval {
 3907:     SELECT a FROM t1 WHERE rowid > -549755813889 ORDER BY rowid
 3908:   }
 3909: } {63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3910: do_test boundary1-2.34.gt.4 {
 3911:   db eval {
 3912:     SELECT a FROM t1 WHERE rowid > -549755813889 ORDER BY rowid DESC
 3913:   }
 3914: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63}
 3915: do_test boundary1-2.34.gt.5 {
 3916:   db eval {
 3917:     SELECT a FROM t1 WHERE rowid > -549755813889 ORDER BY x
 3918:   }
 3919: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 63 47 11 1 37 29 32 54 53 52 33 38}
 3920: do_test boundary1-2.34.ge.1 {
 3921:   db eval {
 3922:     SELECT a FROM t1 WHERE rowid >= -549755813889 ORDER BY a
 3923:   }
 3924: } {1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 45 46 47 48 49 50 51 52 53 54 56 57 58 59 60 61 62 63}
 3925: do_test boundary1-2.34.ge.2 {
 3926:   db eval {
 3927:     SELECT a FROM t1 WHERE rowid >= -549755813889 ORDER BY a DESC
 3928:   }
 3929: } {63 62 61 60 59 58 57 56 54 53 52 51 50 49 48 47 46 45 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 1}
 3930: do_test boundary1-2.34.ge.3 {
 3931:   db eval {
 3932:     SELECT a FROM t1 WHERE rowid >= -549755813889 ORDER BY rowid
 3933:   }
 3934: } {58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 3935: do_test boundary1-2.34.ge.4 {
 3936:   db eval {
 3937:     SELECT a FROM t1 WHERE rowid >= -549755813889 ORDER BY rowid DESC
 3938:   }
 3939: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58}
 3940: do_test boundary1-2.34.ge.5 {
 3941:   db eval {
 3942:     SELECT a FROM t1 WHERE rowid >= -549755813889 ORDER BY x
 3943:   }
 3944: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 58 63 47 11 1 37 29 32 54 53 52 33 38}
 3945: do_test boundary1-2.34.lt.1 {
 3946:   db eval {
 3947:     SELECT a FROM t1 WHERE rowid < -549755813889 ORDER BY a
 3948:   }
 3949: } {2 21 44 55 64}
 3950: do_test boundary1-2.34.lt.2 {
 3951:   db eval {
 3952:     SELECT a FROM t1 WHERE rowid < -549755813889 ORDER BY a DESC
 3953:   }
 3954: } {64 55 44 21 2}
 3955: do_test boundary1-2.34.lt.3 {
 3956:   db eval {
 3957:     SELECT a FROM t1 WHERE rowid < -549755813889 ORDER BY rowid
 3958:   }
 3959: } {55 2 64 21 44}
 3960: do_test boundary1-2.34.lt.4 {
 3961:   db eval {
 3962:     SELECT a FROM t1 WHERE rowid < -549755813889 ORDER BY rowid DESC
 3963:   }
 3964: } {44 21 64 2 55}
 3965: do_test boundary1-2.34.lt.5 {
 3966:   db eval {
 3967:     SELECT a FROM t1 WHERE rowid < -549755813889 ORDER BY x
 3968:   }
 3969: } {55 2 64 21 44}
 3970: do_test boundary1-2.34.le.1 {
 3971:   db eval {
 3972:     SELECT a FROM t1 WHERE rowid <= -549755813889 ORDER BY a
 3973:   }
 3974: } {2 21 44 55 58 64}
 3975: do_test boundary1-2.34.le.2 {
 3976:   db eval {
 3977:     SELECT a FROM t1 WHERE rowid <= -549755813889 ORDER BY a DESC
 3978:   }
 3979: } {64 58 55 44 21 2}
 3980: do_test boundary1-2.34.le.3 {
 3981:   db eval {
 3982:     SELECT a FROM t1 WHERE rowid <= -549755813889 ORDER BY rowid
 3983:   }
 3984: } {55 2 64 21 44 58}
 3985: do_test boundary1-2.34.le.4 {
 3986:   db eval {
 3987:     SELECT a FROM t1 WHERE rowid <= -549755813889 ORDER BY rowid DESC
 3988:   }
 3989: } {58 44 21 64 2 55}
 3990: do_test boundary1-2.34.le.5 {
 3991:   db eval {
 3992:     SELECT a FROM t1 WHERE rowid <= -549755813889 ORDER BY x
 3993:   }
 3994: } {55 2 64 21 44 58}
 3995: do_test boundary1-2.35.1 {
 3996:   db eval {
 3997:     SELECT * FROM t1 WHERE rowid=-32768
 3998:   }
 3999: } {32 ffffffffffff8000}
 4000: do_test boundary1-2.35.2 {
 4001:   db eval {
 4002:     SELECT rowid, a FROM t1 WHERE x='ffffffffffff8000'
 4003:   }
 4004: } {-32768 32}
 4005: do_test boundary1-2.35.3 {
 4006:   db eval {
 4007:     SELECT rowid, x FROM t1 WHERE a=32
 4008:   }
 4009: } {-32768 ffffffffffff8000}
 4010: do_test boundary1-2.35.gt.1 {
 4011:   db eval {
 4012:     SELECT a FROM t1 WHERE rowid > -32768 ORDER BY a
 4013:   }
 4014: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
 4015: do_test boundary1-2.35.gt.2 {
 4016:   db eval {
 4017:     SELECT a FROM t1 WHERE rowid > -32768 ORDER BY a DESC
 4018:   }
 4019: } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 4020: do_test boundary1-2.35.gt.3 {
 4021:   db eval {
 4022:     SELECT a FROM t1 WHERE rowid > -32768 ORDER BY rowid
 4023:   }
 4024: } {54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4025: do_test boundary1-2.35.gt.4 {
 4026:   db eval {
 4027:     SELECT a FROM t1 WHERE rowid > -32768 ORDER BY rowid DESC
 4028:   }
 4029: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54}
 4030: do_test boundary1-2.35.gt.5 {
 4031:   db eval {
 4032:     SELECT a FROM t1 WHERE rowid > -32768 ORDER BY x
 4033:   }
 4034: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 54 53 52 33 38}
 4035: do_test boundary1-2.35.ge.1 {
 4036:   db eval {
 4037:     SELECT a FROM t1 WHERE rowid >= -32768 ORDER BY a
 4038:   }
 4039: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 32 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
 4040: do_test boundary1-2.35.ge.2 {
 4041:   db eval {
 4042:     SELECT a FROM t1 WHERE rowid >= -32768 ORDER BY a DESC
 4043:   }
 4044: } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 32 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 4045: do_test boundary1-2.35.ge.3 {
 4046:   db eval {
 4047:     SELECT a FROM t1 WHERE rowid >= -32768 ORDER BY rowid
 4048:   }
 4049: } {32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4050: do_test boundary1-2.35.ge.4 {
 4051:   db eval {
 4052:     SELECT a FROM t1 WHERE rowid >= -32768 ORDER BY rowid DESC
 4053:   }
 4054: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32}
 4055: do_test boundary1-2.35.ge.5 {
 4056:   db eval {
 4057:     SELECT a FROM t1 WHERE rowid >= -32768 ORDER BY x
 4058:   }
 4059: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 32 54 53 52 33 38}
 4060: do_test boundary1-2.35.lt.1 {
 4061:   db eval {
 4062:     SELECT a FROM t1 WHERE rowid < -32768 ORDER BY a
 4063:   }
 4064: } {1 2 11 21 29 37 44 47 55 58 63 64}
 4065: do_test boundary1-2.35.lt.2 {
 4066:   db eval {
 4067:     SELECT a FROM t1 WHERE rowid < -32768 ORDER BY a DESC
 4068:   }
 4069: } {64 63 58 55 47 44 37 29 21 11 2 1}
 4070: do_test boundary1-2.35.lt.3 {
 4071:   db eval {
 4072:     SELECT a FROM t1 WHERE rowid < -32768 ORDER BY rowid
 4073:   }
 4074: } {55 2 64 21 44 58 63 47 11 1 37 29}
 4075: do_test boundary1-2.35.lt.4 {
 4076:   db eval {
 4077:     SELECT a FROM t1 WHERE rowid < -32768 ORDER BY rowid DESC
 4078:   }
 4079: } {29 37 1 11 47 63 58 44 21 64 2 55}
 4080: do_test boundary1-2.35.lt.5 {
 4081:   db eval {
 4082:     SELECT a FROM t1 WHERE rowid < -32768 ORDER BY x
 4083:   }
 4084: } {55 2 64 21 44 58 63 47 11 1 37 29}
 4085: do_test boundary1-2.35.le.1 {
 4086:   db eval {
 4087:     SELECT a FROM t1 WHERE rowid <= -32768 ORDER BY a
 4088:   }
 4089: } {1 2 11 21 29 32 37 44 47 55 58 63 64}
 4090: do_test boundary1-2.35.le.2 {
 4091:   db eval {
 4092:     SELECT a FROM t1 WHERE rowid <= -32768 ORDER BY a DESC
 4093:   }
 4094: } {64 63 58 55 47 44 37 32 29 21 11 2 1}
 4095: do_test boundary1-2.35.le.3 {
 4096:   db eval {
 4097:     SELECT a FROM t1 WHERE rowid <= -32768 ORDER BY rowid
 4098:   }
 4099: } {55 2 64 21 44 58 63 47 11 1 37 29 32}
 4100: do_test boundary1-2.35.le.4 {
 4101:   db eval {
 4102:     SELECT a FROM t1 WHERE rowid <= -32768 ORDER BY rowid DESC
 4103:   }
 4104: } {32 29 37 1 11 47 63 58 44 21 64 2 55}
 4105: do_test boundary1-2.35.le.5 {
 4106:   db eval {
 4107:     SELECT a FROM t1 WHERE rowid <= -32768 ORDER BY x
 4108:   }
 4109: } {55 2 64 21 44 58 63 47 11 1 37 29 32}
 4110: do_test boundary1-2.36.1 {
 4111:   db eval {
 4112:     SELECT * FROM t1 WHERE rowid=2147483647
 4113:   }
 4114: } {20 000000007fffffff}
 4115: do_test boundary1-2.36.2 {
 4116:   db eval {
 4117:     SELECT rowid, a FROM t1 WHERE x='000000007fffffff'
 4118:   }
 4119: } {2147483647 20}
 4120: do_test boundary1-2.36.3 {
 4121:   db eval {
 4122:     SELECT rowid, x FROM t1 WHERE a=20
 4123:   }
 4124: } {2147483647 000000007fffffff}
 4125: do_test boundary1-2.36.gt.1 {
 4126:   db eval {
 4127:     SELECT a FROM t1 WHERE rowid > 2147483647 ORDER BY a
 4128:   }
 4129: } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
 4130: do_test boundary1-2.36.gt.2 {
 4131:   db eval {
 4132:     SELECT a FROM t1 WHERE rowid > 2147483647 ORDER BY a DESC
 4133:   }
 4134: } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
 4135: do_test boundary1-2.36.gt.3 {
 4136:   db eval {
 4137:     SELECT a FROM t1 WHERE rowid > 2147483647 ORDER BY rowid
 4138:   }
 4139: } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4140: do_test boundary1-2.36.gt.4 {
 4141:   db eval {
 4142:     SELECT a FROM t1 WHERE rowid > 2147483647 ORDER BY rowid DESC
 4143:   }
 4144: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51}
 4145: do_test boundary1-2.36.gt.5 {
 4146:   db eval {
 4147:     SELECT a FROM t1 WHERE rowid > 2147483647 ORDER BY x
 4148:   }
 4149: } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4150: do_test boundary1-2.36.ge.1 {
 4151:   db eval {
 4152:     SELECT a FROM t1 WHERE rowid >= 2147483647 ORDER BY a
 4153:   }
 4154: } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
 4155: do_test boundary1-2.36.ge.2 {
 4156:   db eval {
 4157:     SELECT a FROM t1 WHERE rowid >= 2147483647 ORDER BY a DESC
 4158:   }
 4159: } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
 4160: do_test boundary1-2.36.ge.3 {
 4161:   db eval {
 4162:     SELECT a FROM t1 WHERE rowid >= 2147483647 ORDER BY rowid
 4163:   }
 4164: } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4165: do_test boundary1-2.36.ge.4 {
 4166:   db eval {
 4167:     SELECT a FROM t1 WHERE rowid >= 2147483647 ORDER BY rowid DESC
 4168:   }
 4169: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20}
 4170: do_test boundary1-2.36.ge.5 {
 4171:   db eval {
 4172:     SELECT a FROM t1 WHERE rowid >= 2147483647 ORDER BY x
 4173:   }
 4174: } {20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4175: do_test boundary1-2.36.lt.1 {
 4176:   db eval {
 4177:     SELECT a FROM t1 WHERE rowid < 2147483647 ORDER BY a
 4178:   }
 4179: } {1 2 4 5 6 8 9 11 12 15 16 18 21 23 24 29 30 31 32 33 37 38 40 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 4180: do_test boundary1-2.36.lt.2 {
 4181:   db eval {
 4182:     SELECT a FROM t1 WHERE rowid < 2147483647 ORDER BY a DESC
 4183:   }
 4184: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 40 38 37 33 32 31 30 29 24 23 21 18 16 15 12 11 9 8 6 5 4 2 1}
 4185: do_test boundary1-2.36.lt.3 {
 4186:   db eval {
 4187:     SELECT a FROM t1 WHERE rowid < 2147483647 ORDER BY rowid
 4188:   }
 4189: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40}
 4190: do_test boundary1-2.36.lt.4 {
 4191:   db eval {
 4192:     SELECT a FROM t1 WHERE rowid < 2147483647 ORDER BY rowid DESC
 4193:   }
 4194: } {40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 4195: do_test boundary1-2.36.lt.5 {
 4196:   db eval {
 4197:     SELECT a FROM t1 WHERE rowid < 2147483647 ORDER BY x
 4198:   }
 4199: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 4200: do_test boundary1-2.36.le.1 {
 4201:   db eval {
 4202:     SELECT a FROM t1 WHERE rowid <= 2147483647 ORDER BY a
 4203:   }
 4204: } {1 2 4 5 6 8 9 11 12 15 16 18 20 21 23 24 29 30 31 32 33 37 38 40 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 4205: do_test boundary1-2.36.le.2 {
 4206:   db eval {
 4207:     SELECT a FROM t1 WHERE rowid <= 2147483647 ORDER BY a DESC
 4208:   }
 4209: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 40 38 37 33 32 31 30 29 24 23 21 20 18 16 15 12 11 9 8 6 5 4 2 1}
 4210: do_test boundary1-2.36.le.3 {
 4211:   db eval {
 4212:     SELECT a FROM t1 WHERE rowid <= 2147483647 ORDER BY rowid
 4213:   }
 4214: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20}
 4215: do_test boundary1-2.36.le.4 {
 4216:   db eval {
 4217:     SELECT a FROM t1 WHERE rowid <= 2147483647 ORDER BY rowid DESC
 4218:   }
 4219: } {20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 4220: do_test boundary1-2.36.le.5 {
 4221:   db eval {
 4222:     SELECT a FROM t1 WHERE rowid <= 2147483647 ORDER BY x
 4223:   }
 4224: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 4225: do_test boundary1-2.37.1 {
 4226:   db eval {
 4227:     SELECT * FROM t1 WHERE rowid=-129
 4228:   }
 4229: } {54 ffffffffffffff7f}
 4230: do_test boundary1-2.37.2 {
 4231:   db eval {
 4232:     SELECT rowid, a FROM t1 WHERE x='ffffffffffffff7f'
 4233:   }
 4234: } {-129 54}
 4235: do_test boundary1-2.37.3 {
 4236:   db eval {
 4237:     SELECT rowid, x FROM t1 WHERE a=54
 4238:   }
 4239: } {-129 ffffffffffffff7f}
 4240: do_test boundary1-2.37.gt.1 {
 4241:   db eval {
 4242:     SELECT a FROM t1 WHERE rowid > -129 ORDER BY a
 4243:   }
 4244: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 52 53 56 57 59 60 61 62}
 4245: do_test boundary1-2.37.gt.2 {
 4246:   db eval {
 4247:     SELECT a FROM t1 WHERE rowid > -129 ORDER BY a DESC
 4248:   }
 4249: } {62 61 60 59 57 56 53 52 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 4250: do_test boundary1-2.37.gt.3 {
 4251:   db eval {
 4252:     SELECT a FROM t1 WHERE rowid > -129 ORDER BY rowid
 4253:   }
 4254: } {53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4255: do_test boundary1-2.37.gt.4 {
 4256:   db eval {
 4257:     SELECT a FROM t1 WHERE rowid > -129 ORDER BY rowid DESC
 4258:   }
 4259: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53}
 4260: do_test boundary1-2.37.gt.5 {
 4261:   db eval {
 4262:     SELECT a FROM t1 WHERE rowid > -129 ORDER BY x
 4263:   }
 4264: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 53 52 33 38}
 4265: do_test boundary1-2.37.ge.1 {
 4266:   db eval {
 4267:     SELECT a FROM t1 WHERE rowid >= -129 ORDER BY a
 4268:   }
 4269: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
 4270: do_test boundary1-2.37.ge.2 {
 4271:   db eval {
 4272:     SELECT a FROM t1 WHERE rowid >= -129 ORDER BY a DESC
 4273:   }
 4274: } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 4275: do_test boundary1-2.37.ge.3 {
 4276:   db eval {
 4277:     SELECT a FROM t1 WHERE rowid >= -129 ORDER BY rowid
 4278:   }
 4279: } {54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4280: do_test boundary1-2.37.ge.4 {
 4281:   db eval {
 4282:     SELECT a FROM t1 WHERE rowid >= -129 ORDER BY rowid DESC
 4283:   }
 4284: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54}
 4285: do_test boundary1-2.37.ge.5 {
 4286:   db eval {
 4287:     SELECT a FROM t1 WHERE rowid >= -129 ORDER BY x
 4288:   }
 4289: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 54 53 52 33 38}
 4290: do_test boundary1-2.37.lt.1 {
 4291:   db eval {
 4292:     SELECT a FROM t1 WHERE rowid < -129 ORDER BY a
 4293:   }
 4294: } {1 2 11 21 29 32 37 44 47 55 58 63 64}
 4295: do_test boundary1-2.37.lt.2 {
 4296:   db eval {
 4297:     SELECT a FROM t1 WHERE rowid < -129 ORDER BY a DESC
 4298:   }
 4299: } {64 63 58 55 47 44 37 32 29 21 11 2 1}
 4300: do_test boundary1-2.37.lt.3 {
 4301:   db eval {
 4302:     SELECT a FROM t1 WHERE rowid < -129 ORDER BY rowid
 4303:   }
 4304: } {55 2 64 21 44 58 63 47 11 1 37 29 32}
 4305: do_test boundary1-2.37.lt.4 {
 4306:   db eval {
 4307:     SELECT a FROM t1 WHERE rowid < -129 ORDER BY rowid DESC
 4308:   }
 4309: } {32 29 37 1 11 47 63 58 44 21 64 2 55}
 4310: do_test boundary1-2.37.lt.5 {
 4311:   db eval {
 4312:     SELECT a FROM t1 WHERE rowid < -129 ORDER BY x
 4313:   }
 4314: } {55 2 64 21 44 58 63 47 11 1 37 29 32}
 4315: do_test boundary1-2.37.le.1 {
 4316:   db eval {
 4317:     SELECT a FROM t1 WHERE rowid <= -129 ORDER BY a
 4318:   }
 4319: } {1 2 11 21 29 32 37 44 47 54 55 58 63 64}
 4320: do_test boundary1-2.37.le.2 {
 4321:   db eval {
 4322:     SELECT a FROM t1 WHERE rowid <= -129 ORDER BY a DESC
 4323:   }
 4324: } {64 63 58 55 54 47 44 37 32 29 21 11 2 1}
 4325: do_test boundary1-2.37.le.3 {
 4326:   db eval {
 4327:     SELECT a FROM t1 WHERE rowid <= -129 ORDER BY rowid
 4328:   }
 4329: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
 4330: do_test boundary1-2.37.le.4 {
 4331:   db eval {
 4332:     SELECT a FROM t1 WHERE rowid <= -129 ORDER BY rowid DESC
 4333:   }
 4334: } {54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 4335: do_test boundary1-2.37.le.5 {
 4336:   db eval {
 4337:     SELECT a FROM t1 WHERE rowid <= -129 ORDER BY x
 4338:   }
 4339: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
 4340: do_test boundary1-2.38.1 {
 4341:   db eval {
 4342:     SELECT * FROM t1 WHERE rowid=-128
 4343:   }
 4344: } {53 ffffffffffffff80}
 4345: do_test boundary1-2.38.2 {
 4346:   db eval {
 4347:     SELECT rowid, a FROM t1 WHERE x='ffffffffffffff80'
 4348:   }
 4349: } {-128 53}
 4350: do_test boundary1-2.38.3 {
 4351:   db eval {
 4352:     SELECT rowid, x FROM t1 WHERE a=53
 4353:   }
 4354: } {-128 ffffffffffffff80}
 4355: do_test boundary1-2.38.gt.1 {
 4356:   db eval {
 4357:     SELECT a FROM t1 WHERE rowid > -128 ORDER BY a
 4358:   }
 4359: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 52 56 57 59 60 61 62}
 4360: do_test boundary1-2.38.gt.2 {
 4361:   db eval {
 4362:     SELECT a FROM t1 WHERE rowid > -128 ORDER BY a DESC
 4363:   }
 4364: } {62 61 60 59 57 56 52 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 4365: do_test boundary1-2.38.gt.3 {
 4366:   db eval {
 4367:     SELECT a FROM t1 WHERE rowid > -128 ORDER BY rowid
 4368:   }
 4369: } {52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4370: do_test boundary1-2.38.gt.4 {
 4371:   db eval {
 4372:     SELECT a FROM t1 WHERE rowid > -128 ORDER BY rowid DESC
 4373:   }
 4374: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52}
 4375: do_test boundary1-2.38.gt.5 {
 4376:   db eval {
 4377:     SELECT a FROM t1 WHERE rowid > -128 ORDER BY x
 4378:   }
 4379: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 52 33 38}
 4380: do_test boundary1-2.38.ge.1 {
 4381:   db eval {
 4382:     SELECT a FROM t1 WHERE rowid >= -128 ORDER BY a
 4383:   }
 4384: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 33 34 35 36 38 39 40 41 42 43 45 46 48 49 50 51 52 53 56 57 59 60 61 62}
 4385: do_test boundary1-2.38.ge.2 {
 4386:   db eval {
 4387:     SELECT a FROM t1 WHERE rowid >= -128 ORDER BY a DESC
 4388:   }
 4389: } {62 61 60 59 57 56 53 52 51 50 49 48 46 45 43 42 41 40 39 38 36 35 34 33 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 4390: do_test boundary1-2.38.ge.3 {
 4391:   db eval {
 4392:     SELECT a FROM t1 WHERE rowid >= -128 ORDER BY rowid
 4393:   }
 4394: } {53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4395: do_test boundary1-2.38.ge.4 {
 4396:   db eval {
 4397:     SELECT a FROM t1 WHERE rowid >= -128 ORDER BY rowid DESC
 4398:   }
 4399: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53}
 4400: do_test boundary1-2.38.ge.5 {
 4401:   db eval {
 4402:     SELECT a FROM t1 WHERE rowid >= -128 ORDER BY x
 4403:   }
 4404: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 53 52 33 38}
 4405: do_test boundary1-2.38.lt.1 {
 4406:   db eval {
 4407:     SELECT a FROM t1 WHERE rowid < -128 ORDER BY a
 4408:   }
 4409: } {1 2 11 21 29 32 37 44 47 54 55 58 63 64}
 4410: do_test boundary1-2.38.lt.2 {
 4411:   db eval {
 4412:     SELECT a FROM t1 WHERE rowid < -128 ORDER BY a DESC
 4413:   }
 4414: } {64 63 58 55 54 47 44 37 32 29 21 11 2 1}
 4415: do_test boundary1-2.38.lt.3 {
 4416:   db eval {
 4417:     SELECT a FROM t1 WHERE rowid < -128 ORDER BY rowid
 4418:   }
 4419: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
 4420: do_test boundary1-2.38.lt.4 {
 4421:   db eval {
 4422:     SELECT a FROM t1 WHERE rowid < -128 ORDER BY rowid DESC
 4423:   }
 4424: } {54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 4425: do_test boundary1-2.38.lt.5 {
 4426:   db eval {
 4427:     SELECT a FROM t1 WHERE rowid < -128 ORDER BY x
 4428:   }
 4429: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54}
 4430: do_test boundary1-2.38.le.1 {
 4431:   db eval {
 4432:     SELECT a FROM t1 WHERE rowid <= -128 ORDER BY a
 4433:   }
 4434: } {1 2 11 21 29 32 37 44 47 53 54 55 58 63 64}
 4435: do_test boundary1-2.38.le.2 {
 4436:   db eval {
 4437:     SELECT a FROM t1 WHERE rowid <= -128 ORDER BY a DESC
 4438:   }
 4439: } {64 63 58 55 54 53 47 44 37 32 29 21 11 2 1}
 4440: do_test boundary1-2.38.le.3 {
 4441:   db eval {
 4442:     SELECT a FROM t1 WHERE rowid <= -128 ORDER BY rowid
 4443:   }
 4444: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
 4445: do_test boundary1-2.38.le.4 {
 4446:   db eval {
 4447:     SELECT a FROM t1 WHERE rowid <= -128 ORDER BY rowid DESC
 4448:   }
 4449: } {53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 4450: do_test boundary1-2.38.le.5 {
 4451:   db eval {
 4452:     SELECT a FROM t1 WHERE rowid <= -128 ORDER BY x
 4453:   }
 4454: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53}
 4455: do_test boundary1-2.39.1 {
 4456:   db eval {
 4457:     SELECT * FROM t1 WHERE rowid=72057594037927936
 4458:   }
 4459: } {28 0100000000000000}
 4460: do_test boundary1-2.39.2 {
 4461:   db eval {
 4462:     SELECT rowid, a FROM t1 WHERE x='0100000000000000'
 4463:   }
 4464: } {72057594037927936 28}
 4465: do_test boundary1-2.39.3 {
 4466:   db eval {
 4467:     SELECT rowid, x FROM t1 WHERE a=28
 4468:   }
 4469: } {72057594037927936 0100000000000000}
 4470: do_test boundary1-2.39.gt.1 {
 4471:   db eval {
 4472:     SELECT a FROM t1 WHERE rowid > 72057594037927936 ORDER BY a
 4473:   }
 4474: } {3}
 4475: do_test boundary1-2.39.gt.2 {
 4476:   db eval {
 4477:     SELECT a FROM t1 WHERE rowid > 72057594037927936 ORDER BY a DESC
 4478:   }
 4479: } {3}
 4480: do_test boundary1-2.39.gt.3 {
 4481:   db eval {
 4482:     SELECT a FROM t1 WHERE rowid > 72057594037927936 ORDER BY rowid
 4483:   }
 4484: } {3}
 4485: do_test boundary1-2.39.gt.4 {
 4486:   db eval {
 4487:     SELECT a FROM t1 WHERE rowid > 72057594037927936 ORDER BY rowid DESC
 4488:   }
 4489: } {3}
 4490: do_test boundary1-2.39.gt.5 {
 4491:   db eval {
 4492:     SELECT a FROM t1 WHERE rowid > 72057594037927936 ORDER BY x
 4493:   }
 4494: } {3}
 4495: do_test boundary1-2.39.ge.1 {
 4496:   db eval {
 4497:     SELECT a FROM t1 WHERE rowid >= 72057594037927936 ORDER BY a
 4498:   }
 4499: } {3 28}
 4500: do_test boundary1-2.39.ge.2 {
 4501:   db eval {
 4502:     SELECT a FROM t1 WHERE rowid >= 72057594037927936 ORDER BY a DESC
 4503:   }
 4504: } {28 3}
 4505: do_test boundary1-2.39.ge.3 {
 4506:   db eval {
 4507:     SELECT a FROM t1 WHERE rowid >= 72057594037927936 ORDER BY rowid
 4508:   }
 4509: } {28 3}
 4510: do_test boundary1-2.39.ge.4 {
 4511:   db eval {
 4512:     SELECT a FROM t1 WHERE rowid >= 72057594037927936 ORDER BY rowid DESC
 4513:   }
 4514: } {3 28}
 4515: do_test boundary1-2.39.ge.5 {
 4516:   db eval {
 4517:     SELECT a FROM t1 WHERE rowid >= 72057594037927936 ORDER BY x
 4518:   }
 4519: } {28 3}
 4520: do_test boundary1-2.39.lt.1 {
 4521:   db eval {
 4522:     SELECT a FROM t1 WHERE rowid < 72057594037927936 ORDER BY a
 4523:   }
 4524: } {1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 4525: do_test boundary1-2.39.lt.2 {
 4526:   db eval {
 4527:     SELECT a FROM t1 WHERE rowid < 72057594037927936 ORDER BY a DESC
 4528:   }
 4529: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 2 1}
 4530: do_test boundary1-2.39.lt.3 {
 4531:   db eval {
 4532:     SELECT a FROM t1 WHERE rowid < 72057594037927936 ORDER BY rowid
 4533:   }
 4534: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17}
 4535: do_test boundary1-2.39.lt.4 {
 4536:   db eval {
 4537:     SELECT a FROM t1 WHERE rowid < 72057594037927936 ORDER BY rowid DESC
 4538:   }
 4539: } {17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 4540: do_test boundary1-2.39.lt.5 {
 4541:   db eval {
 4542:     SELECT a FROM t1 WHERE rowid < 72057594037927936 ORDER BY x
 4543:   }
 4544: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 4545: do_test boundary1-2.39.le.1 {
 4546:   db eval {
 4547:     SELECT a FROM t1 WHERE rowid <= 72057594037927936 ORDER BY a
 4548:   }
 4549: } {1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 4550: do_test boundary1-2.39.le.2 {
 4551:   db eval {
 4552:     SELECT a FROM t1 WHERE rowid <= 72057594037927936 ORDER BY a DESC
 4553:   }
 4554: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 2 1}
 4555: do_test boundary1-2.39.le.3 {
 4556:   db eval {
 4557:     SELECT a FROM t1 WHERE rowid <= 72057594037927936 ORDER BY rowid
 4558:   }
 4559: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28}
 4560: do_test boundary1-2.39.le.4 {
 4561:   db eval {
 4562:     SELECT a FROM t1 WHERE rowid <= 72057594037927936 ORDER BY rowid DESC
 4563:   }
 4564: } {28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 4565: do_test boundary1-2.39.le.5 {
 4566:   db eval {
 4567:     SELECT a FROM t1 WHERE rowid <= 72057594037927936 ORDER BY x
 4568:   }
 4569: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 4570: do_test boundary1-2.40.1 {
 4571:   db eval {
 4572:     SELECT * FROM t1 WHERE rowid=2147483648
 4573:   }
 4574: } {51 0000000080000000}
 4575: do_test boundary1-2.40.2 {
 4576:   db eval {
 4577:     SELECT rowid, a FROM t1 WHERE x='0000000080000000'
 4578:   }
 4579: } {2147483648 51}
 4580: do_test boundary1-2.40.3 {
 4581:   db eval {
 4582:     SELECT rowid, x FROM t1 WHERE a=51
 4583:   }
 4584: } {2147483648 0000000080000000}
 4585: do_test boundary1-2.40.gt.1 {
 4586:   db eval {
 4587:     SELECT a FROM t1 WHERE rowid > 2147483648 ORDER BY a
 4588:   }
 4589: } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 56 57}
 4590: do_test boundary1-2.40.gt.2 {
 4591:   db eval {
 4592:     SELECT a FROM t1 WHERE rowid > 2147483648 ORDER BY a DESC
 4593:   }
 4594: } {57 56 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
 4595: do_test boundary1-2.40.gt.3 {
 4596:   db eval {
 4597:     SELECT a FROM t1 WHERE rowid > 2147483648 ORDER BY rowid
 4598:   }
 4599: } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4600: do_test boundary1-2.40.gt.4 {
 4601:   db eval {
 4602:     SELECT a FROM t1 WHERE rowid > 2147483648 ORDER BY rowid DESC
 4603:   }
 4604: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14}
 4605: do_test boundary1-2.40.gt.5 {
 4606:   db eval {
 4607:     SELECT a FROM t1 WHERE rowid > 2147483648 ORDER BY x
 4608:   }
 4609: } {14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4610: do_test boundary1-2.40.ge.1 {
 4611:   db eval {
 4612:     SELECT a FROM t1 WHERE rowid >= 2147483648 ORDER BY a
 4613:   }
 4614: } {3 7 10 13 14 17 19 22 25 26 27 28 34 35 36 39 43 45 46 51 56 57}
 4615: do_test boundary1-2.40.ge.2 {
 4616:   db eval {
 4617:     SELECT a FROM t1 WHERE rowid >= 2147483648 ORDER BY a DESC
 4618:   }
 4619: } {57 56 51 46 45 43 39 36 35 34 28 27 26 25 22 19 17 14 13 10 7 3}
 4620: do_test boundary1-2.40.ge.3 {
 4621:   db eval {
 4622:     SELECT a FROM t1 WHERE rowid >= 2147483648 ORDER BY rowid
 4623:   }
 4624: } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4625: do_test boundary1-2.40.ge.4 {
 4626:   db eval {
 4627:     SELECT a FROM t1 WHERE rowid >= 2147483648 ORDER BY rowid DESC
 4628:   }
 4629: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51}
 4630: do_test boundary1-2.40.ge.5 {
 4631:   db eval {
 4632:     SELECT a FROM t1 WHERE rowid >= 2147483648 ORDER BY x
 4633:   }
 4634: } {51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4635: do_test boundary1-2.40.lt.1 {
 4636:   db eval {
 4637:     SELECT a FROM t1 WHERE rowid < 2147483648 ORDER BY a
 4638:   }
 4639: } {1 2 4 5 6 8 9 11 12 15 16 18 20 21 23 24 29 30 31 32 33 37 38 40 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 4640: do_test boundary1-2.40.lt.2 {
 4641:   db eval {
 4642:     SELECT a FROM t1 WHERE rowid < 2147483648 ORDER BY a DESC
 4643:   }
 4644: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 40 38 37 33 32 31 30 29 24 23 21 20 18 16 15 12 11 9 8 6 5 4 2 1}
 4645: do_test boundary1-2.40.lt.3 {
 4646:   db eval {
 4647:     SELECT a FROM t1 WHERE rowid < 2147483648 ORDER BY rowid
 4648:   }
 4649: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20}
 4650: do_test boundary1-2.40.lt.4 {
 4651:   db eval {
 4652:     SELECT a FROM t1 WHERE rowid < 2147483648 ORDER BY rowid DESC
 4653:   }
 4654: } {20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 4655: do_test boundary1-2.40.lt.5 {
 4656:   db eval {
 4657:     SELECT a FROM t1 WHERE rowid < 2147483648 ORDER BY x
 4658:   }
 4659: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 4660: do_test boundary1-2.40.le.1 {
 4661:   db eval {
 4662:     SELECT a FROM t1 WHERE rowid <= 2147483648 ORDER BY a
 4663:   }
 4664: } {1 2 4 5 6 8 9 11 12 15 16 18 20 21 23 24 29 30 31 32 33 37 38 40 41 42 44 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
 4665: do_test boundary1-2.40.le.2 {
 4666:   db eval {
 4667:     SELECT a FROM t1 WHERE rowid <= 2147483648 ORDER BY a DESC
 4668:   }
 4669: } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 44 42 41 40 38 37 33 32 31 30 29 24 23 21 20 18 16 15 12 11 9 8 6 5 4 2 1}
 4670: do_test boundary1-2.40.le.3 {
 4671:   db eval {
 4672:     SELECT a FROM t1 WHERE rowid <= 2147483648 ORDER BY rowid
 4673:   }
 4674: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51}
 4675: do_test boundary1-2.40.le.4 {
 4676:   db eval {
 4677:     SELECT a FROM t1 WHERE rowid <= 2147483648 ORDER BY rowid DESC
 4678:   }
 4679: } {51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 4680: do_test boundary1-2.40.le.5 {
 4681:   db eval {
 4682:     SELECT a FROM t1 WHERE rowid <= 2147483648 ORDER BY x
 4683:   }
 4684: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 4685: do_test boundary1-2.41.1 {
 4686:   db eval {
 4687:     SELECT * FROM t1 WHERE rowid=549755813887
 4688:   }
 4689: } {46 0000007fffffffff}
 4690: do_test boundary1-2.41.2 {
 4691:   db eval {
 4692:     SELECT rowid, a FROM t1 WHERE x='0000007fffffffff'
 4693:   }
 4694: } {549755813887 46}
 4695: do_test boundary1-2.41.3 {
 4696:   db eval {
 4697:     SELECT rowid, x FROM t1 WHERE a=46
 4698:   }
 4699: } {549755813887 0000007fffffffff}
 4700: do_test boundary1-2.41.gt.1 {
 4701:   db eval {
 4702:     SELECT a FROM t1 WHERE rowid > 549755813887 ORDER BY a
 4703:   }
 4704: } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 56 57}
 4705: do_test boundary1-2.41.gt.2 {
 4706:   db eval {
 4707:     SELECT a FROM t1 WHERE rowid > 549755813887 ORDER BY a DESC
 4708:   }
 4709: } {57 56 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
 4710: do_test boundary1-2.41.gt.3 {
 4711:   db eval {
 4712:     SELECT a FROM t1 WHERE rowid > 549755813887 ORDER BY rowid
 4713:   }
 4714: } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4715: do_test boundary1-2.41.gt.4 {
 4716:   db eval {
 4717:     SELECT a FROM t1 WHERE rowid > 549755813887 ORDER BY rowid DESC
 4718:   }
 4719: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35}
 4720: do_test boundary1-2.41.gt.5 {
 4721:   db eval {
 4722:     SELECT a FROM t1 WHERE rowid > 549755813887 ORDER BY x
 4723:   }
 4724: } {35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4725: do_test boundary1-2.41.ge.1 {
 4726:   db eval {
 4727:     SELECT a FROM t1 WHERE rowid >= 549755813887 ORDER BY a
 4728:   }
 4729: } {3 7 10 13 17 19 25 26 27 28 34 35 43 45 46 56 57}
 4730: do_test boundary1-2.41.ge.2 {
 4731:   db eval {
 4732:     SELECT a FROM t1 WHERE rowid >= 549755813887 ORDER BY a DESC
 4733:   }
 4734: } {57 56 46 45 43 35 34 28 27 26 25 19 17 13 10 7 3}
 4735: do_test boundary1-2.41.ge.3 {
 4736:   db eval {
 4737:     SELECT a FROM t1 WHERE rowid >= 549755813887 ORDER BY rowid
 4738:   }
 4739: } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4740: do_test boundary1-2.41.ge.4 {
 4741:   db eval {
 4742:     SELECT a FROM t1 WHERE rowid >= 549755813887 ORDER BY rowid DESC
 4743:   }
 4744: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46}
 4745: do_test boundary1-2.41.ge.5 {
 4746:   db eval {
 4747:     SELECT a FROM t1 WHERE rowid >= 549755813887 ORDER BY x
 4748:   }
 4749: } {46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4750: do_test boundary1-2.41.lt.1 {
 4751:   db eval {
 4752:     SELECT a FROM t1 WHERE rowid < 549755813887 ORDER BY a
 4753:   }
 4754: } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 22 23 24 29 30 31 32 33 36 37 38 39 40 41 42 44 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
 4755: do_test boundary1-2.41.lt.2 {
 4756:   db eval {
 4757:     SELECT a FROM t1 WHERE rowid < 549755813887 ORDER BY a DESC
 4758:   }
 4759: } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 44 42 41 40 39 38 37 36 33 32 31 30 29 24 23 22 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
 4760: do_test boundary1-2.41.lt.3 {
 4761:   db eval {
 4762:     SELECT a FROM t1 WHERE rowid < 549755813887 ORDER BY rowid
 4763:   }
 4764: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22}
 4765: do_test boundary1-2.41.lt.4 {
 4766:   db eval {
 4767:     SELECT a FROM t1 WHERE rowid < 549755813887 ORDER BY rowid DESC
 4768:   }
 4769: } {22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 4770: do_test boundary1-2.41.lt.5 {
 4771:   db eval {
 4772:     SELECT a FROM t1 WHERE rowid < 549755813887 ORDER BY x
 4773:   }
 4774: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 4775: do_test boundary1-2.41.le.1 {
 4776:   db eval {
 4777:     SELECT a FROM t1 WHERE rowid <= 549755813887 ORDER BY a
 4778:   }
 4779: } {1 2 4 5 6 8 9 11 12 14 15 16 18 20 21 22 23 24 29 30 31 32 33 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 58 59 60 61 62 63 64}
 4780: do_test boundary1-2.41.le.2 {
 4781:   db eval {
 4782:     SELECT a FROM t1 WHERE rowid <= 549755813887 ORDER BY a DESC
 4783:   }
 4784: } {64 63 62 61 60 59 58 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 33 32 31 30 29 24 23 22 21 20 18 16 15 14 12 11 9 8 6 5 4 2 1}
 4785: do_test boundary1-2.41.le.3 {
 4786:   db eval {
 4787:     SELECT a FROM t1 WHERE rowid <= 549755813887 ORDER BY rowid
 4788:   }
 4789: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46}
 4790: do_test boundary1-2.41.le.4 {
 4791:   db eval {
 4792:     SELECT a FROM t1 WHERE rowid <= 549755813887 ORDER BY rowid DESC
 4793:   }
 4794: } {46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 4795: do_test boundary1-2.41.le.5 {
 4796:   db eval {
 4797:     SELECT a FROM t1 WHERE rowid <= 549755813887 ORDER BY x
 4798:   }
 4799: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 4800: do_test boundary1-2.42.1 {
 4801:   db eval {
 4802:     SELECT * FROM t1 WHERE rowid=-549755813888
 4803:   }
 4804: } {63 ffffff8000000000}
 4805: do_test boundary1-2.42.2 {
 4806:   db eval {
 4807:     SELECT rowid, a FROM t1 WHERE x='ffffff8000000000'
 4808:   }
 4809: } {-549755813888 63}
 4810: do_test boundary1-2.42.3 {
 4811:   db eval {
 4812:     SELECT rowid, x FROM t1 WHERE a=63
 4813:   }
 4814: } {-549755813888 ffffff8000000000}
 4815: do_test boundary1-2.42.gt.1 {
 4816:   db eval {
 4817:     SELECT a FROM t1 WHERE rowid > -549755813888 ORDER BY a
 4818:   }
 4819: } {1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 45 46 47 48 49 50 51 52 53 54 56 57 59 60 61 62}
 4820: do_test boundary1-2.42.gt.2 {
 4821:   db eval {
 4822:     SELECT a FROM t1 WHERE rowid > -549755813888 ORDER BY a DESC
 4823:   }
 4824: } {62 61 60 59 57 56 54 53 52 51 50 49 48 47 46 45 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 1}
 4825: do_test boundary1-2.42.gt.3 {
 4826:   db eval {
 4827:     SELECT a FROM t1 WHERE rowid > -549755813888 ORDER BY rowid
 4828:   }
 4829: } {47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4830: do_test boundary1-2.42.gt.4 {
 4831:   db eval {
 4832:     SELECT a FROM t1 WHERE rowid > -549755813888 ORDER BY rowid DESC
 4833:   }
 4834: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47}
 4835: do_test boundary1-2.42.gt.5 {
 4836:   db eval {
 4837:     SELECT a FROM t1 WHERE rowid > -549755813888 ORDER BY x
 4838:   }
 4839: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 47 11 1 37 29 32 54 53 52 33 38}
 4840: do_test boundary1-2.42.ge.1 {
 4841:   db eval {
 4842:     SELECT a FROM t1 WHERE rowid >= -549755813888 ORDER BY a
 4843:   }
 4844: } {1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 45 46 47 48 49 50 51 52 53 54 56 57 59 60 61 62 63}
 4845: do_test boundary1-2.42.ge.2 {
 4846:   db eval {
 4847:     SELECT a FROM t1 WHERE rowid >= -549755813888 ORDER BY a DESC
 4848:   }
 4849: } {63 62 61 60 59 57 56 54 53 52 51 50 49 48 47 46 45 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 1}
 4850: do_test boundary1-2.42.ge.3 {
 4851:   db eval {
 4852:     SELECT a FROM t1 WHERE rowid >= -549755813888 ORDER BY rowid
 4853:   }
 4854: } {63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 4855: do_test boundary1-2.42.ge.4 {
 4856:   db eval {
 4857:     SELECT a FROM t1 WHERE rowid >= -549755813888 ORDER BY rowid DESC
 4858:   }
 4859: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63}
 4860: do_test boundary1-2.42.ge.5 {
 4861:   db eval {
 4862:     SELECT a FROM t1 WHERE rowid >= -549755813888 ORDER BY x
 4863:   }
 4864: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 63 47 11 1 37 29 32 54 53 52 33 38}
 4865: do_test boundary1-2.42.lt.1 {
 4866:   db eval {
 4867:     SELECT a FROM t1 WHERE rowid < -549755813888 ORDER BY a
 4868:   }
 4869: } {2 21 44 55 58 64}
 4870: do_test boundary1-2.42.lt.2 {
 4871:   db eval {
 4872:     SELECT a FROM t1 WHERE rowid < -549755813888 ORDER BY a DESC
 4873:   }
 4874: } {64 58 55 44 21 2}
 4875: do_test boundary1-2.42.lt.3 {
 4876:   db eval {
 4877:     SELECT a FROM t1 WHERE rowid < -549755813888 ORDER BY rowid
 4878:   }
 4879: } {55 2 64 21 44 58}
 4880: do_test boundary1-2.42.lt.4 {
 4881:   db eval {
 4882:     SELECT a FROM t1 WHERE rowid < -549755813888 ORDER BY rowid DESC
 4883:   }
 4884: } {58 44 21 64 2 55}
 4885: do_test boundary1-2.42.lt.5 {
 4886:   db eval {
 4887:     SELECT a FROM t1 WHERE rowid < -549755813888 ORDER BY x
 4888:   }
 4889: } {55 2 64 21 44 58}
 4890: do_test boundary1-2.42.le.1 {
 4891:   db eval {
 4892:     SELECT a FROM t1 WHERE rowid <= -549755813888 ORDER BY a
 4893:   }
 4894: } {2 21 44 55 58 63 64}
 4895: do_test boundary1-2.42.le.2 {
 4896:   db eval {
 4897:     SELECT a FROM t1 WHERE rowid <= -549755813888 ORDER BY a DESC
 4898:   }
 4899: } {64 63 58 55 44 21 2}
 4900: do_test boundary1-2.42.le.3 {
 4901:   db eval {
 4902:     SELECT a FROM t1 WHERE rowid <= -549755813888 ORDER BY rowid
 4903:   }
 4904: } {55 2 64 21 44 58 63}
 4905: do_test boundary1-2.42.le.4 {
 4906:   db eval {
 4907:     SELECT a FROM t1 WHERE rowid <= -549755813888 ORDER BY rowid DESC
 4908:   }
 4909: } {63 58 44 21 64 2 55}
 4910: do_test boundary1-2.42.le.5 {
 4911:   db eval {
 4912:     SELECT a FROM t1 WHERE rowid <= -549755813888 ORDER BY x
 4913:   }
 4914: } {55 2 64 21 44 58 63}
 4915: do_test boundary1-2.43.1 {
 4916:   db eval {
 4917:     SELECT * FROM t1 WHERE rowid=281474976710655
 4918:   }
 4919: } {10 0000ffffffffffff}
 4920: do_test boundary1-2.43.2 {
 4921:   db eval {
 4922:     SELECT rowid, a FROM t1 WHERE x='0000ffffffffffff'
 4923:   }
 4924: } {281474976710655 10}
 4925: do_test boundary1-2.43.3 {
 4926:   db eval {
 4927:     SELECT rowid, x FROM t1 WHERE a=10
 4928:   }
 4929: } {281474976710655 0000ffffffffffff}
 4930: do_test boundary1-2.43.gt.1 {
 4931:   db eval {
 4932:     SELECT a FROM t1 WHERE rowid > 281474976710655 ORDER BY a
 4933:   }
 4934: } {3 13 17 26 27 28 43 45}
 4935: do_test boundary1-2.43.gt.2 {
 4936:   db eval {
 4937:     SELECT a FROM t1 WHERE rowid > 281474976710655 ORDER BY a DESC
 4938:   }
 4939: } {45 43 28 27 26 17 13 3}
 4940: do_test boundary1-2.43.gt.3 {
 4941:   db eval {
 4942:     SELECT a FROM t1 WHERE rowid > 281474976710655 ORDER BY rowid
 4943:   }
 4944: } {26 13 43 27 45 17 28 3}
 4945: do_test boundary1-2.43.gt.4 {
 4946:   db eval {
 4947:     SELECT a FROM t1 WHERE rowid > 281474976710655 ORDER BY rowid DESC
 4948:   }
 4949: } {3 28 17 45 27 43 13 26}
 4950: do_test boundary1-2.43.gt.5 {
 4951:   db eval {
 4952:     SELECT a FROM t1 WHERE rowid > 281474976710655 ORDER BY x
 4953:   }
 4954: } {26 13 43 27 45 17 28 3}
 4955: do_test boundary1-2.43.ge.1 {
 4956:   db eval {
 4957:     SELECT a FROM t1 WHERE rowid >= 281474976710655 ORDER BY a
 4958:   }
 4959: } {3 10 13 17 26 27 28 43 45}
 4960: do_test boundary1-2.43.ge.2 {
 4961:   db eval {
 4962:     SELECT a FROM t1 WHERE rowid >= 281474976710655 ORDER BY a DESC
 4963:   }
 4964: } {45 43 28 27 26 17 13 10 3}
 4965: do_test boundary1-2.43.ge.3 {
 4966:   db eval {
 4967:     SELECT a FROM t1 WHERE rowid >= 281474976710655 ORDER BY rowid
 4968:   }
 4969: } {10 26 13 43 27 45 17 28 3}
 4970: do_test boundary1-2.43.ge.4 {
 4971:   db eval {
 4972:     SELECT a FROM t1 WHERE rowid >= 281474976710655 ORDER BY rowid DESC
 4973:   }
 4974: } {3 28 17 45 27 43 13 26 10}
 4975: do_test boundary1-2.43.ge.5 {
 4976:   db eval {
 4977:     SELECT a FROM t1 WHERE rowid >= 281474976710655 ORDER BY x
 4978:   }
 4979: } {10 26 13 43 27 45 17 28 3}
 4980: do_test boundary1-2.43.lt.1 {
 4981:   db eval {
 4982:     SELECT a FROM t1 WHERE rowid < 281474976710655 ORDER BY a
 4983:   }
 4984: } {1 2 4 5 6 7 8 9 11 12 14 15 16 18 19 20 21 22 23 24 25 29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 4985: do_test boundary1-2.43.lt.2 {
 4986:   db eval {
 4987:     SELECT a FROM t1 WHERE rowid < 281474976710655 ORDER BY a DESC
 4988:   }
 4989: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 34 33 32 31 30 29 25 24 23 22 21 20 19 18 16 15 14 12 11 9 8 7 6 5 4 2 1}
 4990: do_test boundary1-2.43.lt.3 {
 4991:   db eval {
 4992:     SELECT a FROM t1 WHERE rowid < 281474976710655 ORDER BY rowid
 4993:   }
 4994: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34}
 4995: do_test boundary1-2.43.lt.4 {
 4996:   db eval {
 4997:     SELECT a FROM t1 WHERE rowid < 281474976710655 ORDER BY rowid DESC
 4998:   }
 4999: } {34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 5000: do_test boundary1-2.43.lt.5 {
 5001:   db eval {
 5002:     SELECT a FROM t1 WHERE rowid < 281474976710655 ORDER BY x
 5003:   }
 5004: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 5005: do_test boundary1-2.43.le.1 {
 5006:   db eval {
 5007:     SELECT a FROM t1 WHERE rowid <= 281474976710655 ORDER BY a
 5008:   }
 5009: } {1 2 4 5 6 7 8 9 10 11 12 14 15 16 18 19 20 21 22 23 24 25 29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 5010: do_test boundary1-2.43.le.2 {
 5011:   db eval {
 5012:     SELECT a FROM t1 WHERE rowid <= 281474976710655 ORDER BY a DESC
 5013:   }
 5014: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 34 33 32 31 30 29 25 24 23 22 21 20 19 18 16 15 14 12 11 10 9 8 7 6 5 4 2 1}
 5015: do_test boundary1-2.43.le.3 {
 5016:   db eval {
 5017:     SELECT a FROM t1 WHERE rowid <= 281474976710655 ORDER BY rowid
 5018:   }
 5019: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10}
 5020: do_test boundary1-2.43.le.4 {
 5021:   db eval {
 5022:     SELECT a FROM t1 WHERE rowid <= 281474976710655 ORDER BY rowid DESC
 5023:   }
 5024: } {10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 5025: do_test boundary1-2.43.le.5 {
 5026:   db eval {
 5027:     SELECT a FROM t1 WHERE rowid <= 281474976710655 ORDER BY x
 5028:   }
 5029: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 5030: do_test boundary1-2.44.1 {
 5031:   db eval {
 5032:     SELECT * FROM t1 WHERE rowid=4398046511103
 5033:   }
 5034: } {7 000003ffffffffff}
 5035: do_test boundary1-2.44.2 {
 5036:   db eval {
 5037:     SELECT rowid, a FROM t1 WHERE x='000003ffffffffff'
 5038:   }
 5039: } {4398046511103 7}
 5040: do_test boundary1-2.44.3 {
 5041:   db eval {
 5042:     SELECT rowid, x FROM t1 WHERE a=7
 5043:   }
 5044: } {4398046511103 000003ffffffffff}
 5045: do_test boundary1-2.44.gt.1 {
 5046:   db eval {
 5047:     SELECT a FROM t1 WHERE rowid > 4398046511103 ORDER BY a
 5048:   }
 5049: } {3 10 13 17 25 26 27 28 34 43 45 56}
 5050: do_test boundary1-2.44.gt.2 {
 5051:   db eval {
 5052:     SELECT a FROM t1 WHERE rowid > 4398046511103 ORDER BY a DESC
 5053:   }
 5054: } {56 45 43 34 28 27 26 25 17 13 10 3}
 5055: do_test boundary1-2.44.gt.3 {
 5056:   db eval {
 5057:     SELECT a FROM t1 WHERE rowid > 4398046511103 ORDER BY rowid
 5058:   }
 5059: } {56 25 34 10 26 13 43 27 45 17 28 3}
 5060: do_test boundary1-2.44.gt.4 {
 5061:   db eval {
 5062:     SELECT a FROM t1 WHERE rowid > 4398046511103 ORDER BY rowid DESC
 5063:   }
 5064: } {3 28 17 45 27 43 13 26 10 34 25 56}
 5065: do_test boundary1-2.44.gt.5 {
 5066:   db eval {
 5067:     SELECT a FROM t1 WHERE rowid > 4398046511103 ORDER BY x
 5068:   }
 5069: } {56 25 34 10 26 13 43 27 45 17 28 3}
 5070: do_test boundary1-2.44.ge.1 {
 5071:   db eval {
 5072:     SELECT a FROM t1 WHERE rowid >= 4398046511103 ORDER BY a
 5073:   }
 5074: } {3 7 10 13 17 25 26 27 28 34 43 45 56}
 5075: do_test boundary1-2.44.ge.2 {
 5076:   db eval {
 5077:     SELECT a FROM t1 WHERE rowid >= 4398046511103 ORDER BY a DESC
 5078:   }
 5079: } {56 45 43 34 28 27 26 25 17 13 10 7 3}
 5080: do_test boundary1-2.44.ge.3 {
 5081:   db eval {
 5082:     SELECT a FROM t1 WHERE rowid >= 4398046511103 ORDER BY rowid
 5083:   }
 5084: } {7 56 25 34 10 26 13 43 27 45 17 28 3}
 5085: do_test boundary1-2.44.ge.4 {
 5086:   db eval {
 5087:     SELECT a FROM t1 WHERE rowid >= 4398046511103 ORDER BY rowid DESC
 5088:   }
 5089: } {3 28 17 45 27 43 13 26 10 34 25 56 7}
 5090: do_test boundary1-2.44.ge.5 {
 5091:   db eval {
 5092:     SELECT a FROM t1 WHERE rowid >= 4398046511103 ORDER BY x
 5093:   }
 5094: } {7 56 25 34 10 26 13 43 27 45 17 28 3}
 5095: do_test boundary1-2.44.lt.1 {
 5096:   db eval {
 5097:     SELECT a FROM t1 WHERE rowid < 4398046511103 ORDER BY a
 5098:   }
 5099: } {1 2 4 5 6 8 9 11 12 14 15 16 18 19 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64}
 5100: do_test boundary1-2.44.lt.2 {
 5101:   db eval {
 5102:     SELECT a FROM t1 WHERE rowid < 4398046511103 ORDER BY a DESC
 5103:   }
 5104: } {64 63 62 61 60 59 58 57 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 19 18 16 15 14 12 11 9 8 6 5 4 2 1}
 5105: do_test boundary1-2.44.lt.3 {
 5106:   db eval {
 5107:     SELECT a FROM t1 WHERE rowid < 4398046511103 ORDER BY rowid
 5108:   }
 5109: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19}
 5110: do_test boundary1-2.44.lt.4 {
 5111:   db eval {
 5112:     SELECT a FROM t1 WHERE rowid < 4398046511103 ORDER BY rowid DESC
 5113:   }
 5114: } {19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 5115: do_test boundary1-2.44.lt.5 {
 5116:   db eval {
 5117:     SELECT a FROM t1 WHERE rowid < 4398046511103 ORDER BY x
 5118:   }
 5119: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 5120: do_test boundary1-2.44.le.1 {
 5121:   db eval {
 5122:     SELECT a FROM t1 WHERE rowid <= 4398046511103 ORDER BY a
 5123:   }
 5124: } {1 2 4 5 6 7 8 9 11 12 14 15 16 18 19 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64}
 5125: do_test boundary1-2.44.le.2 {
 5126:   db eval {
 5127:     SELECT a FROM t1 WHERE rowid <= 4398046511103 ORDER BY a DESC
 5128:   }
 5129: } {64 63 62 61 60 59 58 57 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 19 18 16 15 14 12 11 9 8 7 6 5 4 2 1}
 5130: do_test boundary1-2.44.le.3 {
 5131:   db eval {
 5132:     SELECT a FROM t1 WHERE rowid <= 4398046511103 ORDER BY rowid
 5133:   }
 5134: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7}
 5135: do_test boundary1-2.44.le.4 {
 5136:   db eval {
 5137:     SELECT a FROM t1 WHERE rowid <= 4398046511103 ORDER BY rowid DESC
 5138:   }
 5139: } {7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 5140: do_test boundary1-2.44.le.5 {
 5141:   db eval {
 5142:     SELECT a FROM t1 WHERE rowid <= 4398046511103 ORDER BY x
 5143:   }
 5144: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 5145: do_test boundary1-2.45.1 {
 5146:   db eval {
 5147:     SELECT * FROM t1 WHERE rowid=268435455
 5148:   }
 5149: } {12 000000000fffffff}
 5150: do_test boundary1-2.45.2 {
 5151:   db eval {
 5152:     SELECT rowid, a FROM t1 WHERE x='000000000fffffff'
 5153:   }
 5154: } {268435455 12}
 5155: do_test boundary1-2.45.3 {
 5156:   db eval {
 5157:     SELECT rowid, x FROM t1 WHERE a=12
 5158:   }
 5159: } {268435455 000000000fffffff}
 5160: do_test boundary1-2.45.gt.1 {
 5161:   db eval {
 5162:     SELECT a FROM t1 WHERE rowid > 268435455 ORDER BY a
 5163:   }
 5164: } {3 7 10 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
 5165: do_test boundary1-2.45.gt.2 {
 5166:   db eval {
 5167:     SELECT a FROM t1 WHERE rowid > 268435455 ORDER BY a DESC
 5168:   }
 5169: } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 10 7 3}
 5170: do_test boundary1-2.45.gt.3 {
 5171:   db eval {
 5172:     SELECT a FROM t1 WHERE rowid > 268435455 ORDER BY rowid
 5173:   }
 5174: } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5175: do_test boundary1-2.45.gt.4 {
 5176:   db eval {
 5177:     SELECT a FROM t1 WHERE rowid > 268435455 ORDER BY rowid DESC
 5178:   }
 5179: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40}
 5180: do_test boundary1-2.45.gt.5 {
 5181:   db eval {
 5182:     SELECT a FROM t1 WHERE rowid > 268435455 ORDER BY x
 5183:   }
 5184: } {40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5185: do_test boundary1-2.45.ge.1 {
 5186:   db eval {
 5187:     SELECT a FROM t1 WHERE rowid >= 268435455 ORDER BY a
 5188:   }
 5189: } {3 7 10 12 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
 5190: do_test boundary1-2.45.ge.2 {
 5191:   db eval {
 5192:     SELECT a FROM t1 WHERE rowid >= 268435455 ORDER BY a DESC
 5193:   }
 5194: } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 12 10 7 3}
 5195: do_test boundary1-2.45.ge.3 {
 5196:   db eval {
 5197:     SELECT a FROM t1 WHERE rowid >= 268435455 ORDER BY rowid
 5198:   }
 5199: } {12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5200: do_test boundary1-2.45.ge.4 {
 5201:   db eval {
 5202:     SELECT a FROM t1 WHERE rowid >= 268435455 ORDER BY rowid DESC
 5203:   }
 5204: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12}
 5205: do_test boundary1-2.45.ge.5 {
 5206:   db eval {
 5207:     SELECT a FROM t1 WHERE rowid >= 268435455 ORDER BY x
 5208:   }
 5209: } {12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5210: do_test boundary1-2.45.lt.1 {
 5211:   db eval {
 5212:     SELECT a FROM t1 WHERE rowid < 268435455 ORDER BY a
 5213:   }
 5214: } {1 2 4 5 6 8 9 11 15 16 18 21 23 24 29 30 31 32 33 37 38 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 5215: do_test boundary1-2.45.lt.2 {
 5216:   db eval {
 5217:     SELECT a FROM t1 WHERE rowid < 268435455 ORDER BY a DESC
 5218:   }
 5219: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 38 37 33 32 31 30 29 24 23 21 18 16 15 11 9 8 6 5 4 2 1}
 5220: do_test boundary1-2.45.lt.3 {
 5221:   db eval {
 5222:     SELECT a FROM t1 WHERE rowid < 268435455 ORDER BY rowid
 5223:   }
 5224: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6}
 5225: do_test boundary1-2.45.lt.4 {
 5226:   db eval {
 5227:     SELECT a FROM t1 WHERE rowid < 268435455 ORDER BY rowid DESC
 5228:   }
 5229: } {6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 5230: do_test boundary1-2.45.lt.5 {
 5231:   db eval {
 5232:     SELECT a FROM t1 WHERE rowid < 268435455 ORDER BY x
 5233:   }
 5234: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 5235: do_test boundary1-2.45.le.1 {
 5236:   db eval {
 5237:     SELECT a FROM t1 WHERE rowid <= 268435455 ORDER BY a
 5238:   }
 5239: } {1 2 4 5 6 8 9 11 12 15 16 18 21 23 24 29 30 31 32 33 37 38 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 5240: do_test boundary1-2.45.le.2 {
 5241:   db eval {
 5242:     SELECT a FROM t1 WHERE rowid <= 268435455 ORDER BY a DESC
 5243:   }
 5244: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 38 37 33 32 31 30 29 24 23 21 18 16 15 12 11 9 8 6 5 4 2 1}
 5245: do_test boundary1-2.45.le.3 {
 5246:   db eval {
 5247:     SELECT a FROM t1 WHERE rowid <= 268435455 ORDER BY rowid
 5248:   }
 5249: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12}
 5250: do_test boundary1-2.45.le.4 {
 5251:   db eval {
 5252:     SELECT a FROM t1 WHERE rowid <= 268435455 ORDER BY rowid DESC
 5253:   }
 5254: } {12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 5255: do_test boundary1-2.45.le.5 {
 5256:   db eval {
 5257:     SELECT a FROM t1 WHERE rowid <= 268435455 ORDER BY x
 5258:   }
 5259: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 5260: do_test boundary1-2.46.1 {
 5261:   db eval {
 5262:     SELECT * FROM t1 WHERE rowid=-9223372036854775808
 5263:   }
 5264: } {55 8000000000000000}
 5265: do_test boundary1-2.46.2 {
 5266:   db eval {
 5267:     SELECT rowid, a FROM t1 WHERE x='8000000000000000'
 5268:   }
 5269: } {-9223372036854775808 55}
 5270: do_test boundary1-2.46.3 {
 5271:   db eval {
 5272:     SELECT rowid, x FROM t1 WHERE a=55
 5273:   }
 5274: } {-9223372036854775808 8000000000000000}
 5275: do_test boundary1-2.46.gt.1 {
 5276:   db eval {
 5277:     SELECT a FROM t1 WHERE rowid > -9223372036854775808 ORDER BY a
 5278:   }
 5279: } {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 56 57 58 59 60 61 62 63 64}
 5280: do_test boundary1-2.46.gt.2 {
 5281:   db eval {
 5282:     SELECT a FROM t1 WHERE rowid > -9223372036854775808 ORDER BY a DESC
 5283:   }
 5284: } {64 63 62 61 60 59 58 57 56 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1}
 5285: do_test boundary1-2.46.gt.3 {
 5286:   db eval {
 5287:     SELECT a FROM t1 WHERE rowid > -9223372036854775808 ORDER BY rowid
 5288:   }
 5289: } {2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5290: do_test boundary1-2.46.gt.4 {
 5291:   db eval {
 5292:     SELECT a FROM t1 WHERE rowid > -9223372036854775808 ORDER BY rowid DESC
 5293:   }
 5294: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2}
 5295: do_test boundary1-2.46.gt.5 {
 5296:   db eval {
 5297:     SELECT a FROM t1 WHERE rowid > -9223372036854775808 ORDER BY x
 5298:   }
 5299: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 5300: do_test boundary1-2.46.ge.1 {
 5301:   db eval {
 5302:     SELECT a FROM t1 WHERE rowid >= -9223372036854775808 ORDER BY a
 5303:   }
 5304: } {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 5305: do_test boundary1-2.46.ge.2 {
 5306:   db eval {
 5307:     SELECT a FROM t1 WHERE rowid >= -9223372036854775808 ORDER BY a DESC
 5308:   }
 5309: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1}
 5310: do_test boundary1-2.46.ge.3 {
 5311:   db eval {
 5312:     SELECT a FROM t1 WHERE rowid >= -9223372036854775808 ORDER BY rowid
 5313:   }
 5314: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5315: do_test boundary1-2.46.ge.4 {
 5316:   db eval {
 5317:     SELECT a FROM t1 WHERE rowid >= -9223372036854775808 ORDER BY rowid DESC
 5318:   }
 5319: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 5320: do_test boundary1-2.46.ge.5 {
 5321:   db eval {
 5322:     SELECT a FROM t1 WHERE rowid >= -9223372036854775808 ORDER BY x
 5323:   }
 5324: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 5325: do_test boundary1-2.46.lt.1 {
 5326:   db eval {
 5327:     SELECT a FROM t1 WHERE rowid < -9223372036854775808 ORDER BY a
 5328:   }
 5329: } {}
 5330: do_test boundary1-2.46.lt.2 {
 5331:   db eval {
 5332:     SELECT a FROM t1 WHERE rowid < -9223372036854775808 ORDER BY a DESC
 5333:   }
 5334: } {}
 5335: do_test boundary1-2.46.lt.3 {
 5336:   db eval {
 5337:     SELECT a FROM t1 WHERE rowid < -9223372036854775808 ORDER BY rowid
 5338:   }
 5339: } {}
 5340: do_test boundary1-2.46.lt.4 {
 5341:   db eval {
 5342:     SELECT a FROM t1 WHERE rowid < -9223372036854775808 ORDER BY rowid DESC
 5343:   }
 5344: } {}
 5345: do_test boundary1-2.46.lt.5 {
 5346:   db eval {
 5347:     SELECT a FROM t1 WHERE rowid < -9223372036854775808 ORDER BY x
 5348:   }
 5349: } {}
 5350: do_test boundary1-2.46.le.1 {
 5351:   db eval {
 5352:     SELECT a FROM t1 WHERE rowid <= -9223372036854775808 ORDER BY a
 5353:   }
 5354: } {55}
 5355: do_test boundary1-2.46.le.2 {
 5356:   db eval {
 5357:     SELECT a FROM t1 WHERE rowid <= -9223372036854775808 ORDER BY a DESC
 5358:   }
 5359: } {55}
 5360: do_test boundary1-2.46.le.3 {
 5361:   db eval {
 5362:     SELECT a FROM t1 WHERE rowid <= -9223372036854775808 ORDER BY rowid
 5363:   }
 5364: } {55}
 5365: do_test boundary1-2.46.le.4 {
 5366:   db eval {
 5367:     SELECT a FROM t1 WHERE rowid <= -9223372036854775808 ORDER BY rowid DESC
 5368:   }
 5369: } {55}
 5370: do_test boundary1-2.46.le.5 {
 5371:   db eval {
 5372:     SELECT a FROM t1 WHERE rowid <= -9223372036854775808 ORDER BY x
 5373:   }
 5374: } {55}
 5375: do_test boundary1-2.47.1 {
 5376:   db eval {
 5377:     SELECT * FROM t1 WHERE rowid=562949953421312
 5378:   }
 5379: } {43 0002000000000000}
 5380: do_test boundary1-2.47.2 {
 5381:   db eval {
 5382:     SELECT rowid, a FROM t1 WHERE x='0002000000000000'
 5383:   }
 5384: } {562949953421312 43}
 5385: do_test boundary1-2.47.3 {
 5386:   db eval {
 5387:     SELECT rowid, x FROM t1 WHERE a=43
 5388:   }
 5389: } {562949953421312 0002000000000000}
 5390: do_test boundary1-2.47.gt.1 {
 5391:   db eval {
 5392:     SELECT a FROM t1 WHERE rowid > 562949953421312 ORDER BY a
 5393:   }
 5394: } {3 17 27 28 45}
 5395: do_test boundary1-2.47.gt.2 {
 5396:   db eval {
 5397:     SELECT a FROM t1 WHERE rowid > 562949953421312 ORDER BY a DESC
 5398:   }
 5399: } {45 28 27 17 3}
 5400: do_test boundary1-2.47.gt.3 {
 5401:   db eval {
 5402:     SELECT a FROM t1 WHERE rowid > 562949953421312 ORDER BY rowid
 5403:   }
 5404: } {27 45 17 28 3}
 5405: do_test boundary1-2.47.gt.4 {
 5406:   db eval {
 5407:     SELECT a FROM t1 WHERE rowid > 562949953421312 ORDER BY rowid DESC
 5408:   }
 5409: } {3 28 17 45 27}
 5410: do_test boundary1-2.47.gt.5 {
 5411:   db eval {
 5412:     SELECT a FROM t1 WHERE rowid > 562949953421312 ORDER BY x
 5413:   }
 5414: } {27 45 17 28 3}
 5415: do_test boundary1-2.47.ge.1 {
 5416:   db eval {
 5417:     SELECT a FROM t1 WHERE rowid >= 562949953421312 ORDER BY a
 5418:   }
 5419: } {3 17 27 28 43 45}
 5420: do_test boundary1-2.47.ge.2 {
 5421:   db eval {
 5422:     SELECT a FROM t1 WHERE rowid >= 562949953421312 ORDER BY a DESC
 5423:   }
 5424: } {45 43 28 27 17 3}
 5425: do_test boundary1-2.47.ge.3 {
 5426:   db eval {
 5427:     SELECT a FROM t1 WHERE rowid >= 562949953421312 ORDER BY rowid
 5428:   }
 5429: } {43 27 45 17 28 3}
 5430: do_test boundary1-2.47.ge.4 {
 5431:   db eval {
 5432:     SELECT a FROM t1 WHERE rowid >= 562949953421312 ORDER BY rowid DESC
 5433:   }
 5434: } {3 28 17 45 27 43}
 5435: do_test boundary1-2.47.ge.5 {
 5436:   db eval {
 5437:     SELECT a FROM t1 WHERE rowid >= 562949953421312 ORDER BY x
 5438:   }
 5439: } {43 27 45 17 28 3}
 5440: do_test boundary1-2.47.lt.1 {
 5441:   db eval {
 5442:     SELECT a FROM t1 WHERE rowid < 562949953421312 ORDER BY a
 5443:   }
 5444: } {1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 5445: do_test boundary1-2.47.lt.2 {
 5446:   db eval {
 5447:     SELECT a FROM t1 WHERE rowid < 562949953421312 ORDER BY a DESC
 5448:   }
 5449: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 34 33 32 31 30 29 26 25 24 23 22 21 20 19 18 16 15 14 13 12 11 10 9 8 7 6 5 4 2 1}
 5450: do_test boundary1-2.47.lt.3 {
 5451:   db eval {
 5452:     SELECT a FROM t1 WHERE rowid < 562949953421312 ORDER BY rowid
 5453:   }
 5454: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13}
 5455: do_test boundary1-2.47.lt.4 {
 5456:   db eval {
 5457:     SELECT a FROM t1 WHERE rowid < 562949953421312 ORDER BY rowid DESC
 5458:   }
 5459: } {13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 5460: do_test boundary1-2.47.lt.5 {
 5461:   db eval {
 5462:     SELECT a FROM t1 WHERE rowid < 562949953421312 ORDER BY x
 5463:   }
 5464: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 5465: do_test boundary1-2.47.le.1 {
 5466:   db eval {
 5467:     SELECT a FROM t1 WHERE rowid <= 562949953421312 ORDER BY a
 5468:   }
 5469: } {1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 5470: do_test boundary1-2.47.le.2 {
 5471:   db eval {
 5472:     SELECT a FROM t1 WHERE rowid <= 562949953421312 ORDER BY a DESC
 5473:   }
 5474: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 26 25 24 23 22 21 20 19 18 16 15 14 13 12 11 10 9 8 7 6 5 4 2 1}
 5475: do_test boundary1-2.47.le.3 {
 5476:   db eval {
 5477:     SELECT a FROM t1 WHERE rowid <= 562949953421312 ORDER BY rowid
 5478:   }
 5479: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43}
 5480: do_test boundary1-2.47.le.4 {
 5481:   db eval {
 5482:     SELECT a FROM t1 WHERE rowid <= 562949953421312 ORDER BY rowid DESC
 5483:   }
 5484: } {43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 5485: do_test boundary1-2.47.le.5 {
 5486:   db eval {
 5487:     SELECT a FROM t1 WHERE rowid <= 562949953421312 ORDER BY x
 5488:   }
 5489: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 5490: do_test boundary1-2.48.1 {
 5491:   db eval {
 5492:     SELECT * FROM t1 WHERE rowid=-8388609
 5493:   }
 5494: } {1 ffffffffff7fffff}
 5495: do_test boundary1-2.48.2 {
 5496:   db eval {
 5497:     SELECT rowid, a FROM t1 WHERE x='ffffffffff7fffff'
 5498:   }
 5499: } {-8388609 1}
 5500: do_test boundary1-2.48.3 {
 5501:   db eval {
 5502:     SELECT rowid, x FROM t1 WHERE a=1
 5503:   }
 5504: } {-8388609 ffffffffff7fffff}
 5505: do_test boundary1-2.48.gt.1 {
 5506:   db eval {
 5507:     SELECT a FROM t1 WHERE rowid > -8388609 ORDER BY a
 5508:   }
 5509: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
 5510: do_test boundary1-2.48.gt.2 {
 5511:   db eval {
 5512:     SELECT a FROM t1 WHERE rowid > -8388609 ORDER BY a DESC
 5513:   }
 5514: } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 5515: do_test boundary1-2.48.gt.3 {
 5516:   db eval {
 5517:     SELECT a FROM t1 WHERE rowid > -8388609 ORDER BY rowid
 5518:   }
 5519: } {37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5520: do_test boundary1-2.48.gt.4 {
 5521:   db eval {
 5522:     SELECT a FROM t1 WHERE rowid > -8388609 ORDER BY rowid DESC
 5523:   }
 5524: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37}
 5525: do_test boundary1-2.48.gt.5 {
 5526:   db eval {
 5527:     SELECT a FROM t1 WHERE rowid > -8388609 ORDER BY x
 5528:   }
 5529: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 37 29 32 54 53 52 33 38}
 5530: do_test boundary1-2.48.ge.1 {
 5531:   db eval {
 5532:     SELECT a FROM t1 WHERE rowid >= -8388609 ORDER BY a
 5533:   }
 5534: } {1 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
 5535: do_test boundary1-2.48.ge.2 {
 5536:   db eval {
 5537:     SELECT a FROM t1 WHERE rowid >= -8388609 ORDER BY a DESC
 5538:   }
 5539: } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3 1}
 5540: do_test boundary1-2.48.ge.3 {
 5541:   db eval {
 5542:     SELECT a FROM t1 WHERE rowid >= -8388609 ORDER BY rowid
 5543:   }
 5544: } {1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5545: do_test boundary1-2.48.ge.4 {
 5546:   db eval {
 5547:     SELECT a FROM t1 WHERE rowid >= -8388609 ORDER BY rowid DESC
 5548:   }
 5549: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1}
 5550: do_test boundary1-2.48.ge.5 {
 5551:   db eval {
 5552:     SELECT a FROM t1 WHERE rowid >= -8388609 ORDER BY x
 5553:   }
 5554: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 1 37 29 32 54 53 52 33 38}
 5555: do_test boundary1-2.48.lt.1 {
 5556:   db eval {
 5557:     SELECT a FROM t1 WHERE rowid < -8388609 ORDER BY a
 5558:   }
 5559: } {2 11 21 44 47 55 58 63 64}
 5560: do_test boundary1-2.48.lt.2 {
 5561:   db eval {
 5562:     SELECT a FROM t1 WHERE rowid < -8388609 ORDER BY a DESC
 5563:   }
 5564: } {64 63 58 55 47 44 21 11 2}
 5565: do_test boundary1-2.48.lt.3 {
 5566:   db eval {
 5567:     SELECT a FROM t1 WHERE rowid < -8388609 ORDER BY rowid
 5568:   }
 5569: } {55 2 64 21 44 58 63 47 11}
 5570: do_test boundary1-2.48.lt.4 {
 5571:   db eval {
 5572:     SELECT a FROM t1 WHERE rowid < -8388609 ORDER BY rowid DESC
 5573:   }
 5574: } {11 47 63 58 44 21 64 2 55}
 5575: do_test boundary1-2.48.lt.5 {
 5576:   db eval {
 5577:     SELECT a FROM t1 WHERE rowid < -8388609 ORDER BY x
 5578:   }
 5579: } {55 2 64 21 44 58 63 47 11}
 5580: do_test boundary1-2.48.le.1 {
 5581:   db eval {
 5582:     SELECT a FROM t1 WHERE rowid <= -8388609 ORDER BY a
 5583:   }
 5584: } {1 2 11 21 44 47 55 58 63 64}
 5585: do_test boundary1-2.48.le.2 {
 5586:   db eval {
 5587:     SELECT a FROM t1 WHERE rowid <= -8388609 ORDER BY a DESC
 5588:   }
 5589: } {64 63 58 55 47 44 21 11 2 1}
 5590: do_test boundary1-2.48.le.3 {
 5591:   db eval {
 5592:     SELECT a FROM t1 WHERE rowid <= -8388609 ORDER BY rowid
 5593:   }
 5594: } {55 2 64 21 44 58 63 47 11 1}
 5595: do_test boundary1-2.48.le.4 {
 5596:   db eval {
 5597:     SELECT a FROM t1 WHERE rowid <= -8388609 ORDER BY rowid DESC
 5598:   }
 5599: } {1 11 47 63 58 44 21 64 2 55}
 5600: do_test boundary1-2.48.le.5 {
 5601:   db eval {
 5602:     SELECT a FROM t1 WHERE rowid <= -8388609 ORDER BY x
 5603:   }
 5604: } {55 2 64 21 44 58 63 47 11 1}
 5605: do_test boundary1-2.49.1 {
 5606:   db eval {
 5607:     SELECT * FROM t1 WHERE rowid=16777215
 5608:   }
 5609: } {9 0000000000ffffff}
 5610: do_test boundary1-2.49.2 {
 5611:   db eval {
 5612:     SELECT rowid, a FROM t1 WHERE x='0000000000ffffff'
 5613:   }
 5614: } {16777215 9}
 5615: do_test boundary1-2.49.3 {
 5616:   db eval {
 5617:     SELECT rowid, x FROM t1 WHERE a=9
 5618:   }
 5619: } {16777215 0000000000ffffff}
 5620: do_test boundary1-2.49.gt.1 {
 5621:   db eval {
 5622:     SELECT a FROM t1 WHERE rowid > 16777215 ORDER BY a
 5623:   }
 5624: } {3 6 7 10 12 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
 5625: do_test boundary1-2.49.gt.2 {
 5626:   db eval {
 5627:     SELECT a FROM t1 WHERE rowid > 16777215 ORDER BY a DESC
 5628:   }
 5629: } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 12 10 7 6 3}
 5630: do_test boundary1-2.49.gt.3 {
 5631:   db eval {
 5632:     SELECT a FROM t1 WHERE rowid > 16777215 ORDER BY rowid
 5633:   }
 5634: } {6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5635: do_test boundary1-2.49.gt.4 {
 5636:   db eval {
 5637:     SELECT a FROM t1 WHERE rowid > 16777215 ORDER BY rowid DESC
 5638:   }
 5639: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6}
 5640: do_test boundary1-2.49.gt.5 {
 5641:   db eval {
 5642:     SELECT a FROM t1 WHERE rowid > 16777215 ORDER BY x
 5643:   }
 5644: } {6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5645: do_test boundary1-2.49.ge.1 {
 5646:   db eval {
 5647:     SELECT a FROM t1 WHERE rowid >= 16777215 ORDER BY a
 5648:   }
 5649: } {3 6 7 9 10 12 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
 5650: do_test boundary1-2.49.ge.2 {
 5651:   db eval {
 5652:     SELECT a FROM t1 WHERE rowid >= 16777215 ORDER BY a DESC
 5653:   }
 5654: } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 12 10 9 7 6 3}
 5655: do_test boundary1-2.49.ge.3 {
 5656:   db eval {
 5657:     SELECT a FROM t1 WHERE rowid >= 16777215 ORDER BY rowid
 5658:   }
 5659: } {9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5660: do_test boundary1-2.49.ge.4 {
 5661:   db eval {
 5662:     SELECT a FROM t1 WHERE rowid >= 16777215 ORDER BY rowid DESC
 5663:   }
 5664: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9}
 5665: do_test boundary1-2.49.ge.5 {
 5666:   db eval {
 5667:     SELECT a FROM t1 WHERE rowid >= 16777215 ORDER BY x
 5668:   }
 5669: } {9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5670: do_test boundary1-2.49.lt.1 {
 5671:   db eval {
 5672:     SELECT a FROM t1 WHERE rowid < 16777215 ORDER BY a
 5673:   }
 5674: } {1 2 4 5 8 11 15 16 18 21 23 24 29 30 31 32 33 37 38 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 5675: do_test boundary1-2.49.lt.2 {
 5676:   db eval {
 5677:     SELECT a FROM t1 WHERE rowid < 16777215 ORDER BY a DESC
 5678:   }
 5679: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 38 37 33 32 31 30 29 24 23 21 18 16 15 11 8 5 4 2 1}
 5680: do_test boundary1-2.49.lt.3 {
 5681:   db eval {
 5682:     SELECT a FROM t1 WHERE rowid < 16777215 ORDER BY rowid
 5683:   }
 5684: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24}
 5685: do_test boundary1-2.49.lt.4 {
 5686:   db eval {
 5687:     SELECT a FROM t1 WHERE rowid < 16777215 ORDER BY rowid DESC
 5688:   }
 5689: } {24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 5690: do_test boundary1-2.49.lt.5 {
 5691:   db eval {
 5692:     SELECT a FROM t1 WHERE rowid < 16777215 ORDER BY x
 5693:   }
 5694: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 5695: do_test boundary1-2.49.le.1 {
 5696:   db eval {
 5697:     SELECT a FROM t1 WHERE rowid <= 16777215 ORDER BY a
 5698:   }
 5699: } {1 2 4 5 8 9 11 15 16 18 21 23 24 29 30 31 32 33 37 38 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 5700: do_test boundary1-2.49.le.2 {
 5701:   db eval {
 5702:     SELECT a FROM t1 WHERE rowid <= 16777215 ORDER BY a DESC
 5703:   }
 5704: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 38 37 33 32 31 30 29 24 23 21 18 16 15 11 9 8 5 4 2 1}
 5705: do_test boundary1-2.49.le.3 {
 5706:   db eval {
 5707:     SELECT a FROM t1 WHERE rowid <= 16777215 ORDER BY rowid
 5708:   }
 5709: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9}
 5710: do_test boundary1-2.49.le.4 {
 5711:   db eval {
 5712:     SELECT a FROM t1 WHERE rowid <= 16777215 ORDER BY rowid DESC
 5713:   }
 5714: } {9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 5715: do_test boundary1-2.49.le.5 {
 5716:   db eval {
 5717:     SELECT a FROM t1 WHERE rowid <= 16777215 ORDER BY x
 5718:   }
 5719: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 5720: do_test boundary1-2.50.1 {
 5721:   db eval {
 5722:     SELECT * FROM t1 WHERE rowid=8388608
 5723:   }
 5724: } {24 0000000000800000}
 5725: do_test boundary1-2.50.2 {
 5726:   db eval {
 5727:     SELECT rowid, a FROM t1 WHERE x='0000000000800000'
 5728:   }
 5729: } {8388608 24}
 5730: do_test boundary1-2.50.3 {
 5731:   db eval {
 5732:     SELECT rowid, x FROM t1 WHERE a=24
 5733:   }
 5734: } {8388608 0000000000800000}
 5735: do_test boundary1-2.50.gt.1 {
 5736:   db eval {
 5737:     SELECT a FROM t1 WHERE rowid > 8388608 ORDER BY a
 5738:   }
 5739: } {3 6 7 9 10 12 13 14 17 19 20 22 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
 5740: do_test boundary1-2.50.gt.2 {
 5741:   db eval {
 5742:     SELECT a FROM t1 WHERE rowid > 8388608 ORDER BY a DESC
 5743:   }
 5744: } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 22 20 19 17 14 13 12 10 9 7 6 3}
 5745: do_test boundary1-2.50.gt.3 {
 5746:   db eval {
 5747:     SELECT a FROM t1 WHERE rowid > 8388608 ORDER BY rowid
 5748:   }
 5749: } {9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5750: do_test boundary1-2.50.gt.4 {
 5751:   db eval {
 5752:     SELECT a FROM t1 WHERE rowid > 8388608 ORDER BY rowid DESC
 5753:   }
 5754: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9}
 5755: do_test boundary1-2.50.gt.5 {
 5756:   db eval {
 5757:     SELECT a FROM t1 WHERE rowid > 8388608 ORDER BY x
 5758:   }
 5759: } {9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5760: do_test boundary1-2.50.ge.1 {
 5761:   db eval {
 5762:     SELECT a FROM t1 WHERE rowid >= 8388608 ORDER BY a
 5763:   }
 5764: } {3 6 7 9 10 12 13 14 17 19 20 22 24 25 26 27 28 34 35 36 39 40 43 45 46 51 56 57}
 5765: do_test boundary1-2.50.ge.2 {
 5766:   db eval {
 5767:     SELECT a FROM t1 WHERE rowid >= 8388608 ORDER BY a DESC
 5768:   }
 5769: } {57 56 51 46 45 43 40 39 36 35 34 28 27 26 25 24 22 20 19 17 14 13 12 10 9 7 6 3}
 5770: do_test boundary1-2.50.ge.3 {
 5771:   db eval {
 5772:     SELECT a FROM t1 WHERE rowid >= 8388608 ORDER BY rowid
 5773:   }
 5774: } {24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5775: do_test boundary1-2.50.ge.4 {
 5776:   db eval {
 5777:     SELECT a FROM t1 WHERE rowid >= 8388608 ORDER BY rowid DESC
 5778:   }
 5779: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24}
 5780: do_test boundary1-2.50.ge.5 {
 5781:   db eval {
 5782:     SELECT a FROM t1 WHERE rowid >= 8388608 ORDER BY x
 5783:   }
 5784: } {24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5785: do_test boundary1-2.50.lt.1 {
 5786:   db eval {
 5787:     SELECT a FROM t1 WHERE rowid < 8388608 ORDER BY a
 5788:   }
 5789: } {1 2 4 5 8 11 15 16 18 21 23 29 30 31 32 33 37 38 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 5790: do_test boundary1-2.50.lt.2 {
 5791:   db eval {
 5792:     SELECT a FROM t1 WHERE rowid < 8388608 ORDER BY a DESC
 5793:   }
 5794: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 38 37 33 32 31 30 29 23 21 18 16 15 11 8 5 4 2 1}
 5795: do_test boundary1-2.50.lt.3 {
 5796:   db eval {
 5797:     SELECT a FROM t1 WHERE rowid < 8388608 ORDER BY rowid
 5798:   }
 5799: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18}
 5800: do_test boundary1-2.50.lt.4 {
 5801:   db eval {
 5802:     SELECT a FROM t1 WHERE rowid < 8388608 ORDER BY rowid DESC
 5803:   }
 5804: } {18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 5805: do_test boundary1-2.50.lt.5 {
 5806:   db eval {
 5807:     SELECT a FROM t1 WHERE rowid < 8388608 ORDER BY x
 5808:   }
 5809: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 5810: do_test boundary1-2.50.le.1 {
 5811:   db eval {
 5812:     SELECT a FROM t1 WHERE rowid <= 8388608 ORDER BY a
 5813:   }
 5814: } {1 2 4 5 8 11 15 16 18 21 23 24 29 30 31 32 33 37 38 41 42 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 5815: do_test boundary1-2.50.le.2 {
 5816:   db eval {
 5817:     SELECT a FROM t1 WHERE rowid <= 8388608 ORDER BY a DESC
 5818:   }
 5819: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 42 41 38 37 33 32 31 30 29 24 23 21 18 16 15 11 8 5 4 2 1}
 5820: do_test boundary1-2.50.le.3 {
 5821:   db eval {
 5822:     SELECT a FROM t1 WHERE rowid <= 8388608 ORDER BY rowid
 5823:   }
 5824: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24}
 5825: do_test boundary1-2.50.le.4 {
 5826:   db eval {
 5827:     SELECT a FROM t1 WHERE rowid <= 8388608 ORDER BY rowid DESC
 5828:   }
 5829: } {24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 5830: do_test boundary1-2.50.le.5 {
 5831:   db eval {
 5832:     SELECT a FROM t1 WHERE rowid <= 8388608 ORDER BY x
 5833:   }
 5834: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 5835: do_test boundary1-2.51.1 {
 5836:   db eval {
 5837:     SELECT * FROM t1 WHERE rowid=16383
 5838:   }
 5839: } {8 0000000000003fff}
 5840: do_test boundary1-2.51.2 {
 5841:   db eval {
 5842:     SELECT rowid, a FROM t1 WHERE x='0000000000003fff'
 5843:   }
 5844: } {16383 8}
 5845: do_test boundary1-2.51.3 {
 5846:   db eval {
 5847:     SELECT rowid, x FROM t1 WHERE a=8
 5848:   }
 5849: } {16383 0000000000003fff}
 5850: do_test boundary1-2.51.gt.1 {
 5851:   db eval {
 5852:     SELECT a FROM t1 WHERE rowid > 16383 ORDER BY a
 5853:   }
 5854: } {3 6 7 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 34 35 36 39 40 42 43 45 46 48 50 51 56 57 62}
 5855: do_test boundary1-2.51.gt.2 {
 5856:   db eval {
 5857:     SELECT a FROM t1 WHERE rowid > 16383 ORDER BY a DESC
 5858:   }
 5859: } {62 57 56 51 50 48 46 45 43 42 40 39 36 35 34 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 7 6 3}
 5860: do_test boundary1-2.51.gt.3 {
 5861:   db eval {
 5862:     SELECT a FROM t1 WHERE rowid > 16383 ORDER BY rowid
 5863:   }
 5864: } {16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5865: do_test boundary1-2.51.gt.4 {
 5866:   db eval {
 5867:     SELECT a FROM t1 WHERE rowid > 16383 ORDER BY rowid DESC
 5868:   }
 5869: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16}
 5870: do_test boundary1-2.51.gt.5 {
 5871:   db eval {
 5872:     SELECT a FROM t1 WHERE rowid > 16383 ORDER BY x
 5873:   }
 5874: } {16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5875: do_test boundary1-2.51.ge.1 {
 5876:   db eval {
 5877:     SELECT a FROM t1 WHERE rowid >= 16383 ORDER BY a
 5878:   }
 5879: } {3 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 34 35 36 39 40 42 43 45 46 48 50 51 56 57 62}
 5880: do_test boundary1-2.51.ge.2 {
 5881:   db eval {
 5882:     SELECT a FROM t1 WHERE rowid >= 16383 ORDER BY a DESC
 5883:   }
 5884: } {62 57 56 51 50 48 46 45 43 42 40 39 36 35 34 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 3}
 5885: do_test boundary1-2.51.ge.3 {
 5886:   db eval {
 5887:     SELECT a FROM t1 WHERE rowid >= 16383 ORDER BY rowid
 5888:   }
 5889: } {8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5890: do_test boundary1-2.51.ge.4 {
 5891:   db eval {
 5892:     SELECT a FROM t1 WHERE rowid >= 16383 ORDER BY rowid DESC
 5893:   }
 5894: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8}
 5895: do_test boundary1-2.51.ge.5 {
 5896:   db eval {
 5897:     SELECT a FROM t1 WHERE rowid >= 16383 ORDER BY x
 5898:   }
 5899: } {8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 5900: do_test boundary1-2.51.lt.1 {
 5901:   db eval {
 5902:     SELECT a FROM t1 WHERE rowid < 16383 ORDER BY a
 5903:   }
 5904: } {1 2 4 5 11 21 29 30 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 61 63 64}
 5905: do_test boundary1-2.51.lt.2 {
 5906:   db eval {
 5907:     SELECT a FROM t1 WHERE rowid < 16383 ORDER BY a DESC
 5908:   }
 5909: } {64 63 61 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 30 29 21 11 5 4 2 1}
 5910: do_test boundary1-2.51.lt.3 {
 5911:   db eval {
 5912:     SELECT a FROM t1 WHERE rowid < 16383 ORDER BY rowid
 5913:   }
 5914: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61}
 5915: do_test boundary1-2.51.lt.4 {
 5916:   db eval {
 5917:     SELECT a FROM t1 WHERE rowid < 16383 ORDER BY rowid DESC
 5918:   }
 5919: } {61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 5920: do_test boundary1-2.51.lt.5 {
 5921:   db eval {
 5922:     SELECT a FROM t1 WHERE rowid < 16383 ORDER BY x
 5923:   }
 5924: } {59 60 41 5 31 4 49 30 61 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 5925: do_test boundary1-2.51.le.1 {
 5926:   db eval {
 5927:     SELECT a FROM t1 WHERE rowid <= 16383 ORDER BY a
 5928:   }
 5929: } {1 2 4 5 8 11 21 29 30 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 61 63 64}
 5930: do_test boundary1-2.51.le.2 {
 5931:   db eval {
 5932:     SELECT a FROM t1 WHERE rowid <= 16383 ORDER BY a DESC
 5933:   }
 5934: } {64 63 61 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 30 29 21 11 8 5 4 2 1}
 5935: do_test boundary1-2.51.le.3 {
 5936:   db eval {
 5937:     SELECT a FROM t1 WHERE rowid <= 16383 ORDER BY rowid
 5938:   }
 5939: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8}
 5940: do_test boundary1-2.51.le.4 {
 5941:   db eval {
 5942:     SELECT a FROM t1 WHERE rowid <= 16383 ORDER BY rowid DESC
 5943:   }
 5944: } {8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 5945: do_test boundary1-2.51.le.5 {
 5946:   db eval {
 5947:     SELECT a FROM t1 WHERE rowid <= 16383 ORDER BY x
 5948:   }
 5949: } {59 60 41 5 31 4 49 30 61 8 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 5950: do_test boundary1-2.52.1 {
 5951:   db eval {
 5952:     SELECT * FROM t1 WHERE rowid=140737488355328
 5953:   }
 5954: } {34 0000800000000000}
 5955: do_test boundary1-2.52.2 {
 5956:   db eval {
 5957:     SELECT rowid, a FROM t1 WHERE x='0000800000000000'
 5958:   }
 5959: } {140737488355328 34}
 5960: do_test boundary1-2.52.3 {
 5961:   db eval {
 5962:     SELECT rowid, x FROM t1 WHERE a=34
 5963:   }
 5964: } {140737488355328 0000800000000000}
 5965: do_test boundary1-2.52.gt.1 {
 5966:   db eval {
 5967:     SELECT a FROM t1 WHERE rowid > 140737488355328 ORDER BY a
 5968:   }
 5969: } {3 10 13 17 26 27 28 43 45}
 5970: do_test boundary1-2.52.gt.2 {
 5971:   db eval {
 5972:     SELECT a FROM t1 WHERE rowid > 140737488355328 ORDER BY a DESC
 5973:   }
 5974: } {45 43 28 27 26 17 13 10 3}
 5975: do_test boundary1-2.52.gt.3 {
 5976:   db eval {
 5977:     SELECT a FROM t1 WHERE rowid > 140737488355328 ORDER BY rowid
 5978:   }
 5979: } {10 26 13 43 27 45 17 28 3}
 5980: do_test boundary1-2.52.gt.4 {
 5981:   db eval {
 5982:     SELECT a FROM t1 WHERE rowid > 140737488355328 ORDER BY rowid DESC
 5983:   }
 5984: } {3 28 17 45 27 43 13 26 10}
 5985: do_test boundary1-2.52.gt.5 {
 5986:   db eval {
 5987:     SELECT a FROM t1 WHERE rowid > 140737488355328 ORDER BY x
 5988:   }
 5989: } {10 26 13 43 27 45 17 28 3}
 5990: do_test boundary1-2.52.ge.1 {
 5991:   db eval {
 5992:     SELECT a FROM t1 WHERE rowid >= 140737488355328 ORDER BY a
 5993:   }
 5994: } {3 10 13 17 26 27 28 34 43 45}
 5995: do_test boundary1-2.52.ge.2 {
 5996:   db eval {
 5997:     SELECT a FROM t1 WHERE rowid >= 140737488355328 ORDER BY a DESC
 5998:   }
 5999: } {45 43 34 28 27 26 17 13 10 3}
 6000: do_test boundary1-2.52.ge.3 {
 6001:   db eval {
 6002:     SELECT a FROM t1 WHERE rowid >= 140737488355328 ORDER BY rowid
 6003:   }
 6004: } {34 10 26 13 43 27 45 17 28 3}
 6005: do_test boundary1-2.52.ge.4 {
 6006:   db eval {
 6007:     SELECT a FROM t1 WHERE rowid >= 140737488355328 ORDER BY rowid DESC
 6008:   }
 6009: } {3 28 17 45 27 43 13 26 10 34}
 6010: do_test boundary1-2.52.ge.5 {
 6011:   db eval {
 6012:     SELECT a FROM t1 WHERE rowid >= 140737488355328 ORDER BY x
 6013:   }
 6014: } {34 10 26 13 43 27 45 17 28 3}
 6015: do_test boundary1-2.52.lt.1 {
 6016:   db eval {
 6017:     SELECT a FROM t1 WHERE rowid < 140737488355328 ORDER BY a
 6018:   }
 6019: } {1 2 4 5 6 7 8 9 11 12 14 15 16 18 19 20 21 22 23 24 25 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 6020: do_test boundary1-2.52.lt.2 {
 6021:   db eval {
 6022:     SELECT a FROM t1 WHERE rowid < 140737488355328 ORDER BY a DESC
 6023:   }
 6024: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 25 24 23 22 21 20 19 18 16 15 14 12 11 9 8 7 6 5 4 2 1}
 6025: do_test boundary1-2.52.lt.3 {
 6026:   db eval {
 6027:     SELECT a FROM t1 WHERE rowid < 140737488355328 ORDER BY rowid
 6028:   }
 6029: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25}
 6030: do_test boundary1-2.52.lt.4 {
 6031:   db eval {
 6032:     SELECT a FROM t1 WHERE rowid < 140737488355328 ORDER BY rowid DESC
 6033:   }
 6034: } {25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6035: do_test boundary1-2.52.lt.5 {
 6036:   db eval {
 6037:     SELECT a FROM t1 WHERE rowid < 140737488355328 ORDER BY x
 6038:   }
 6039: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6040: do_test boundary1-2.52.le.1 {
 6041:   db eval {
 6042:     SELECT a FROM t1 WHERE rowid <= 140737488355328 ORDER BY a
 6043:   }
 6044: } {1 2 4 5 6 7 8 9 11 12 14 15 16 18 19 20 21 22 23 24 25 29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 6045: do_test boundary1-2.52.le.2 {
 6046:   db eval {
 6047:     SELECT a FROM t1 WHERE rowid <= 140737488355328 ORDER BY a DESC
 6048:   }
 6049: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 34 33 32 31 30 29 25 24 23 22 21 20 19 18 16 15 14 12 11 9 8 7 6 5 4 2 1}
 6050: do_test boundary1-2.52.le.3 {
 6051:   db eval {
 6052:     SELECT a FROM t1 WHERE rowid <= 140737488355328 ORDER BY rowid
 6053:   }
 6054: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34}
 6055: do_test boundary1-2.52.le.4 {
 6056:   db eval {
 6057:     SELECT a FROM t1 WHERE rowid <= 140737488355328 ORDER BY rowid DESC
 6058:   }
 6059: } {34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6060: do_test boundary1-2.52.le.5 {
 6061:   db eval {
 6062:     SELECT a FROM t1 WHERE rowid <= 140737488355328 ORDER BY x
 6063:   }
 6064: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6065: do_test boundary1-2.53.1 {
 6066:   db eval {
 6067:     SELECT * FROM t1 WHERE rowid=2097151
 6068:   }
 6069: } {15 00000000001fffff}
 6070: do_test boundary1-2.53.2 {
 6071:   db eval {
 6072:     SELECT rowid, a FROM t1 WHERE x='00000000001fffff'
 6073:   }
 6074: } {2097151 15}
 6075: do_test boundary1-2.53.3 {
 6076:   db eval {
 6077:     SELECT rowid, x FROM t1 WHERE a=15
 6078:   }
 6079: } {2097151 00000000001fffff}
 6080: do_test boundary1-2.53.gt.1 {
 6081:   db eval {
 6082:     SELECT a FROM t1 WHERE rowid > 2097151 ORDER BY a
 6083:   }
 6084: } {3 6 7 9 10 12 13 14 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 42 43 45 46 51 56 57}
 6085: do_test boundary1-2.53.gt.2 {
 6086:   db eval {
 6087:     SELECT a FROM t1 WHERE rowid > 2097151 ORDER BY a DESC
 6088:   }
 6089: } {57 56 51 46 45 43 42 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 14 13 12 10 9 7 6 3}
 6090: do_test boundary1-2.53.gt.3 {
 6091:   db eval {
 6092:     SELECT a FROM t1 WHERE rowid > 2097151 ORDER BY rowid
 6093:   }
 6094: } {42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 6095: do_test boundary1-2.53.gt.4 {
 6096:   db eval {
 6097:     SELECT a FROM t1 WHERE rowid > 2097151 ORDER BY rowid DESC
 6098:   }
 6099: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42}
 6100: do_test boundary1-2.53.gt.5 {
 6101:   db eval {
 6102:     SELECT a FROM t1 WHERE rowid > 2097151 ORDER BY x
 6103:   }
 6104: } {42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 6105: do_test boundary1-2.53.ge.1 {
 6106:   db eval {
 6107:     SELECT a FROM t1 WHERE rowid >= 2097151 ORDER BY a
 6108:   }
 6109: } {3 6 7 9 10 12 13 14 15 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 42 43 45 46 51 56 57}
 6110: do_test boundary1-2.53.ge.2 {
 6111:   db eval {
 6112:     SELECT a FROM t1 WHERE rowid >= 2097151 ORDER BY a DESC
 6113:   }
 6114: } {57 56 51 46 45 43 42 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 15 14 13 12 10 9 7 6 3}
 6115: do_test boundary1-2.53.ge.3 {
 6116:   db eval {
 6117:     SELECT a FROM t1 WHERE rowid >= 2097151 ORDER BY rowid
 6118:   }
 6119: } {15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 6120: do_test boundary1-2.53.ge.4 {
 6121:   db eval {
 6122:     SELECT a FROM t1 WHERE rowid >= 2097151 ORDER BY rowid DESC
 6123:   }
 6124: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15}
 6125: do_test boundary1-2.53.ge.5 {
 6126:   db eval {
 6127:     SELECT a FROM t1 WHERE rowid >= 2097151 ORDER BY x
 6128:   }
 6129: } {15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 6130: do_test boundary1-2.53.lt.1 {
 6131:   db eval {
 6132:     SELECT a FROM t1 WHERE rowid < 2097151 ORDER BY a
 6133:   }
 6134: } {1 2 4 5 8 11 16 21 23 29 30 31 32 33 37 38 41 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 6135: do_test boundary1-2.53.lt.2 {
 6136:   db eval {
 6137:     SELECT a FROM t1 WHERE rowid < 2097151 ORDER BY a DESC
 6138:   }
 6139: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 41 38 37 33 32 31 30 29 23 21 16 11 8 5 4 2 1}
 6140: do_test boundary1-2.53.lt.3 {
 6141:   db eval {
 6142:     SELECT a FROM t1 WHERE rowid < 2097151 ORDER BY rowid
 6143:   }
 6144: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62}
 6145: do_test boundary1-2.53.lt.4 {
 6146:   db eval {
 6147:     SELECT a FROM t1 WHERE rowid < 2097151 ORDER BY rowid DESC
 6148:   }
 6149: } {62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6150: do_test boundary1-2.53.lt.5 {
 6151:   db eval {
 6152:     SELECT a FROM t1 WHERE rowid < 2097151 ORDER BY x
 6153:   }
 6154: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6155: do_test boundary1-2.53.le.1 {
 6156:   db eval {
 6157:     SELECT a FROM t1 WHERE rowid <= 2097151 ORDER BY a
 6158:   }
 6159: } {1 2 4 5 8 11 15 16 21 23 29 30 31 32 33 37 38 41 44 47 48 49 50 52 53 54 55 58 59 60 61 62 63 64}
 6160: do_test boundary1-2.53.le.2 {
 6161:   db eval {
 6162:     SELECT a FROM t1 WHERE rowid <= 2097151 ORDER BY a DESC
 6163:   }
 6164: } {64 63 62 61 60 59 58 55 54 53 52 50 49 48 47 44 41 38 37 33 32 31 30 29 23 21 16 15 11 8 5 4 2 1}
 6165: do_test boundary1-2.53.le.3 {
 6166:   db eval {
 6167:     SELECT a FROM t1 WHERE rowid <= 2097151 ORDER BY rowid
 6168:   }
 6169: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15}
 6170: do_test boundary1-2.53.le.4 {
 6171:   db eval {
 6172:     SELECT a FROM t1 WHERE rowid <= 2097151 ORDER BY rowid DESC
 6173:   }
 6174: } {15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6175: do_test boundary1-2.53.le.5 {
 6176:   db eval {
 6177:     SELECT a FROM t1 WHERE rowid <= 2097151 ORDER BY x
 6178:   }
 6179: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6180: do_test boundary1-2.54.1 {
 6181:   db eval {
 6182:     SELECT * FROM t1 WHERE rowid=140737488355327
 6183:   }
 6184: } {25 00007fffffffffff}
 6185: do_test boundary1-2.54.2 {
 6186:   db eval {
 6187:     SELECT rowid, a FROM t1 WHERE x='00007fffffffffff'
 6188:   }
 6189: } {140737488355327 25}
 6190: do_test boundary1-2.54.3 {
 6191:   db eval {
 6192:     SELECT rowid, x FROM t1 WHERE a=25
 6193:   }
 6194: } {140737488355327 00007fffffffffff}
 6195: do_test boundary1-2.54.gt.1 {
 6196:   db eval {
 6197:     SELECT a FROM t1 WHERE rowid > 140737488355327 ORDER BY a
 6198:   }
 6199: } {3 10 13 17 26 27 28 34 43 45}
 6200: do_test boundary1-2.54.gt.2 {
 6201:   db eval {
 6202:     SELECT a FROM t1 WHERE rowid > 140737488355327 ORDER BY a DESC
 6203:   }
 6204: } {45 43 34 28 27 26 17 13 10 3}
 6205: do_test boundary1-2.54.gt.3 {
 6206:   db eval {
 6207:     SELECT a FROM t1 WHERE rowid > 140737488355327 ORDER BY rowid
 6208:   }
 6209: } {34 10 26 13 43 27 45 17 28 3}
 6210: do_test boundary1-2.54.gt.4 {
 6211:   db eval {
 6212:     SELECT a FROM t1 WHERE rowid > 140737488355327 ORDER BY rowid DESC
 6213:   }
 6214: } {3 28 17 45 27 43 13 26 10 34}
 6215: do_test boundary1-2.54.gt.5 {
 6216:   db eval {
 6217:     SELECT a FROM t1 WHERE rowid > 140737488355327 ORDER BY x
 6218:   }
 6219: } {34 10 26 13 43 27 45 17 28 3}
 6220: do_test boundary1-2.54.ge.1 {
 6221:   db eval {
 6222:     SELECT a FROM t1 WHERE rowid >= 140737488355327 ORDER BY a
 6223:   }
 6224: } {3 10 13 17 25 26 27 28 34 43 45}
 6225: do_test boundary1-2.54.ge.2 {
 6226:   db eval {
 6227:     SELECT a FROM t1 WHERE rowid >= 140737488355327 ORDER BY a DESC
 6228:   }
 6229: } {45 43 34 28 27 26 25 17 13 10 3}
 6230: do_test boundary1-2.54.ge.3 {
 6231:   db eval {
 6232:     SELECT a FROM t1 WHERE rowid >= 140737488355327 ORDER BY rowid
 6233:   }
 6234: } {25 34 10 26 13 43 27 45 17 28 3}
 6235: do_test boundary1-2.54.ge.4 {
 6236:   db eval {
 6237:     SELECT a FROM t1 WHERE rowid >= 140737488355327 ORDER BY rowid DESC
 6238:   }
 6239: } {3 28 17 45 27 43 13 26 10 34 25}
 6240: do_test boundary1-2.54.ge.5 {
 6241:   db eval {
 6242:     SELECT a FROM t1 WHERE rowid >= 140737488355327 ORDER BY x
 6243:   }
 6244: } {25 34 10 26 13 43 27 45 17 28 3}
 6245: do_test boundary1-2.54.lt.1 {
 6246:   db eval {
 6247:     SELECT a FROM t1 WHERE rowid < 140737488355327 ORDER BY a
 6248:   }
 6249: } {1 2 4 5 6 7 8 9 11 12 14 15 16 18 19 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 6250: do_test boundary1-2.54.lt.2 {
 6251:   db eval {
 6252:     SELECT a FROM t1 WHERE rowid < 140737488355327 ORDER BY a DESC
 6253:   }
 6254: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 19 18 16 15 14 12 11 9 8 7 6 5 4 2 1}
 6255: do_test boundary1-2.54.lt.3 {
 6256:   db eval {
 6257:     SELECT a FROM t1 WHERE rowid < 140737488355327 ORDER BY rowid
 6258:   }
 6259: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56}
 6260: do_test boundary1-2.54.lt.4 {
 6261:   db eval {
 6262:     SELECT a FROM t1 WHERE rowid < 140737488355327 ORDER BY rowid DESC
 6263:   }
 6264: } {56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6265: do_test boundary1-2.54.lt.5 {
 6266:   db eval {
 6267:     SELECT a FROM t1 WHERE rowid < 140737488355327 ORDER BY x
 6268:   }
 6269: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6270: do_test boundary1-2.54.le.1 {
 6271:   db eval {
 6272:     SELECT a FROM t1 WHERE rowid <= 140737488355327 ORDER BY a
 6273:   }
 6274: } {1 2 4 5 6 7 8 9 11 12 14 15 16 18 19 20 21 22 23 24 25 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 6275: do_test boundary1-2.54.le.2 {
 6276:   db eval {
 6277:     SELECT a FROM t1 WHERE rowid <= 140737488355327 ORDER BY a DESC
 6278:   }
 6279: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 25 24 23 22 21 20 19 18 16 15 14 12 11 9 8 7 6 5 4 2 1}
 6280: do_test boundary1-2.54.le.3 {
 6281:   db eval {
 6282:     SELECT a FROM t1 WHERE rowid <= 140737488355327 ORDER BY rowid
 6283:   }
 6284: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25}
 6285: do_test boundary1-2.54.le.4 {
 6286:   db eval {
 6287:     SELECT a FROM t1 WHERE rowid <= 140737488355327 ORDER BY rowid DESC
 6288:   }
 6289: } {25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6290: do_test boundary1-2.54.le.5 {
 6291:   db eval {
 6292:     SELECT a FROM t1 WHERE rowid <= 140737488355327 ORDER BY x
 6293:   }
 6294: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6295: do_test boundary1-2.55.1 {
 6296:   db eval {
 6297:     SELECT * FROM t1 WHERE rowid=281474976710656
 6298:   }
 6299: } {26 0001000000000000}
 6300: do_test boundary1-2.55.2 {
 6301:   db eval {
 6302:     SELECT rowid, a FROM t1 WHERE x='0001000000000000'
 6303:   }
 6304: } {281474976710656 26}
 6305: do_test boundary1-2.55.3 {
 6306:   db eval {
 6307:     SELECT rowid, x FROM t1 WHERE a=26
 6308:   }
 6309: } {281474976710656 0001000000000000}
 6310: do_test boundary1-2.55.gt.1 {
 6311:   db eval {
 6312:     SELECT a FROM t1 WHERE rowid > 281474976710656 ORDER BY a
 6313:   }
 6314: } {3 13 17 27 28 43 45}
 6315: do_test boundary1-2.55.gt.2 {
 6316:   db eval {
 6317:     SELECT a FROM t1 WHERE rowid > 281474976710656 ORDER BY a DESC
 6318:   }
 6319: } {45 43 28 27 17 13 3}
 6320: do_test boundary1-2.55.gt.3 {
 6321:   db eval {
 6322:     SELECT a FROM t1 WHERE rowid > 281474976710656 ORDER BY rowid
 6323:   }
 6324: } {13 43 27 45 17 28 3}
 6325: do_test boundary1-2.55.gt.4 {
 6326:   db eval {
 6327:     SELECT a FROM t1 WHERE rowid > 281474976710656 ORDER BY rowid DESC
 6328:   }
 6329: } {3 28 17 45 27 43 13}
 6330: do_test boundary1-2.55.gt.5 {
 6331:   db eval {
 6332:     SELECT a FROM t1 WHERE rowid > 281474976710656 ORDER BY x
 6333:   }
 6334: } {13 43 27 45 17 28 3}
 6335: do_test boundary1-2.55.ge.1 {
 6336:   db eval {
 6337:     SELECT a FROM t1 WHERE rowid >= 281474976710656 ORDER BY a
 6338:   }
 6339: } {3 13 17 26 27 28 43 45}
 6340: do_test boundary1-2.55.ge.2 {
 6341:   db eval {
 6342:     SELECT a FROM t1 WHERE rowid >= 281474976710656 ORDER BY a DESC
 6343:   }
 6344: } {45 43 28 27 26 17 13 3}
 6345: do_test boundary1-2.55.ge.3 {
 6346:   db eval {
 6347:     SELECT a FROM t1 WHERE rowid >= 281474976710656 ORDER BY rowid
 6348:   }
 6349: } {26 13 43 27 45 17 28 3}
 6350: do_test boundary1-2.55.ge.4 {
 6351:   db eval {
 6352:     SELECT a FROM t1 WHERE rowid >= 281474976710656 ORDER BY rowid DESC
 6353:   }
 6354: } {3 28 17 45 27 43 13 26}
 6355: do_test boundary1-2.55.ge.5 {
 6356:   db eval {
 6357:     SELECT a FROM t1 WHERE rowid >= 281474976710656 ORDER BY x
 6358:   }
 6359: } {26 13 43 27 45 17 28 3}
 6360: do_test boundary1-2.55.lt.1 {
 6361:   db eval {
 6362:     SELECT a FROM t1 WHERE rowid < 281474976710656 ORDER BY a
 6363:   }
 6364: } {1 2 4 5 6 7 8 9 10 11 12 14 15 16 18 19 20 21 22 23 24 25 29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 6365: do_test boundary1-2.55.lt.2 {
 6366:   db eval {
 6367:     SELECT a FROM t1 WHERE rowid < 281474976710656 ORDER BY a DESC
 6368:   }
 6369: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 34 33 32 31 30 29 25 24 23 22 21 20 19 18 16 15 14 12 11 10 9 8 7 6 5 4 2 1}
 6370: do_test boundary1-2.55.lt.3 {
 6371:   db eval {
 6372:     SELECT a FROM t1 WHERE rowid < 281474976710656 ORDER BY rowid
 6373:   }
 6374: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10}
 6375: do_test boundary1-2.55.lt.4 {
 6376:   db eval {
 6377:     SELECT a FROM t1 WHERE rowid < 281474976710656 ORDER BY rowid DESC
 6378:   }
 6379: } {10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6380: do_test boundary1-2.55.lt.5 {
 6381:   db eval {
 6382:     SELECT a FROM t1 WHERE rowid < 281474976710656 ORDER BY x
 6383:   }
 6384: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6385: do_test boundary1-2.55.le.1 {
 6386:   db eval {
 6387:     SELECT a FROM t1 WHERE rowid <= 281474976710656 ORDER BY a
 6388:   }
 6389: } {1 2 4 5 6 7 8 9 10 11 12 14 15 16 18 19 20 21 22 23 24 25 26 29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 6390: do_test boundary1-2.55.le.2 {
 6391:   db eval {
 6392:     SELECT a FROM t1 WHERE rowid <= 281474976710656 ORDER BY a DESC
 6393:   }
 6394: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 34 33 32 31 30 29 26 25 24 23 22 21 20 19 18 16 15 14 12 11 10 9 8 7 6 5 4 2 1}
 6395: do_test boundary1-2.55.le.3 {
 6396:   db eval {
 6397:     SELECT a FROM t1 WHERE rowid <= 281474976710656 ORDER BY rowid
 6398:   }
 6399: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26}
 6400: do_test boundary1-2.55.le.4 {
 6401:   db eval {
 6402:     SELECT a FROM t1 WHERE rowid <= 281474976710656 ORDER BY rowid DESC
 6403:   }
 6404: } {26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6405: do_test boundary1-2.55.le.5 {
 6406:   db eval {
 6407:     SELECT a FROM t1 WHERE rowid <= 281474976710656 ORDER BY x
 6408:   }
 6409: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6410: do_test boundary1-2.56.1 {
 6411:   db eval {
 6412:     SELECT * FROM t1 WHERE rowid=32767
 6413:   }
 6414: } {23 0000000000007fff}
 6415: do_test boundary1-2.56.2 {
 6416:   db eval {
 6417:     SELECT rowid, a FROM t1 WHERE x='0000000000007fff'
 6418:   }
 6419: } {32767 23}
 6420: do_test boundary1-2.56.3 {
 6421:   db eval {
 6422:     SELECT rowid, x FROM t1 WHERE a=23
 6423:   }
 6424: } {32767 0000000000007fff}
 6425: do_test boundary1-2.56.gt.1 {
 6426:   db eval {
 6427:     SELECT a FROM t1 WHERE rowid > 32767 ORDER BY a
 6428:   }
 6429: } {3 6 7 9 10 12 13 14 15 17 18 19 20 22 24 25 26 27 28 34 35 36 39 40 42 43 45 46 48 50 51 56 57 62}
 6430: do_test boundary1-2.56.gt.2 {
 6431:   db eval {
 6432:     SELECT a FROM t1 WHERE rowid > 32767 ORDER BY a DESC
 6433:   }
 6434: } {62 57 56 51 50 48 46 45 43 42 40 39 36 35 34 28 27 26 25 24 22 20 19 18 17 15 14 13 12 10 9 7 6 3}
 6435: do_test boundary1-2.56.gt.3 {
 6436:   db eval {
 6437:     SELECT a FROM t1 WHERE rowid > 32767 ORDER BY rowid
 6438:   }
 6439: } {50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 6440: do_test boundary1-2.56.gt.4 {
 6441:   db eval {
 6442:     SELECT a FROM t1 WHERE rowid > 32767 ORDER BY rowid DESC
 6443:   }
 6444: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50}
 6445: do_test boundary1-2.56.gt.5 {
 6446:   db eval {
 6447:     SELECT a FROM t1 WHERE rowid > 32767 ORDER BY x
 6448:   }
 6449: } {50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 6450: do_test boundary1-2.56.ge.1 {
 6451:   db eval {
 6452:     SELECT a FROM t1 WHERE rowid >= 32767 ORDER BY a
 6453:   }
 6454: } {3 6 7 9 10 12 13 14 15 17 18 19 20 22 23 24 25 26 27 28 34 35 36 39 40 42 43 45 46 48 50 51 56 57 62}
 6455: do_test boundary1-2.56.ge.2 {
 6456:   db eval {
 6457:     SELECT a FROM t1 WHERE rowid >= 32767 ORDER BY a DESC
 6458:   }
 6459: } {62 57 56 51 50 48 46 45 43 42 40 39 36 35 34 28 27 26 25 24 23 22 20 19 18 17 15 14 13 12 10 9 7 6 3}
 6460: do_test boundary1-2.56.ge.3 {
 6461:   db eval {
 6462:     SELECT a FROM t1 WHERE rowid >= 32767 ORDER BY rowid
 6463:   }
 6464: } {23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 6465: do_test boundary1-2.56.ge.4 {
 6466:   db eval {
 6467:     SELECT a FROM t1 WHERE rowid >= 32767 ORDER BY rowid DESC
 6468:   }
 6469: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23}
 6470: do_test boundary1-2.56.ge.5 {
 6471:   db eval {
 6472:     SELECT a FROM t1 WHERE rowid >= 32767 ORDER BY x
 6473:   }
 6474: } {23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 6475: do_test boundary1-2.56.lt.1 {
 6476:   db eval {
 6477:     SELECT a FROM t1 WHERE rowid < 32767 ORDER BY a
 6478:   }
 6479: } {1 2 4 5 8 11 16 21 29 30 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 61 63 64}
 6480: do_test boundary1-2.56.lt.2 {
 6481:   db eval {
 6482:     SELECT a FROM t1 WHERE rowid < 32767 ORDER BY a DESC
 6483:   }
 6484: } {64 63 61 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 30 29 21 16 11 8 5 4 2 1}
 6485: do_test boundary1-2.56.lt.3 {
 6486:   db eval {
 6487:     SELECT a FROM t1 WHERE rowid < 32767 ORDER BY rowid
 6488:   }
 6489: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16}
 6490: do_test boundary1-2.56.lt.4 {
 6491:   db eval {
 6492:     SELECT a FROM t1 WHERE rowid < 32767 ORDER BY rowid DESC
 6493:   }
 6494: } {16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6495: do_test boundary1-2.56.lt.5 {
 6496:   db eval {
 6497:     SELECT a FROM t1 WHERE rowid < 32767 ORDER BY x
 6498:   }
 6499: } {59 60 41 5 31 4 49 30 61 8 16 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6500: do_test boundary1-2.56.le.1 {
 6501:   db eval {
 6502:     SELECT a FROM t1 WHERE rowid <= 32767 ORDER BY a
 6503:   }
 6504: } {1 2 4 5 8 11 16 21 23 29 30 31 32 33 37 38 41 44 47 49 52 53 54 55 58 59 60 61 63 64}
 6505: do_test boundary1-2.56.le.2 {
 6506:   db eval {
 6507:     SELECT a FROM t1 WHERE rowid <= 32767 ORDER BY a DESC
 6508:   }
 6509: } {64 63 61 60 59 58 55 54 53 52 49 47 44 41 38 37 33 32 31 30 29 23 21 16 11 8 5 4 2 1}
 6510: do_test boundary1-2.56.le.3 {
 6511:   db eval {
 6512:     SELECT a FROM t1 WHERE rowid <= 32767 ORDER BY rowid
 6513:   }
 6514: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23}
 6515: do_test boundary1-2.56.le.4 {
 6516:   db eval {
 6517:     SELECT a FROM t1 WHERE rowid <= 32767 ORDER BY rowid DESC
 6518:   }
 6519: } {23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6520: do_test boundary1-2.56.le.5 {
 6521:   db eval {
 6522:     SELECT a FROM t1 WHERE rowid <= 32767 ORDER BY x
 6523:   }
 6524: } {59 60 41 5 31 4 49 30 61 8 16 23 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6525: do_test boundary1-2.57.1 {
 6526:   db eval {
 6527:     SELECT * FROM t1 WHERE rowid=127
 6528:   }
 6529: } {4 000000000000007f}
 6530: do_test boundary1-2.57.2 {
 6531:   db eval {
 6532:     SELECT rowid, a FROM t1 WHERE x='000000000000007f'
 6533:   }
 6534: } {127 4}
 6535: do_test boundary1-2.57.3 {
 6536:   db eval {
 6537:     SELECT rowid, x FROM t1 WHERE a=4
 6538:   }
 6539: } {127 000000000000007f}
 6540: do_test boundary1-2.57.gt.1 {
 6541:   db eval {
 6542:     SELECT a FROM t1 WHERE rowid > 127 ORDER BY a
 6543:   }
 6544: } {3 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 34 35 36 39 40 42 43 45 46 48 49 50 51 56 57 61 62}
 6545: do_test boundary1-2.57.gt.2 {
 6546:   db eval {
 6547:     SELECT a FROM t1 WHERE rowid > 127 ORDER BY a DESC
 6548:   }
 6549: } {62 61 57 56 51 50 49 48 46 45 43 42 40 39 36 35 34 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 3}
 6550: do_test boundary1-2.57.gt.3 {
 6551:   db eval {
 6552:     SELECT a FROM t1 WHERE rowid > 127 ORDER BY rowid
 6553:   }
 6554: } {49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 6555: do_test boundary1-2.57.gt.4 {
 6556:   db eval {
 6557:     SELECT a FROM t1 WHERE rowid > 127 ORDER BY rowid DESC
 6558:   }
 6559: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49}
 6560: do_test boundary1-2.57.gt.5 {
 6561:   db eval {
 6562:     SELECT a FROM t1 WHERE rowid > 127 ORDER BY x
 6563:   }
 6564: } {49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 6565: do_test boundary1-2.57.ge.1 {
 6566:   db eval {
 6567:     SELECT a FROM t1 WHERE rowid >= 127 ORDER BY a
 6568:   }
 6569: } {3 4 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 34 35 36 39 40 42 43 45 46 48 49 50 51 56 57 61 62}
 6570: do_test boundary1-2.57.ge.2 {
 6571:   db eval {
 6572:     SELECT a FROM t1 WHERE rowid >= 127 ORDER BY a DESC
 6573:   }
 6574: } {62 61 57 56 51 50 49 48 46 45 43 42 40 39 36 35 34 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 4 3}
 6575: do_test boundary1-2.57.ge.3 {
 6576:   db eval {
 6577:     SELECT a FROM t1 WHERE rowid >= 127 ORDER BY rowid
 6578:   }
 6579: } {4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 6580: do_test boundary1-2.57.ge.4 {
 6581:   db eval {
 6582:     SELECT a FROM t1 WHERE rowid >= 127 ORDER BY rowid DESC
 6583:   }
 6584: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4}
 6585: do_test boundary1-2.57.ge.5 {
 6586:   db eval {
 6587:     SELECT a FROM t1 WHERE rowid >= 127 ORDER BY x
 6588:   }
 6589: } {4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 6590: do_test boundary1-2.57.lt.1 {
 6591:   db eval {
 6592:     SELECT a FROM t1 WHERE rowid < 127 ORDER BY a
 6593:   }
 6594: } {1 2 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
 6595: do_test boundary1-2.57.lt.2 {
 6596:   db eval {
 6597:     SELECT a FROM t1 WHERE rowid < 127 ORDER BY a DESC
 6598:   }
 6599: } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 2 1}
 6600: do_test boundary1-2.57.lt.3 {
 6601:   db eval {
 6602:     SELECT a FROM t1 WHERE rowid < 127 ORDER BY rowid
 6603:   }
 6604: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31}
 6605: do_test boundary1-2.57.lt.4 {
 6606:   db eval {
 6607:     SELECT a FROM t1 WHERE rowid < 127 ORDER BY rowid DESC
 6608:   }
 6609: } {31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6610: do_test boundary1-2.57.lt.5 {
 6611:   db eval {
 6612:     SELECT a FROM t1 WHERE rowid < 127 ORDER BY x
 6613:   }
 6614: } {59 60 41 5 31 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6615: do_test boundary1-2.57.le.1 {
 6616:   db eval {
 6617:     SELECT a FROM t1 WHERE rowid <= 127 ORDER BY a
 6618:   }
 6619: } {1 2 4 5 11 21 29 31 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
 6620: do_test boundary1-2.57.le.2 {
 6621:   db eval {
 6622:     SELECT a FROM t1 WHERE rowid <= 127 ORDER BY a DESC
 6623:   }
 6624: } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 31 29 21 11 5 4 2 1}
 6625: do_test boundary1-2.57.le.3 {
 6626:   db eval {
 6627:     SELECT a FROM t1 WHERE rowid <= 127 ORDER BY rowid
 6628:   }
 6629: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4}
 6630: do_test boundary1-2.57.le.4 {
 6631:   db eval {
 6632:     SELECT a FROM t1 WHERE rowid <= 127 ORDER BY rowid DESC
 6633:   }
 6634: } {4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6635: do_test boundary1-2.57.le.5 {
 6636:   db eval {
 6637:     SELECT a FROM t1 WHERE rowid <= 127 ORDER BY x
 6638:   }
 6639: } {59 60 41 5 31 4 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6640: do_test boundary1-2.58.1 {
 6641:   db eval {
 6642:     SELECT * FROM t1 WHERE rowid=36028797018963967
 6643:   }
 6644: } {27 007fffffffffffff}
 6645: do_test boundary1-2.58.2 {
 6646:   db eval {
 6647:     SELECT rowid, a FROM t1 WHERE x='007fffffffffffff'
 6648:   }
 6649: } {36028797018963967 27}
 6650: do_test boundary1-2.58.3 {
 6651:   db eval {
 6652:     SELECT rowid, x FROM t1 WHERE a=27
 6653:   }
 6654: } {36028797018963967 007fffffffffffff}
 6655: do_test boundary1-2.58.gt.1 {
 6656:   db eval {
 6657:     SELECT a FROM t1 WHERE rowid > 36028797018963967 ORDER BY a
 6658:   }
 6659: } {3 17 28 45}
 6660: do_test boundary1-2.58.gt.2 {
 6661:   db eval {
 6662:     SELECT a FROM t1 WHERE rowid > 36028797018963967 ORDER BY a DESC
 6663:   }
 6664: } {45 28 17 3}
 6665: do_test boundary1-2.58.gt.3 {
 6666:   db eval {
 6667:     SELECT a FROM t1 WHERE rowid > 36028797018963967 ORDER BY rowid
 6668:   }
 6669: } {45 17 28 3}
 6670: do_test boundary1-2.58.gt.4 {
 6671:   db eval {
 6672:     SELECT a FROM t1 WHERE rowid > 36028797018963967 ORDER BY rowid DESC
 6673:   }
 6674: } {3 28 17 45}
 6675: do_test boundary1-2.58.gt.5 {
 6676:   db eval {
 6677:     SELECT a FROM t1 WHERE rowid > 36028797018963967 ORDER BY x
 6678:   }
 6679: } {45 17 28 3}
 6680: do_test boundary1-2.58.ge.1 {
 6681:   db eval {
 6682:     SELECT a FROM t1 WHERE rowid >= 36028797018963967 ORDER BY a
 6683:   }
 6684: } {3 17 27 28 45}
 6685: do_test boundary1-2.58.ge.2 {
 6686:   db eval {
 6687:     SELECT a FROM t1 WHERE rowid >= 36028797018963967 ORDER BY a DESC
 6688:   }
 6689: } {45 28 27 17 3}
 6690: do_test boundary1-2.58.ge.3 {
 6691:   db eval {
 6692:     SELECT a FROM t1 WHERE rowid >= 36028797018963967 ORDER BY rowid
 6693:   }
 6694: } {27 45 17 28 3}
 6695: do_test boundary1-2.58.ge.4 {
 6696:   db eval {
 6697:     SELECT a FROM t1 WHERE rowid >= 36028797018963967 ORDER BY rowid DESC
 6698:   }
 6699: } {3 28 17 45 27}
 6700: do_test boundary1-2.58.ge.5 {
 6701:   db eval {
 6702:     SELECT a FROM t1 WHERE rowid >= 36028797018963967 ORDER BY x
 6703:   }
 6704: } {27 45 17 28 3}
 6705: do_test boundary1-2.58.lt.1 {
 6706:   db eval {
 6707:     SELECT a FROM t1 WHERE rowid < 36028797018963967 ORDER BY a
 6708:   }
 6709: } {1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 6710: do_test boundary1-2.58.lt.2 {
 6711:   db eval {
 6712:     SELECT a FROM t1 WHERE rowid < 36028797018963967 ORDER BY a DESC
 6713:   }
 6714: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 26 25 24 23 22 21 20 19 18 16 15 14 13 12 11 10 9 8 7 6 5 4 2 1}
 6715: do_test boundary1-2.58.lt.3 {
 6716:   db eval {
 6717:     SELECT a FROM t1 WHERE rowid < 36028797018963967 ORDER BY rowid
 6718:   }
 6719: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43}
 6720: do_test boundary1-2.58.lt.4 {
 6721:   db eval {
 6722:     SELECT a FROM t1 WHERE rowid < 36028797018963967 ORDER BY rowid DESC
 6723:   }
 6724: } {43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6725: do_test boundary1-2.58.lt.5 {
 6726:   db eval {
 6727:     SELECT a FROM t1 WHERE rowid < 36028797018963967 ORDER BY x
 6728:   }
 6729: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6730: do_test boundary1-2.58.le.1 {
 6731:   db eval {
 6732:     SELECT a FROM t1 WHERE rowid <= 36028797018963967 ORDER BY a
 6733:   }
 6734: } {1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 6735: do_test boundary1-2.58.le.2 {
 6736:   db eval {
 6737:     SELECT a FROM t1 WHERE rowid <= 36028797018963967 ORDER BY a DESC
 6738:   }
 6739: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 27 26 25 24 23 22 21 20 19 18 16 15 14 13 12 11 10 9 8 7 6 5 4 2 1}
 6740: do_test boundary1-2.58.le.3 {
 6741:   db eval {
 6742:     SELECT a FROM t1 WHERE rowid <= 36028797018963967 ORDER BY rowid
 6743:   }
 6744: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27}
 6745: do_test boundary1-2.58.le.4 {
 6746:   db eval {
 6747:     SELECT a FROM t1 WHERE rowid <= 36028797018963967 ORDER BY rowid DESC
 6748:   }
 6749: } {27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6750: do_test boundary1-2.58.le.5 {
 6751:   db eval {
 6752:     SELECT a FROM t1 WHERE rowid <= 36028797018963967 ORDER BY x
 6753:   }
 6754: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6755: do_test boundary1-2.59.1 {
 6756:   db eval {
 6757:     SELECT * FROM t1 WHERE rowid=4398046511104
 6758:   }
 6759: } {56 0000040000000000}
 6760: do_test boundary1-2.59.2 {
 6761:   db eval {
 6762:     SELECT rowid, a FROM t1 WHERE x='0000040000000000'
 6763:   }
 6764: } {4398046511104 56}
 6765: do_test boundary1-2.59.3 {
 6766:   db eval {
 6767:     SELECT rowid, x FROM t1 WHERE a=56
 6768:   }
 6769: } {4398046511104 0000040000000000}
 6770: do_test boundary1-2.59.gt.1 {
 6771:   db eval {
 6772:     SELECT a FROM t1 WHERE rowid > 4398046511104 ORDER BY a
 6773:   }
 6774: } {3 10 13 17 25 26 27 28 34 43 45}
 6775: do_test boundary1-2.59.gt.2 {
 6776:   db eval {
 6777:     SELECT a FROM t1 WHERE rowid > 4398046511104 ORDER BY a DESC
 6778:   }
 6779: } {45 43 34 28 27 26 25 17 13 10 3}
 6780: do_test boundary1-2.59.gt.3 {
 6781:   db eval {
 6782:     SELECT a FROM t1 WHERE rowid > 4398046511104 ORDER BY rowid
 6783:   }
 6784: } {25 34 10 26 13 43 27 45 17 28 3}
 6785: do_test boundary1-2.59.gt.4 {
 6786:   db eval {
 6787:     SELECT a FROM t1 WHERE rowid > 4398046511104 ORDER BY rowid DESC
 6788:   }
 6789: } {3 28 17 45 27 43 13 26 10 34 25}
 6790: do_test boundary1-2.59.gt.5 {
 6791:   db eval {
 6792:     SELECT a FROM t1 WHERE rowid > 4398046511104 ORDER BY x
 6793:   }
 6794: } {25 34 10 26 13 43 27 45 17 28 3}
 6795: do_test boundary1-2.59.ge.1 {
 6796:   db eval {
 6797:     SELECT a FROM t1 WHERE rowid >= 4398046511104 ORDER BY a
 6798:   }
 6799: } {3 10 13 17 25 26 27 28 34 43 45 56}
 6800: do_test boundary1-2.59.ge.2 {
 6801:   db eval {
 6802:     SELECT a FROM t1 WHERE rowid >= 4398046511104 ORDER BY a DESC
 6803:   }
 6804: } {56 45 43 34 28 27 26 25 17 13 10 3}
 6805: do_test boundary1-2.59.ge.3 {
 6806:   db eval {
 6807:     SELECT a FROM t1 WHERE rowid >= 4398046511104 ORDER BY rowid
 6808:   }
 6809: } {56 25 34 10 26 13 43 27 45 17 28 3}
 6810: do_test boundary1-2.59.ge.4 {
 6811:   db eval {
 6812:     SELECT a FROM t1 WHERE rowid >= 4398046511104 ORDER BY rowid DESC
 6813:   }
 6814: } {3 28 17 45 27 43 13 26 10 34 25 56}
 6815: do_test boundary1-2.59.ge.5 {
 6816:   db eval {
 6817:     SELECT a FROM t1 WHERE rowid >= 4398046511104 ORDER BY x
 6818:   }
 6819: } {56 25 34 10 26 13 43 27 45 17 28 3}
 6820: do_test boundary1-2.59.lt.1 {
 6821:   db eval {
 6822:     SELECT a FROM t1 WHERE rowid < 4398046511104 ORDER BY a
 6823:   }
 6824: } {1 2 4 5 6 7 8 9 11 12 14 15 16 18 19 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64}
 6825: do_test boundary1-2.59.lt.2 {
 6826:   db eval {
 6827:     SELECT a FROM t1 WHERE rowid < 4398046511104 ORDER BY a DESC
 6828:   }
 6829: } {64 63 62 61 60 59 58 57 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 19 18 16 15 14 12 11 9 8 7 6 5 4 2 1}
 6830: do_test boundary1-2.59.lt.3 {
 6831:   db eval {
 6832:     SELECT a FROM t1 WHERE rowid < 4398046511104 ORDER BY rowid
 6833:   }
 6834: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7}
 6835: do_test boundary1-2.59.lt.4 {
 6836:   db eval {
 6837:     SELECT a FROM t1 WHERE rowid < 4398046511104 ORDER BY rowid DESC
 6838:   }
 6839: } {7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6840: do_test boundary1-2.59.lt.5 {
 6841:   db eval {
 6842:     SELECT a FROM t1 WHERE rowid < 4398046511104 ORDER BY x
 6843:   }
 6844: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6845: do_test boundary1-2.59.le.1 {
 6846:   db eval {
 6847:     SELECT a FROM t1 WHERE rowid <= 4398046511104 ORDER BY a
 6848:   }
 6849: } {1 2 4 5 6 7 8 9 11 12 14 15 16 18 19 20 21 22 23 24 29 30 31 32 33 35 36 37 38 39 40 41 42 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 6850: do_test boundary1-2.59.le.2 {
 6851:   db eval {
 6852:     SELECT a FROM t1 WHERE rowid <= 4398046511104 ORDER BY a DESC
 6853:   }
 6854: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 42 41 40 39 38 37 36 35 33 32 31 30 29 24 23 22 21 20 19 18 16 15 14 12 11 9 8 7 6 5 4 2 1}
 6855: do_test boundary1-2.59.le.3 {
 6856:   db eval {
 6857:     SELECT a FROM t1 WHERE rowid <= 4398046511104 ORDER BY rowid
 6858:   }
 6859: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56}
 6860: do_test boundary1-2.59.le.4 {
 6861:   db eval {
 6862:     SELECT a FROM t1 WHERE rowid <= 4398046511104 ORDER BY rowid DESC
 6863:   }
 6864: } {56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6865: do_test boundary1-2.59.le.5 {
 6866:   db eval {
 6867:     SELECT a FROM t1 WHERE rowid <= 4398046511104 ORDER BY x
 6868:   }
 6869: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6870: do_test boundary1-2.60.1 {
 6871:   db eval {
 6872:     SELECT * FROM t1 WHERE rowid=1
 6873:   }
 6874: } {60 0000000000000001}
 6875: do_test boundary1-2.60.2 {
 6876:   db eval {
 6877:     SELECT rowid, a FROM t1 WHERE x='0000000000000001'
 6878:   }
 6879: } {1 60}
 6880: do_test boundary1-2.60.3 {
 6881:   db eval {
 6882:     SELECT rowid, x FROM t1 WHERE a=60
 6883:   }
 6884: } {1 0000000000000001}
 6885: do_test boundary1-2.60.gt.1 {
 6886:   db eval {
 6887:     SELECT a FROM t1 WHERE rowid > 1 ORDER BY a
 6888:   }
 6889: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 34 35 36 39 40 41 42 43 45 46 48 49 50 51 56 57 61 62}
 6890: do_test boundary1-2.60.gt.2 {
 6891:   db eval {
 6892:     SELECT a FROM t1 WHERE rowid > 1 ORDER BY a DESC
 6893:   }
 6894: } {62 61 57 56 51 50 49 48 46 45 43 42 41 40 39 36 35 34 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 6895: do_test boundary1-2.60.gt.3 {
 6896:   db eval {
 6897:     SELECT a FROM t1 WHERE rowid > 1 ORDER BY rowid
 6898:   }
 6899: } {41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 6900: do_test boundary1-2.60.gt.4 {
 6901:   db eval {
 6902:     SELECT a FROM t1 WHERE rowid > 1 ORDER BY rowid DESC
 6903:   }
 6904: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41}
 6905: do_test boundary1-2.60.gt.5 {
 6906:   db eval {
 6907:     SELECT a FROM t1 WHERE rowid > 1 ORDER BY x
 6908:   }
 6909: } {41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 6910: do_test boundary1-2.60.ge.1 {
 6911:   db eval {
 6912:     SELECT a FROM t1 WHERE rowid >= 1 ORDER BY a
 6913:   }
 6914: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 34 35 36 39 40 41 42 43 45 46 48 49 50 51 56 57 60 61 62}
 6915: do_test boundary1-2.60.ge.2 {
 6916:   db eval {
 6917:     SELECT a FROM t1 WHERE rowid >= 1 ORDER BY a DESC
 6918:   }
 6919: } {62 61 60 57 56 51 50 49 48 46 45 43 42 41 40 39 36 35 34 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 6920: do_test boundary1-2.60.ge.3 {
 6921:   db eval {
 6922:     SELECT a FROM t1 WHERE rowid >= 1 ORDER BY rowid
 6923:   }
 6924: } {60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 6925: do_test boundary1-2.60.ge.4 {
 6926:   db eval {
 6927:     SELECT a FROM t1 WHERE rowid >= 1 ORDER BY rowid DESC
 6928:   }
 6929: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60}
 6930: do_test boundary1-2.60.ge.5 {
 6931:   db eval {
 6932:     SELECT a FROM t1 WHERE rowid >= 1 ORDER BY x
 6933:   }
 6934: } {60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 6935: do_test boundary1-2.60.lt.1 {
 6936:   db eval {
 6937:     SELECT a FROM t1 WHERE rowid < 1 ORDER BY a
 6938:   }
 6939: } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 63 64}
 6940: do_test boundary1-2.60.lt.2 {
 6941:   db eval {
 6942:     SELECT a FROM t1 WHERE rowid < 1 ORDER BY a DESC
 6943:   }
 6944: } {64 63 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
 6945: do_test boundary1-2.60.lt.3 {
 6946:   db eval {
 6947:     SELECT a FROM t1 WHERE rowid < 1 ORDER BY rowid
 6948:   }
 6949: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59}
 6950: do_test boundary1-2.60.lt.4 {
 6951:   db eval {
 6952:     SELECT a FROM t1 WHERE rowid < 1 ORDER BY rowid DESC
 6953:   }
 6954: } {59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6955: do_test boundary1-2.60.lt.5 {
 6956:   db eval {
 6957:     SELECT a FROM t1 WHERE rowid < 1 ORDER BY x
 6958:   }
 6959: } {59 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6960: do_test boundary1-2.60.le.1 {
 6961:   db eval {
 6962:     SELECT a FROM t1 WHERE rowid <= 1 ORDER BY a
 6963:   }
 6964: } {1 2 11 21 29 32 33 37 38 44 47 52 53 54 55 58 59 60 63 64}
 6965: do_test boundary1-2.60.le.2 {
 6966:   db eval {
 6967:     SELECT a FROM t1 WHERE rowid <= 1 ORDER BY a DESC
 6968:   }
 6969: } {64 63 60 59 58 55 54 53 52 47 44 38 37 33 32 29 21 11 2 1}
 6970: do_test boundary1-2.60.le.3 {
 6971:   db eval {
 6972:     SELECT a FROM t1 WHERE rowid <= 1 ORDER BY rowid
 6973:   }
 6974: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60}
 6975: do_test boundary1-2.60.le.4 {
 6976:   db eval {
 6977:     SELECT a FROM t1 WHERE rowid <= 1 ORDER BY rowid DESC
 6978:   }
 6979: } {60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 6980: do_test boundary1-2.60.le.5 {
 6981:   db eval {
 6982:     SELECT a FROM t1 WHERE rowid <= 1 ORDER BY x
 6983:   }
 6984: } {59 60 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 6985: do_test boundary1-2.61.1 {
 6986:   db eval {
 6987:     SELECT * FROM t1 WHERE rowid=36028797018963968
 6988:   }
 6989: } {45 0080000000000000}
 6990: do_test boundary1-2.61.2 {
 6991:   db eval {
 6992:     SELECT rowid, a FROM t1 WHERE x='0080000000000000'
 6993:   }
 6994: } {36028797018963968 45}
 6995: do_test boundary1-2.61.3 {
 6996:   db eval {
 6997:     SELECT rowid, x FROM t1 WHERE a=45
 6998:   }
 6999: } {36028797018963968 0080000000000000}
 7000: do_test boundary1-2.61.gt.1 {
 7001:   db eval {
 7002:     SELECT a FROM t1 WHERE rowid > 36028797018963968 ORDER BY a
 7003:   }
 7004: } {3 17 28}
 7005: do_test boundary1-2.61.gt.2 {
 7006:   db eval {
 7007:     SELECT a FROM t1 WHERE rowid > 36028797018963968 ORDER BY a DESC
 7008:   }
 7009: } {28 17 3}
 7010: do_test boundary1-2.61.gt.3 {
 7011:   db eval {
 7012:     SELECT a FROM t1 WHERE rowid > 36028797018963968 ORDER BY rowid
 7013:   }
 7014: } {17 28 3}
 7015: do_test boundary1-2.61.gt.4 {
 7016:   db eval {
 7017:     SELECT a FROM t1 WHERE rowid > 36028797018963968 ORDER BY rowid DESC
 7018:   }
 7019: } {3 28 17}
 7020: do_test boundary1-2.61.gt.5 {
 7021:   db eval {
 7022:     SELECT a FROM t1 WHERE rowid > 36028797018963968 ORDER BY x
 7023:   }
 7024: } {17 28 3}
 7025: do_test boundary1-2.61.ge.1 {
 7026:   db eval {
 7027:     SELECT a FROM t1 WHERE rowid >= 36028797018963968 ORDER BY a
 7028:   }
 7029: } {3 17 28 45}
 7030: do_test boundary1-2.61.ge.2 {
 7031:   db eval {
 7032:     SELECT a FROM t1 WHERE rowid >= 36028797018963968 ORDER BY a DESC
 7033:   }
 7034: } {45 28 17 3}
 7035: do_test boundary1-2.61.ge.3 {
 7036:   db eval {
 7037:     SELECT a FROM t1 WHERE rowid >= 36028797018963968 ORDER BY rowid
 7038:   }
 7039: } {45 17 28 3}
 7040: do_test boundary1-2.61.ge.4 {
 7041:   db eval {
 7042:     SELECT a FROM t1 WHERE rowid >= 36028797018963968 ORDER BY rowid DESC
 7043:   }
 7044: } {3 28 17 45}
 7045: do_test boundary1-2.61.ge.5 {
 7046:   db eval {
 7047:     SELECT a FROM t1 WHERE rowid >= 36028797018963968 ORDER BY x
 7048:   }
 7049: } {45 17 28 3}
 7050: do_test boundary1-2.61.lt.1 {
 7051:   db eval {
 7052:     SELECT a FROM t1 WHERE rowid < 36028797018963968 ORDER BY a
 7053:   }
 7054: } {1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 7055: do_test boundary1-2.61.lt.2 {
 7056:   db eval {
 7057:     SELECT a FROM t1 WHERE rowid < 36028797018963968 ORDER BY a DESC
 7058:   }
 7059: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 27 26 25 24 23 22 21 20 19 18 16 15 14 13 12 11 10 9 8 7 6 5 4 2 1}
 7060: do_test boundary1-2.61.lt.3 {
 7061:   db eval {
 7062:     SELECT a FROM t1 WHERE rowid < 36028797018963968 ORDER BY rowid
 7063:   }
 7064: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27}
 7065: do_test boundary1-2.61.lt.4 {
 7066:   db eval {
 7067:     SELECT a FROM t1 WHERE rowid < 36028797018963968 ORDER BY rowid DESC
 7068:   }
 7069: } {27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 7070: do_test boundary1-2.61.lt.5 {
 7071:   db eval {
 7072:     SELECT a FROM t1 WHERE rowid < 36028797018963968 ORDER BY x
 7073:   }
 7074: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 7075: do_test boundary1-2.61.le.1 {
 7076:   db eval {
 7077:     SELECT a FROM t1 WHERE rowid <= 36028797018963968 ORDER BY a
 7078:   }
 7079: } {1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 7080: do_test boundary1-2.61.le.2 {
 7081:   db eval {
 7082:     SELECT a FROM t1 WHERE rowid <= 36028797018963968 ORDER BY a DESC
 7083:   }
 7084: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 27 26 25 24 23 22 21 20 19 18 16 15 14 13 12 11 10 9 8 7 6 5 4 2 1}
 7085: do_test boundary1-2.61.le.3 {
 7086:   db eval {
 7087:     SELECT a FROM t1 WHERE rowid <= 36028797018963968 ORDER BY rowid
 7088:   }
 7089: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45}
 7090: do_test boundary1-2.61.le.4 {
 7091:   db eval {
 7092:     SELECT a FROM t1 WHERE rowid <= 36028797018963968 ORDER BY rowid DESC
 7093:   }
 7094: } {45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 7095: do_test boundary1-2.61.le.5 {
 7096:   db eval {
 7097:     SELECT a FROM t1 WHERE rowid <= 36028797018963968 ORDER BY x
 7098:   }
 7099: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 7100: do_test boundary1-2.62.1 {
 7101:   db eval {
 7102:     SELECT * FROM t1 WHERE rowid=-2147483649
 7103:   }
 7104: } {47 ffffffff7fffffff}
 7105: do_test boundary1-2.62.2 {
 7106:   db eval {
 7107:     SELECT rowid, a FROM t1 WHERE x='ffffffff7fffffff'
 7108:   }
 7109: } {-2147483649 47}
 7110: do_test boundary1-2.62.3 {
 7111:   db eval {
 7112:     SELECT rowid, x FROM t1 WHERE a=47
 7113:   }
 7114: } {-2147483649 ffffffff7fffffff}
 7115: do_test boundary1-2.62.gt.1 {
 7116:   db eval {
 7117:     SELECT a FROM t1 WHERE rowid > -2147483649 ORDER BY a
 7118:   }
 7119: } {1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 45 46 48 49 50 51 52 53 54 56 57 59 60 61 62}
 7120: do_test boundary1-2.62.gt.2 {
 7121:   db eval {
 7122:     SELECT a FROM t1 WHERE rowid > -2147483649 ORDER BY a DESC
 7123:   }
 7124: } {62 61 60 59 57 56 54 53 52 51 50 49 48 46 45 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 1}
 7125: do_test boundary1-2.62.gt.3 {
 7126:   db eval {
 7127:     SELECT a FROM t1 WHERE rowid > -2147483649 ORDER BY rowid
 7128:   }
 7129: } {11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 7130: do_test boundary1-2.62.gt.4 {
 7131:   db eval {
 7132:     SELECT a FROM t1 WHERE rowid > -2147483649 ORDER BY rowid DESC
 7133:   }
 7134: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11}
 7135: do_test boundary1-2.62.gt.5 {
 7136:   db eval {
 7137:     SELECT a FROM t1 WHERE rowid > -2147483649 ORDER BY x
 7138:   }
 7139: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 11 1 37 29 32 54 53 52 33 38}
 7140: do_test boundary1-2.62.ge.1 {
 7141:   db eval {
 7142:     SELECT a FROM t1 WHERE rowid >= -2147483649 ORDER BY a
 7143:   }
 7144: } {1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 45 46 47 48 49 50 51 52 53 54 56 57 59 60 61 62}
 7145: do_test boundary1-2.62.ge.2 {
 7146:   db eval {
 7147:     SELECT a FROM t1 WHERE rowid >= -2147483649 ORDER BY a DESC
 7148:   }
 7149: } {62 61 60 59 57 56 54 53 52 51 50 49 48 47 46 45 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 1}
 7150: do_test boundary1-2.62.ge.3 {
 7151:   db eval {
 7152:     SELECT a FROM t1 WHERE rowid >= -2147483649 ORDER BY rowid
 7153:   }
 7154: } {47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 7155: do_test boundary1-2.62.ge.4 {
 7156:   db eval {
 7157:     SELECT a FROM t1 WHERE rowid >= -2147483649 ORDER BY rowid DESC
 7158:   }
 7159: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47}
 7160: do_test boundary1-2.62.ge.5 {
 7161:   db eval {
 7162:     SELECT a FROM t1 WHERE rowid >= -2147483649 ORDER BY x
 7163:   }
 7164: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 47 11 1 37 29 32 54 53 52 33 38}
 7165: do_test boundary1-2.62.lt.1 {
 7166:   db eval {
 7167:     SELECT a FROM t1 WHERE rowid < -2147483649 ORDER BY a
 7168:   }
 7169: } {2 21 44 55 58 63 64}
 7170: do_test boundary1-2.62.lt.2 {
 7171:   db eval {
 7172:     SELECT a FROM t1 WHERE rowid < -2147483649 ORDER BY a DESC
 7173:   }
 7174: } {64 63 58 55 44 21 2}
 7175: do_test boundary1-2.62.lt.3 {
 7176:   db eval {
 7177:     SELECT a FROM t1 WHERE rowid < -2147483649 ORDER BY rowid
 7178:   }
 7179: } {55 2 64 21 44 58 63}
 7180: do_test boundary1-2.62.lt.4 {
 7181:   db eval {
 7182:     SELECT a FROM t1 WHERE rowid < -2147483649 ORDER BY rowid DESC
 7183:   }
 7184: } {63 58 44 21 64 2 55}
 7185: do_test boundary1-2.62.lt.5 {
 7186:   db eval {
 7187:     SELECT a FROM t1 WHERE rowid < -2147483649 ORDER BY x
 7188:   }
 7189: } {55 2 64 21 44 58 63}
 7190: do_test boundary1-2.62.le.1 {
 7191:   db eval {
 7192:     SELECT a FROM t1 WHERE rowid <= -2147483649 ORDER BY a
 7193:   }
 7194: } {2 21 44 47 55 58 63 64}
 7195: do_test boundary1-2.62.le.2 {
 7196:   db eval {
 7197:     SELECT a FROM t1 WHERE rowid <= -2147483649 ORDER BY a DESC
 7198:   }
 7199: } {64 63 58 55 47 44 21 2}
 7200: do_test boundary1-2.62.le.3 {
 7201:   db eval {
 7202:     SELECT a FROM t1 WHERE rowid <= -2147483649 ORDER BY rowid
 7203:   }
 7204: } {55 2 64 21 44 58 63 47}
 7205: do_test boundary1-2.62.le.4 {
 7206:   db eval {
 7207:     SELECT a FROM t1 WHERE rowid <= -2147483649 ORDER BY rowid DESC
 7208:   }
 7209: } {47 63 58 44 21 64 2 55}
 7210: do_test boundary1-2.62.le.5 {
 7211:   db eval {
 7212:     SELECT a FROM t1 WHERE rowid <= -2147483649 ORDER BY x
 7213:   }
 7214: } {55 2 64 21 44 58 63 47}
 7215: do_test boundary1-2.63.1 {
 7216:   db eval {
 7217:     SELECT * FROM t1 WHERE rowid=-36028797018963969
 7218:   }
 7219: } {2 ff7fffffffffffff}
 7220: do_test boundary1-2.63.2 {
 7221:   db eval {
 7222:     SELECT rowid, a FROM t1 WHERE x='ff7fffffffffffff'
 7223:   }
 7224: } {-36028797018963969 2}
 7225: do_test boundary1-2.63.3 {
 7226:   db eval {
 7227:     SELECT rowid, x FROM t1 WHERE a=2
 7228:   }
 7229: } {-36028797018963969 ff7fffffffffffff}
 7230: do_test boundary1-2.63.gt.1 {
 7231:   db eval {
 7232:     SELECT a FROM t1 WHERE rowid > -36028797018963969 ORDER BY a
 7233:   }
 7234: } {1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 56 57 58 59 60 61 62 63 64}
 7235: do_test boundary1-2.63.gt.2 {
 7236:   db eval {
 7237:     SELECT a FROM t1 WHERE rowid > -36028797018963969 ORDER BY a DESC
 7238:   }
 7239: } {64 63 62 61 60 59 58 57 56 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 1}
 7240: do_test boundary1-2.63.gt.3 {
 7241:   db eval {
 7242:     SELECT a FROM t1 WHERE rowid > -36028797018963969 ORDER BY rowid
 7243:   }
 7244: } {64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 7245: do_test boundary1-2.63.gt.4 {
 7246:   db eval {
 7247:     SELECT a FROM t1 WHERE rowid > -36028797018963969 ORDER BY rowid DESC
 7248:   }
 7249: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64}
 7250: do_test boundary1-2.63.gt.5 {
 7251:   db eval {
 7252:     SELECT a FROM t1 WHERE rowid > -36028797018963969 ORDER BY x
 7253:   }
 7254: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 7255: do_test boundary1-2.63.ge.1 {
 7256:   db eval {
 7257:     SELECT a FROM t1 WHERE rowid >= -36028797018963969 ORDER BY a
 7258:   }
 7259: } {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 56 57 58 59 60 61 62 63 64}
 7260: do_test boundary1-2.63.ge.2 {
 7261:   db eval {
 7262:     SELECT a FROM t1 WHERE rowid >= -36028797018963969 ORDER BY a DESC
 7263:   }
 7264: } {64 63 62 61 60 59 58 57 56 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1}
 7265: do_test boundary1-2.63.ge.3 {
 7266:   db eval {
 7267:     SELECT a FROM t1 WHERE rowid >= -36028797018963969 ORDER BY rowid
 7268:   }
 7269: } {2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 7270: do_test boundary1-2.63.ge.4 {
 7271:   db eval {
 7272:     SELECT a FROM t1 WHERE rowid >= -36028797018963969 ORDER BY rowid DESC
 7273:   }
 7274: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2}
 7275: do_test boundary1-2.63.ge.5 {
 7276:   db eval {
 7277:     SELECT a FROM t1 WHERE rowid >= -36028797018963969 ORDER BY x
 7278:   }
 7279: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 7280: do_test boundary1-2.63.lt.1 {
 7281:   db eval {
 7282:     SELECT a FROM t1 WHERE rowid < -36028797018963969 ORDER BY a
 7283:   }
 7284: } {55}
 7285: do_test boundary1-2.63.lt.2 {
 7286:   db eval {
 7287:     SELECT a FROM t1 WHERE rowid < -36028797018963969 ORDER BY a DESC
 7288:   }
 7289: } {55}
 7290: do_test boundary1-2.63.lt.3 {
 7291:   db eval {
 7292:     SELECT a FROM t1 WHERE rowid < -36028797018963969 ORDER BY rowid
 7293:   }
 7294: } {55}
 7295: do_test boundary1-2.63.lt.4 {
 7296:   db eval {
 7297:     SELECT a FROM t1 WHERE rowid < -36028797018963969 ORDER BY rowid DESC
 7298:   }
 7299: } {55}
 7300: do_test boundary1-2.63.lt.5 {
 7301:   db eval {
 7302:     SELECT a FROM t1 WHERE rowid < -36028797018963969 ORDER BY x
 7303:   }
 7304: } {55}
 7305: do_test boundary1-2.63.le.1 {
 7306:   db eval {
 7307:     SELECT a FROM t1 WHERE rowid <= -36028797018963969 ORDER BY a
 7308:   }
 7309: } {2 55}
 7310: do_test boundary1-2.63.le.2 {
 7311:   db eval {
 7312:     SELECT a FROM t1 WHERE rowid <= -36028797018963969 ORDER BY a DESC
 7313:   }
 7314: } {55 2}
 7315: do_test boundary1-2.63.le.3 {
 7316:   db eval {
 7317:     SELECT a FROM t1 WHERE rowid <= -36028797018963969 ORDER BY rowid
 7318:   }
 7319: } {55 2}
 7320: do_test boundary1-2.63.le.4 {
 7321:   db eval {
 7322:     SELECT a FROM t1 WHERE rowid <= -36028797018963969 ORDER BY rowid DESC
 7323:   }
 7324: } {2 55}
 7325: do_test boundary1-2.63.le.5 {
 7326:   db eval {
 7327:     SELECT a FROM t1 WHERE rowid <= -36028797018963969 ORDER BY x
 7328:   }
 7329: } {55 2}
 7330: do_test boundary1-2.64.1 {
 7331:   db eval {
 7332:     SELECT * FROM t1 WHERE rowid=3
 7333:   }
 7334: } {5 0000000000000003}
 7335: do_test boundary1-2.64.2 {
 7336:   db eval {
 7337:     SELECT rowid, a FROM t1 WHERE x='0000000000000003'
 7338:   }
 7339: } {3 5}
 7340: do_test boundary1-2.64.3 {
 7341:   db eval {
 7342:     SELECT rowid, x FROM t1 WHERE a=5
 7343:   }
 7344: } {3 0000000000000003}
 7345: do_test boundary1-2.64.gt.1 {
 7346:   db eval {
 7347:     SELECT a FROM t1 WHERE rowid > 3 ORDER BY a
 7348:   }
 7349: } {3 4 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 34 35 36 39 40 42 43 45 46 48 49 50 51 56 57 61 62}
 7350: do_test boundary1-2.64.gt.2 {
 7351:   db eval {
 7352:     SELECT a FROM t1 WHERE rowid > 3 ORDER BY a DESC
 7353:   }
 7354: } {62 61 57 56 51 50 49 48 46 45 43 42 40 39 36 35 34 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 4 3}
 7355: do_test boundary1-2.64.gt.3 {
 7356:   db eval {
 7357:     SELECT a FROM t1 WHERE rowid > 3 ORDER BY rowid
 7358:   }
 7359: } {31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 7360: do_test boundary1-2.64.gt.4 {
 7361:   db eval {
 7362:     SELECT a FROM t1 WHERE rowid > 3 ORDER BY rowid DESC
 7363:   }
 7364: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31}
 7365: do_test boundary1-2.64.gt.5 {
 7366:   db eval {
 7367:     SELECT a FROM t1 WHERE rowid > 3 ORDER BY x
 7368:   }
 7369: } {31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 7370: do_test boundary1-2.64.ge.1 {
 7371:   db eval {
 7372:     SELECT a FROM t1 WHERE rowid >= 3 ORDER BY a
 7373:   }
 7374: } {3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 30 31 34 35 36 39 40 42 43 45 46 48 49 50 51 56 57 61 62}
 7375: do_test boundary1-2.64.ge.2 {
 7376:   db eval {
 7377:     SELECT a FROM t1 WHERE rowid >= 3 ORDER BY a DESC
 7378:   }
 7379: } {62 61 57 56 51 50 49 48 46 45 43 42 40 39 36 35 34 31 30 28 27 26 25 24 23 22 20 19 18 17 16 15 14 13 12 10 9 8 7 6 5 4 3}
 7380: do_test boundary1-2.64.ge.3 {
 7381:   db eval {
 7382:     SELECT a FROM t1 WHERE rowid >= 3 ORDER BY rowid
 7383:   }
 7384: } {5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 7385: do_test boundary1-2.64.ge.4 {
 7386:   db eval {
 7387:     SELECT a FROM t1 WHERE rowid >= 3 ORDER BY rowid DESC
 7388:   }
 7389: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5}
 7390: do_test boundary1-2.64.ge.5 {
 7391:   db eval {
 7392:     SELECT a FROM t1 WHERE rowid >= 3 ORDER BY x
 7393:   }
 7394: } {5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 7395: do_test boundary1-2.64.lt.1 {
 7396:   db eval {
 7397:     SELECT a FROM t1 WHERE rowid < 3 ORDER BY a
 7398:   }
 7399: } {1 2 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
 7400: do_test boundary1-2.64.lt.2 {
 7401:   db eval {
 7402:     SELECT a FROM t1 WHERE rowid < 3 ORDER BY a DESC
 7403:   }
 7404: } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 2 1}
 7405: do_test boundary1-2.64.lt.3 {
 7406:   db eval {
 7407:     SELECT a FROM t1 WHERE rowid < 3 ORDER BY rowid
 7408:   }
 7409: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41}
 7410: do_test boundary1-2.64.lt.4 {
 7411:   db eval {
 7412:     SELECT a FROM t1 WHERE rowid < 3 ORDER BY rowid DESC
 7413:   }
 7414: } {41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 7415: do_test boundary1-2.64.lt.5 {
 7416:   db eval {
 7417:     SELECT a FROM t1 WHERE rowid < 3 ORDER BY x
 7418:   }
 7419: } {59 60 41 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 7420: do_test boundary1-2.64.le.1 {
 7421:   db eval {
 7422:     SELECT a FROM t1 WHERE rowid <= 3 ORDER BY a
 7423:   }
 7424: } {1 2 5 11 21 29 32 33 37 38 41 44 47 52 53 54 55 58 59 60 63 64}
 7425: do_test boundary1-2.64.le.2 {
 7426:   db eval {
 7427:     SELECT a FROM t1 WHERE rowid <= 3 ORDER BY a DESC
 7428:   }
 7429: } {64 63 60 59 58 55 54 53 52 47 44 41 38 37 33 32 29 21 11 5 2 1}
 7430: do_test boundary1-2.64.le.3 {
 7431:   db eval {
 7432:     SELECT a FROM t1 WHERE rowid <= 3 ORDER BY rowid
 7433:   }
 7434: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5}
 7435: do_test boundary1-2.64.le.4 {
 7436:   db eval {
 7437:     SELECT a FROM t1 WHERE rowid <= 3 ORDER BY rowid DESC
 7438:   }
 7439: } {5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 7440: do_test boundary1-2.64.le.5 {
 7441:   db eval {
 7442:     SELECT a FROM t1 WHERE rowid <= 3 ORDER BY x
 7443:   }
 7444: } {59 60 41 5 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 7445: do_test boundary1-2.65.gt.1 {
 7446:   db eval {
 7447:     SELECT a FROM t1 WHERE rowid > 9.22337303685477580800e+18 ORDER BY a
 7448:   }
 7449: } {}
 7450: do_test boundary1-2.65.gt.2 {
 7451:   db eval {
 7452:     SELECT a FROM t1 WHERE rowid > 9.22337303685477580800e+18 ORDER BY a DESC
 7453:   }
 7454: } {}
 7455: do_test boundary1-2.65.gt.3 {
 7456:   db eval {
 7457:     SELECT a FROM t1 WHERE rowid > 9.22337303685477580800e+18 ORDER BY rowid
 7458:   }
 7459: } {}
 7460: do_test boundary1-2.65.gt.4 {
 7461:   db eval {
 7462:     SELECT a FROM t1 WHERE rowid > 9.22337303685477580800e+18 ORDER BY rowid DESC
 7463:   }
 7464: } {}
 7465: do_test boundary1-2.65.gt.5 {
 7466:   db eval {
 7467:     SELECT a FROM t1 WHERE rowid > 9.22337303685477580800e+18 ORDER BY x
 7468:   }
 7469: } {}
 7470: do_test boundary1-2.65.ge.1 {
 7471:   db eval {
 7472:     SELECT a FROM t1 WHERE rowid >= 9.22337303685477580800e+18 ORDER BY a
 7473:   }
 7474: } {}
 7475: do_test boundary1-2.65.ge.2 {
 7476:   db eval {
 7477:     SELECT a FROM t1 WHERE rowid >= 9.22337303685477580800e+18 ORDER BY a DESC
 7478:   }
 7479: } {}
 7480: do_test boundary1-2.65.ge.3 {
 7481:   db eval {
 7482:     SELECT a FROM t1 WHERE rowid >= 9.22337303685477580800e+18 ORDER BY rowid
 7483:   }
 7484: } {}
 7485: do_test boundary1-2.65.ge.4 {
 7486:   db eval {
 7487:     SELECT a FROM t1 WHERE rowid >= 9.22337303685477580800e+18 ORDER BY rowid DESC
 7488:   }
 7489: } {}
 7490: do_test boundary1-2.65.ge.5 {
 7491:   db eval {
 7492:     SELECT a FROM t1 WHERE rowid >= 9.22337303685477580800e+18 ORDER BY x
 7493:   }
 7494: } {}
 7495: do_test boundary1-2.65.lt.1 {
 7496:   db eval {
 7497:     SELECT a FROM t1 WHERE rowid < 9.22337303685477580800e+18 ORDER BY a
 7498:   }
 7499: } {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 7500: do_test boundary1-2.65.lt.2 {
 7501:   db eval {
 7502:     SELECT a FROM t1 WHERE rowid < 9.22337303685477580800e+18 ORDER BY a DESC
 7503:   }
 7504: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1}
 7505: do_test boundary1-2.65.lt.3 {
 7506:   db eval {
 7507:     SELECT a FROM t1 WHERE rowid < 9.22337303685477580800e+18 ORDER BY rowid
 7508:   }
 7509: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 7510: do_test boundary1-2.65.lt.4 {
 7511:   db eval {
 7512:     SELECT a FROM t1 WHERE rowid < 9.22337303685477580800e+18 ORDER BY rowid DESC
 7513:   }
 7514: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 7515: do_test boundary1-2.65.lt.5 {
 7516:   db eval {
 7517:     SELECT a FROM t1 WHERE rowid < 9.22337303685477580800e+18 ORDER BY x
 7518:   }
 7519: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 7520: do_test boundary1-2.65.le.1 {
 7521:   db eval {
 7522:     SELECT a FROM t1 WHERE rowid <= 9.22337303685477580800e+18 ORDER BY a
 7523:   }
 7524: } {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 7525: do_test boundary1-2.65.le.2 {
 7526:   db eval {
 7527:     SELECT a FROM t1 WHERE rowid <= 9.22337303685477580800e+18 ORDER BY a DESC
 7528:   }
 7529: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1}
 7530: do_test boundary1-2.65.le.3 {
 7531:   db eval {
 7532:     SELECT a FROM t1 WHERE rowid <= 9.22337303685477580800e+18 ORDER BY rowid
 7533:   }
 7534: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 7535: do_test boundary1-2.65.le.4 {
 7536:   db eval {
 7537:     SELECT a FROM t1 WHERE rowid <= 9.22337303685477580800e+18 ORDER BY rowid DESC
 7538:   }
 7539: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 7540: do_test boundary1-2.65.le.5 {
 7541:   db eval {
 7542:     SELECT a FROM t1 WHERE rowid <= 9.22337303685477580800e+18 ORDER BY x
 7543:   }
 7544: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 7545: do_test boundary1-2.66.gt.1 {
 7546:   db eval {
 7547:     SELECT a FROM t1 WHERE rowid > -9.22337303685477580800e+18 ORDER BY a
 7548:   }
 7549: } {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 7550: do_test boundary1-2.66.gt.2 {
 7551:   db eval {
 7552:     SELECT a FROM t1 WHERE rowid > -9.22337303685477580800e+18 ORDER BY a DESC
 7553:   }
 7554: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1}
 7555: do_test boundary1-2.66.gt.3 {
 7556:   db eval {
 7557:     SELECT a FROM t1 WHERE rowid > -9.22337303685477580800e+18 ORDER BY rowid
 7558:   }
 7559: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 7560: do_test boundary1-2.66.gt.4 {
 7561:   db eval {
 7562:     SELECT a FROM t1 WHERE rowid > -9.22337303685477580800e+18 ORDER BY rowid DESC
 7563:   }
 7564: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 7565: do_test boundary1-2.66.gt.5 {
 7566:   db eval {
 7567:     SELECT a FROM t1 WHERE rowid > -9.22337303685477580800e+18 ORDER BY x
 7568:   }
 7569: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 7570: do_test boundary1-2.66.ge.1 {
 7571:   db eval {
 7572:     SELECT a FROM t1 WHERE rowid >= -9.22337303685477580800e+18 ORDER BY a
 7573:   }
 7574: } {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64}
 7575: do_test boundary1-2.66.ge.2 {
 7576:   db eval {
 7577:     SELECT a FROM t1 WHERE rowid >= -9.22337303685477580800e+18 ORDER BY a DESC
 7578:   }
 7579: } {64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1}
 7580: do_test boundary1-2.66.ge.3 {
 7581:   db eval {
 7582:     SELECT a FROM t1 WHERE rowid >= -9.22337303685477580800e+18 ORDER BY rowid
 7583:   }
 7584: } {55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38 59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3}
 7585: do_test boundary1-2.66.ge.4 {
 7586:   db eval {
 7587:     SELECT a FROM t1 WHERE rowid >= -9.22337303685477580800e+18 ORDER BY rowid DESC
 7588:   }
 7589: } {3 28 17 45 27 43 13 26 10 34 25 56 7 19 57 35 46 22 39 36 14 51 20 40 12 6 9 24 18 42 15 62 48 50 23 16 8 61 30 49 4 31 5 41 60 59 38 33 52 53 54 32 29 37 1 11 47 63 58 44 21 64 2 55}
 7590: do_test boundary1-2.66.ge.5 {
 7591:   db eval {
 7592:     SELECT a FROM t1 WHERE rowid >= -9.22337303685477580800e+18 ORDER BY x
 7593:   }
 7594: } {59 60 41 5 31 4 49 30 61 8 16 23 50 48 62 15 42 18 24 9 6 12 40 20 51 14 36 39 22 46 35 57 19 7 56 25 34 10 26 13 43 27 45 17 28 3 55 2 64 21 44 58 63 47 11 1 37 29 32 54 53 52 33 38}
 7595: do_test boundary1-2.66.lt.1 {
 7596:   db eval {
 7597:     SELECT a FROM t1 WHERE rowid < -9.22337303685477580800e+18 ORDER BY a
 7598:   }
 7599: } {}
 7600: do_test boundary1-2.66.lt.2 {
 7601:   db eval {
 7602:     SELECT a FROM t1 WHERE rowid < -9.22337303685477580800e+18 ORDER BY a DESC
 7603:   }
 7604: } {}
 7605: do_test boundary1-2.66.lt.3 {
 7606:   db eval {
 7607:     SELECT a FROM t1 WHERE rowid < -9.22337303685477580800e+18 ORDER BY rowid
 7608:   }
 7609: } {}
 7610: do_test boundary1-2.66.lt.4 {
 7611:   db eval {
 7612:     SELECT a FROM t1 WHERE rowid < -9.22337303685477580800e+18 ORDER BY rowid DESC
 7613:   }
 7614: } {}
 7615: do_test boundary1-2.66.lt.5 {
 7616:   db eval {
 7617:     SELECT a FROM t1 WHERE rowid < -9.22337303685477580800e+18 ORDER BY x
 7618:   }
 7619: } {}
 7620: do_test boundary1-2.66.le.1 {
 7621:   db eval {
 7622:     SELECT a FROM t1 WHERE rowid <= -9.22337303685477580800e+18 ORDER BY a
 7623:   }
 7624: } {}
 7625: do_test boundary1-2.66.le.2 {
 7626:   db eval {
 7627:     SELECT a FROM t1 WHERE rowid <= -9.22337303685477580800e+18 ORDER BY a DESC
 7628:   }
 7629: } {}
 7630: do_test boundary1-2.66.le.3 {
 7631:   db eval {
 7632:     SELECT a FROM t1 WHERE rowid <= -9.22337303685477580800e+18 ORDER BY rowid
 7633:   }
 7634: } {}
 7635: do_test boundary1-2.66.le.4 {
 7636:   db eval {
 7637:     SELECT a FROM t1 WHERE rowid <= -9.22337303685477580800e+18 ORDER BY rowid DESC
 7638:   }
 7639: } {}
 7640: do_test boundary1-2.66.le.5 {
 7641:   db eval {
 7642:     SELECT a FROM t1 WHERE rowid <= -9.22337303685477580800e+18 ORDER BY x
 7643:   }
 7644: } {}
 7645: finish_test

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>