SQLite4
Artifact Content
Not logged in

Artifact f6c57ab66bf729fb7decf78096d8dfdfd489bab1:


# 2008 December 11
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file is automatically generated from a separate TCL script.
# This file seeks to exercise integer boundary values.
#
# $Id: boundary4.tcl,v 1.3 2009/01/02 15:45:48 shane Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Many of the boundary tests depend on a working 64-bit implementation.
if {![working_64bit_int]} { finish_test; return }
ifcapable !altertable     { finish_test; return }

do_test boundary4-1.1 {
  db eval {
    CREATE TABLE t1(oid PRIMARY KEY, a,x);
    INSERT INTO t1(oid,a,x) VALUES(-129,1,'ffffffffffffffffffffffffffffff7f');
    INSERT INTO t1(oid,a,x) VALUES(256,2,'0000000000000100');
    INSERT INTO t1(oid,a,x) VALUES(140737488355327,3,'00007fff7fffffffffff');
    INSERT INTO t1(oid,a,x) VALUES(-140737488355328,4,'ffffffffffff8000ffff800000000000');
    INSERT INTO t1(oid,a,x) VALUES(-549755813889,5,'ffffffffffffff7fffffff7fffffffff');
    INSERT INTO t1(oid,a,x) VALUES(4294967296,6,'00000001100000000');
    INSERT INTO t1(oid,a,x) VALUES(-549755813888,7,'ffffffffffffff80ffffff8000000000');
    INSERT INTO t1(oid,a,x) VALUES(32767,8,'0000000000007fff');
    INSERT INTO t1(oid,a,x) VALUES(576460752303423487,9,'07ffffff7ffffffffffffff');
    INSERT INTO t1(oid,a,x) VALUES(281474976710656,10,'000100001000000000000');
    INSERT INTO t1(oid,a,x) VALUES(72057594037927936,11,'01000000100000000000000');
    INSERT INTO t1(oid,a,x) VALUES(-576460752303423488,12,'fffffffff8000000f800000000000000');
    INSERT INTO t1(oid,a,x) VALUES(-32769,13,'ffffffffffffffffffffffffffff7fff');
    INSERT INTO t1(oid,a,x) VALUES(-36028797018963969,14,'ffffffffff7fffffff7fffffffffffff');
    INSERT INTO t1(oid,a,x) VALUES(1152921504606846975,15,'0ffffffffffffffffffffff');
    INSERT INTO t1(oid,a,x) VALUES(-8388608,16,'ffffffffffffffffffffffffff800000');
    INSERT INTO t1(oid,a,x) VALUES(1152921504606846976,17,'100000001000000000000000');
    INSERT INTO t1(oid,a,x) VALUES(36028797018963967,18,'007fffff7fffffffffffff');
    INSERT INTO t1(oid,a,x) VALUES(127,19,'000000000000007f');
    INSERT INTO t1(oid,a,x) VALUES(16777215,20,'0000000000ffffff');
    INSERT INTO t1(oid,a,x) VALUES(549755813888,21,'000000808000000000');
    INSERT INTO t1(oid,a,x) VALUES(4294967295,22,'00000000ffffffff');
    INSERT INTO t1(oid,a,x) VALUES(549755813887,23,'0000007f7fffffffff');
    INSERT INTO t1(oid,a,x) VALUES(8388607,24,'00000000007fffff');
    INSERT INTO t1(oid,a,x) VALUES(36028797018963968,25,'0080000080000000000000');
    INSERT INTO t1(oid,a,x) VALUES(2147483647,26,'000000007fffffff');
    INSERT INTO t1(oid,a,x) VALUES(-128,27,'ffffffffffffffffffffffffffffff80');
    INSERT INTO t1(oid,a,x) VALUES(1099511627776,28,'0000010010000000000');
    INSERT INTO t1(oid,a,x) VALUES(-8388609,29,'ffffffffffffffffffffffffff7fffff');
    INSERT INTO t1(oid,a,x) VALUES(128,30,'0000000000000080');
    INSERT INTO t1(oid,a,x) VALUES(576460752303423488,31,'08000000800000000000000');
    INSERT INTO t1(oid,a,x) VALUES(72057594037927935,32,'00ffffffffffffffffffff');
    INSERT INTO t1(oid,a,x) VALUES(-576460752303423489,33,'fffffffff7fffffff7ffffffffffffff');
    INSERT INTO t1(oid,a,x) VALUES(16777216,34,'0000000001000000');
    INSERT INTO t1(oid,a,x) VALUES(-2147483648,35,'ffffffffffffffffffffffff80000000');
    INSERT INTO t1(oid,a,x) VALUES(8388608,36,'0000000000800000');
    INSERT INTO t1(oid,a,x) VALUES(65535,37,'000000000000ffff');
    INSERT INTO t1(oid,a,x) VALUES(65536,38,'0000000000010000');
    INSERT INTO t1(oid,a,x) VALUES(281474976710655,39,'0000ffffffffffffffff');
    INSERT INTO t1(oid,a,x) VALUES(1099511627775,40,'000000ffffffffffff');
    INSERT INTO t1(oid,a,x) VALUES(-36028797018963968,41,'ffffffffff800000ff80000000000000');
    INSERT INTO t1(oid,a,x) VALUES(-140737488355329,42,'ffffffffffff7fffffff7fffffffffff');
    INSERT INTO t1(oid,a,x) VALUES(2147483648,43,'0000000080000000');
    INSERT INTO t1(oid,a,x) VALUES(32768,44,'0000000000008000');
    INSERT INTO t1(oid,a,x) VALUES(-32768,45,'ffffffffffffffffffffffffffff8000');
    INSERT INTO t1(oid,a,x) VALUES(-2147483649,46,'ffffffffffffffffffffffff7fffffff');
    INSERT INTO t1(oid,a,x) VALUES(140737488355328,47,'00008000800000000000');
    INSERT INTO t1(oid,a,x) VALUES(255,48,'00000000000000ff');
    CREATE INDEX t1i1 ON t1(a);
    CREATE INDEX t1i2 ON t1(x);
  }
} {}
do_test boundary4-1.2 {
  db eval {
    SELECT count(*) FROM t1
  }
} {48}
do_test boundary4-1.3 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY +oid
  }
} {-576460752303423489 33 fffffffff7fffffff7ffffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -2147483648 35 ffffffffffffffffffffffff80000000 -8388609 29 ffffffffffffffffffffffffff7fffff -8388608 16 ffffffffffffffffffffffffff800000 -32769 13 ffffffffffffffffffffffffffff7fff -32768 45 ffffffffffffffffffffffffffff8000 -129 1 ffffffffffffffffffffffffffffff7f -128 27 ffffffffffffffffffffffffffffff80 127 19 000000000000007f 128 30 0000000000000080 255 48 00000000000000ff 256 2 0000000000000100 32767 8 0000000000007fff 32768 44 0000000000008000 65535 37 000000000000ffff 65536 38 0000000000010000 8388607 24 00000000007fffff 8388608 36 0000000000800000 16777215 20 0000000000ffffff 16777216 34 0000000001000000 2147483647 26 000000007fffffff 2147483648 43 0000000080000000 4294967295 22 00000000ffffffff 4294967296 6 00000001100000000 549755813887 23 0000007f7fffffffff 549755813888 21 000000808000000000 1099511627775 40 000000ffffffffffff 1099511627776 28 0000010010000000000 140737488355327 3 00007fff7fffffffffff 140737488355328 47 00008000800000000000 281474976710655 39 0000ffffffffffffffff 281474976710656 10 000100001000000000000 36028797018963967 18 007fffff7fffffffffffff 36028797018963968 25 0080000080000000000000 72057594037927935 32 00ffffffffffffffffffff 72057594037927936 11 01000000100000000000000 576460752303423487 9 07ffffff7ffffffffffffff 576460752303423488 31 08000000800000000000000 1152921504606846975 15 0ffffffffffffffffffffff 1152921504606846976 17 100000001000000000000000}
do_test boundary4-1.4 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY oid
  }
} {-576460752303423489 33 fffffffff7fffffff7ffffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -2147483648 35 ffffffffffffffffffffffff80000000 -8388609 29 ffffffffffffffffffffffffff7fffff -8388608 16 ffffffffffffffffffffffffff800000 -32769 13 ffffffffffffffffffffffffffff7fff -32768 45 ffffffffffffffffffffffffffff8000 -129 1 ffffffffffffffffffffffffffffff7f -128 27 ffffffffffffffffffffffffffffff80 127 19 000000000000007f 128 30 0000000000000080 255 48 00000000000000ff 256 2 0000000000000100 32767 8 0000000000007fff 32768 44 0000000000008000 65535 37 000000000000ffff 65536 38 0000000000010000 8388607 24 00000000007fffff 8388608 36 0000000000800000 16777215 20 0000000000ffffff 16777216 34 0000000001000000 2147483647 26 000000007fffffff 2147483648 43 0000000080000000 4294967295 22 00000000ffffffff 4294967296 6 00000001100000000 549755813887 23 0000007f7fffffffff 549755813888 21 000000808000000000 1099511627775 40 000000ffffffffffff 1099511627776 28 0000010010000000000 140737488355327 3 00007fff7fffffffffff 140737488355328 47 00008000800000000000 281474976710655 39 0000ffffffffffffffff 281474976710656 10 000100001000000000000 36028797018963967 18 007fffff7fffffffffffff 36028797018963968 25 0080000080000000000000 72057594037927935 32 00ffffffffffffffffffff 72057594037927936 11 01000000100000000000000 576460752303423487 9 07ffffff7ffffffffffffff 576460752303423488 31 08000000800000000000000 1152921504606846975 15 0ffffffffffffffffffffff 1152921504606846976 17 100000001000000000000000}
do_test boundary4-1.5 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY +oid DESC
  }
} {1152921504606846976 17 100000001000000000000000 1152921504606846975 15 0ffffffffffffffffffffff 576460752303423488 31 08000000800000000000000 576460752303423487 9 07ffffff7ffffffffffffff 72057594037927936 11 01000000100000000000000 72057594037927935 32 00ffffffffffffffffffff 36028797018963968 25 0080000080000000000000 36028797018963967 18 007fffff7fffffffffffff 281474976710656 10 000100001000000000000 281474976710655 39 0000ffffffffffffffff 140737488355328 47 00008000800000000000 140737488355327 3 00007fff7fffffffffff 1099511627776 28 0000010010000000000 1099511627775 40 000000ffffffffffff 549755813888 21 000000808000000000 549755813887 23 0000007f7fffffffff 4294967296 6 00000001100000000 4294967295 22 00000000ffffffff 2147483648 43 0000000080000000 2147483647 26 000000007fffffff 16777216 34 0000000001000000 16777215 20 0000000000ffffff 8388608 36 0000000000800000 8388607 24 00000000007fffff 65536 38 0000000000010000 65535 37 000000000000ffff 32768 44 0000000000008000 32767 8 0000000000007fff 256 2 0000000000000100 255 48 00000000000000ff 128 30 0000000000000080 127 19 000000000000007f -128 27 ffffffffffffffffffffffffffffff80 -129 1 ffffffffffffffffffffffffffffff7f -32768 45 ffffffffffffffffffffffffffff8000 -32769 13 ffffffffffffffffffffffffffff7fff -8388608 16 ffffffffffffffffffffffffff800000 -8388609 29 ffffffffffffffffffffffffff7fffff -2147483648 35 ffffffffffffffffffffffff80000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff}
do_test boundary4-1.6 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY oid DESC
  }
} {1152921504606846976 17 100000001000000000000000 1152921504606846975 15 0ffffffffffffffffffffff 576460752303423488 31 08000000800000000000000 576460752303423487 9 07ffffff7ffffffffffffff 72057594037927936 11 01000000100000000000000 72057594037927935 32 00ffffffffffffffffffff 36028797018963968 25 0080000080000000000000 36028797018963967 18 007fffff7fffffffffffff 281474976710656 10 000100001000000000000 281474976710655 39 0000ffffffffffffffff 140737488355328 47 00008000800000000000 140737488355327 3 00007fff7fffffffffff 1099511627776 28 0000010010000000000 1099511627775 40 000000ffffffffffff 549755813888 21 000000808000000000 549755813887 23 0000007f7fffffffff 4294967296 6 00000001100000000 4294967295 22 00000000ffffffff 2147483648 43 0000000080000000 2147483647 26 000000007fffffff 16777216 34 0000000001000000 16777215 20 0000000000ffffff 8388608 36 0000000000800000 8388607 24 00000000007fffff 65536 38 0000000000010000 65535 37 000000000000ffff 32768 44 0000000000008000 32767 8 0000000000007fff 256 2 0000000000000100 255 48 00000000000000ff 128 30 0000000000000080 127 19 000000000000007f -128 27 ffffffffffffffffffffffffffffff80 -129 1 ffffffffffffffffffffffffffffff7f -32768 45 ffffffffffffffffffffffffffff8000 -32769 13 ffffffffffffffffffffffffffff7fff -8388608 16 ffffffffffffffffffffffffff800000 -8388609 29 ffffffffffffffffffffffffff7fffff -2147483648 35 ffffffffffffffffffffffff80000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff}
do_test boundary4-1.7 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY +a
  }
} {-129 1 ffffffffffffffffffffffffffffff7f 256 2 0000000000000100 140737488355327 3 00007fff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff 4294967296 6 00000001100000000 -549755813888 7 ffffffffffffff80ffffff8000000000 32767 8 0000000000007fff 576460752303423487 9 07ffffff7ffffffffffffff 281474976710656 10 000100001000000000000 72057594037927936 11 01000000100000000000000 -576460752303423488 12 fffffffff8000000f800000000000000 -32769 13 ffffffffffffffffffffffffffff7fff -36028797018963969 14 ffffffffff7fffffff7fffffffffffff 1152921504606846975 15 0ffffffffffffffffffffff -8388608 16 ffffffffffffffffffffffffff800000 1152921504606846976 17 100000001000000000000000 36028797018963967 18 007fffff7fffffffffffff 127 19 000000000000007f 16777215 20 0000000000ffffff 549755813888 21 000000808000000000 4294967295 22 00000000ffffffff 549755813887 23 0000007f7fffffffff 8388607 24 00000000007fffff 36028797018963968 25 0080000080000000000000 2147483647 26 000000007fffffff -128 27 ffffffffffffffffffffffffffffff80 1099511627776 28 0000010010000000000 -8388609 29 ffffffffffffffffffffffffff7fffff 128 30 0000000000000080 576460752303423488 31 08000000800000000000000 72057594037927935 32 00ffffffffffffffffffff -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 16777216 34 0000000001000000 -2147483648 35 ffffffffffffffffffffffff80000000 8388608 36 0000000000800000 65535 37 000000000000ffff 65536 38 0000000000010000 281474976710655 39 0000ffffffffffffffff 1099511627775 40 000000ffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff 2147483648 43 0000000080000000 32768 44 0000000000008000 -32768 45 ffffffffffffffffffffffffffff8000 -2147483649 46 ffffffffffffffffffffffff7fffffff 140737488355328 47 00008000800000000000 255 48 00000000000000ff}
do_test boundary4-1.8 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY a
  }
} {-129 1 ffffffffffffffffffffffffffffff7f 256 2 0000000000000100 140737488355327 3 00007fff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff 4294967296 6 00000001100000000 -549755813888 7 ffffffffffffff80ffffff8000000000 32767 8 0000000000007fff 576460752303423487 9 07ffffff7ffffffffffffff 281474976710656 10 000100001000000000000 72057594037927936 11 01000000100000000000000 -576460752303423488 12 fffffffff8000000f800000000000000 -32769 13 ffffffffffffffffffffffffffff7fff -36028797018963969 14 ffffffffff7fffffff7fffffffffffff 1152921504606846975 15 0ffffffffffffffffffffff -8388608 16 ffffffffffffffffffffffffff800000 1152921504606846976 17 100000001000000000000000 36028797018963967 18 007fffff7fffffffffffff 127 19 000000000000007f 16777215 20 0000000000ffffff 549755813888 21 000000808000000000 4294967295 22 00000000ffffffff 549755813887 23 0000007f7fffffffff 8388607 24 00000000007fffff 36028797018963968 25 0080000080000000000000 2147483647 26 000000007fffffff -128 27 ffffffffffffffffffffffffffffff80 1099511627776 28 0000010010000000000 -8388609 29 ffffffffffffffffffffffffff7fffff 128 30 0000000000000080 576460752303423488 31 08000000800000000000000 72057594037927935 32 00ffffffffffffffffffff -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 16777216 34 0000000001000000 -2147483648 35 ffffffffffffffffffffffff80000000 8388608 36 0000000000800000 65535 37 000000000000ffff 65536 38 0000000000010000 281474976710655 39 0000ffffffffffffffff 1099511627775 40 000000ffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff 2147483648 43 0000000080000000 32768 44 0000000000008000 -32768 45 ffffffffffffffffffffffffffff8000 -2147483649 46 ffffffffffffffffffffffff7fffffff 140737488355328 47 00008000800000000000 255 48 00000000000000ff}
do_test boundary4-1.9 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY +a DESC
  }
} {255 48 00000000000000ff 140737488355328 47 00008000800000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -32768 45 ffffffffffffffffffffffffffff8000 32768 44 0000000000008000 2147483648 43 0000000080000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 1099511627775 40 000000ffffffffffff 281474976710655 39 0000ffffffffffffffff 65536 38 0000000000010000 65535 37 000000000000ffff 8388608 36 0000000000800000 -2147483648 35 ffffffffffffffffffffffff80000000 16777216 34 0000000001000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 72057594037927935 32 00ffffffffffffffffffff 576460752303423488 31 08000000800000000000000 128 30 0000000000000080 -8388609 29 ffffffffffffffffffffffffff7fffff 1099511627776 28 0000010010000000000 -128 27 ffffffffffffffffffffffffffffff80 2147483647 26 000000007fffffff 36028797018963968 25 0080000080000000000000 8388607 24 00000000007fffff 549755813887 23 0000007f7fffffffff 4294967295 22 00000000ffffffff 549755813888 21 000000808000000000 16777215 20 0000000000ffffff 127 19 000000000000007f 36028797018963967 18 007fffff7fffffffffffff 1152921504606846976 17 100000001000000000000000 -8388608 16 ffffffffffffffffffffffffff800000 1152921504606846975 15 0ffffffffffffffffffffff -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -32769 13 ffffffffffffffffffffffffffff7fff -576460752303423488 12 fffffffff8000000f800000000000000 72057594037927936 11 01000000100000000000000 281474976710656 10 000100001000000000000 576460752303423487 9 07ffffff7ffffffffffffff 32767 8 0000000000007fff -549755813888 7 ffffffffffffff80ffffff8000000000 4294967296 6 00000001100000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 140737488355327 3 00007fff7fffffffffff 256 2 0000000000000100 -129 1 ffffffffffffffffffffffffffffff7f}
do_test boundary4-1.10 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY a DESC
  }
} {255 48 00000000000000ff 140737488355328 47 00008000800000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -32768 45 ffffffffffffffffffffffffffff8000 32768 44 0000000000008000 2147483648 43 0000000080000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 1099511627775 40 000000ffffffffffff 281474976710655 39 0000ffffffffffffffff 65536 38 0000000000010000 65535 37 000000000000ffff 8388608 36 0000000000800000 -2147483648 35 ffffffffffffffffffffffff80000000 16777216 34 0000000001000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 72057594037927935 32 00ffffffffffffffffffff 576460752303423488 31 08000000800000000000000 128 30 0000000000000080 -8388609 29 ffffffffffffffffffffffffff7fffff 1099511627776 28 0000010010000000000 -128 27 ffffffffffffffffffffffffffffff80 2147483647 26 000000007fffffff 36028797018963968 25 0080000080000000000000 8388607 24 00000000007fffff 549755813887 23 0000007f7fffffffff 4294967295 22 00000000ffffffff 549755813888 21 000000808000000000 16777215 20 0000000000ffffff 127 19 000000000000007f 36028797018963967 18 007fffff7fffffffffffff 1152921504606846976 17 100000001000000000000000 -8388608 16 ffffffffffffffffffffffffff800000 1152921504606846975 15 0ffffffffffffffffffffff -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -32769 13 ffffffffffffffffffffffffffff7fff -576460752303423488 12 fffffffff8000000f800000000000000 72057594037927936 11 01000000100000000000000 281474976710656 10 000100001000000000000 576460752303423487 9 07ffffff7ffffffffffffff 32767 8 0000000000007fff -549755813888 7 ffffffffffffff80ffffff8000000000 4294967296 6 00000001100000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 140737488355327 3 00007fff7fffffffffff 256 2 0000000000000100 -129 1 ffffffffffffffffffffffffffffff7f}
do_test boundary4-1.11 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY +x
  }
} {127 19 000000000000007f 128 30 0000000000000080 255 48 00000000000000ff 256 2 0000000000000100 32767 8 0000000000007fff 32768 44 0000000000008000 65535 37 000000000000ffff 65536 38 0000000000010000 8388607 24 00000000007fffff 8388608 36 0000000000800000 16777215 20 0000000000ffffff 16777216 34 0000000001000000 2147483647 26 000000007fffffff 2147483648 43 0000000080000000 4294967295 22 00000000ffffffff 4294967296 6 00000001100000000 549755813887 23 0000007f7fffffffff 549755813888 21 000000808000000000 1099511627775 40 000000ffffffffffff 1099511627776 28 0000010010000000000 140737488355327 3 00007fff7fffffffffff 140737488355328 47 00008000800000000000 281474976710655 39 0000ffffffffffffffff 281474976710656 10 000100001000000000000 36028797018963967 18 007fffff7fffffffffffff 36028797018963968 25 0080000080000000000000 72057594037927935 32 00ffffffffffffffffffff 72057594037927936 11 01000000100000000000000 576460752303423487 9 07ffffff7ffffffffffffff 576460752303423488 31 08000000800000000000000 1152921504606846975 15 0ffffffffffffffffffffff 1152921504606846976 17 100000001000000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -2147483648 35 ffffffffffffffffffffffff80000000 -8388609 29 ffffffffffffffffffffffffff7fffff -8388608 16 ffffffffffffffffffffffffff800000 -32769 13 ffffffffffffffffffffffffffff7fff -32768 45 ffffffffffffffffffffffffffff8000 -129 1 ffffffffffffffffffffffffffffff7f -128 27 ffffffffffffffffffffffffffffff80}
do_test boundary4-1.12 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY x
  }
} {127 19 000000000000007f 128 30 0000000000000080 255 48 00000000000000ff 256 2 0000000000000100 32767 8 0000000000007fff 32768 44 0000000000008000 65535 37 000000000000ffff 65536 38 0000000000010000 8388607 24 00000000007fffff 8388608 36 0000000000800000 16777215 20 0000000000ffffff 16777216 34 0000000001000000 2147483647 26 000000007fffffff 2147483648 43 0000000080000000 4294967295 22 00000000ffffffff 4294967296 6 00000001100000000 549755813887 23 0000007f7fffffffff 549755813888 21 000000808000000000 1099511627775 40 000000ffffffffffff 1099511627776 28 0000010010000000000 140737488355327 3 00007fff7fffffffffff 140737488355328 47 00008000800000000000 281474976710655 39 0000ffffffffffffffff 281474976710656 10 000100001000000000000 36028797018963967 18 007fffff7fffffffffffff 36028797018963968 25 0080000080000000000000 72057594037927935 32 00ffffffffffffffffffff 72057594037927936 11 01000000100000000000000 576460752303423487 9 07ffffff7ffffffffffffff 576460752303423488 31 08000000800000000000000 1152921504606846975 15 0ffffffffffffffffffffff 1152921504606846976 17 100000001000000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -2147483648 35 ffffffffffffffffffffffff80000000 -8388609 29 ffffffffffffffffffffffffff7fffff -8388608 16 ffffffffffffffffffffffffff800000 -32769 13 ffffffffffffffffffffffffffff7fff -32768 45 ffffffffffffffffffffffffffff8000 -129 1 ffffffffffffffffffffffffffffff7f -128 27 ffffffffffffffffffffffffffffff80}
do_test boundary4-1.13 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY +x DESC
  }
} {-128 27 ffffffffffffffffffffffffffffff80 -129 1 ffffffffffffffffffffffffffffff7f -32768 45 ffffffffffffffffffffffffffff8000 -32769 13 ffffffffffffffffffffffffffff7fff -8388608 16 ffffffffffffffffffffffffff800000 -8388609 29 ffffffffffffffffffffffffff7fffff -2147483648 35 ffffffffffffffffffffffff80000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 1152921504606846976 17 100000001000000000000000 1152921504606846975 15 0ffffffffffffffffffffff 576460752303423488 31 08000000800000000000000 576460752303423487 9 07ffffff7ffffffffffffff 72057594037927936 11 01000000100000000000000 72057594037927935 32 00ffffffffffffffffffff 36028797018963968 25 0080000080000000000000 36028797018963967 18 007fffff7fffffffffffff 281474976710656 10 000100001000000000000 281474976710655 39 0000ffffffffffffffff 140737488355328 47 00008000800000000000 140737488355327 3 00007fff7fffffffffff 1099511627776 28 0000010010000000000 1099511627775 40 000000ffffffffffff 549755813888 21 000000808000000000 549755813887 23 0000007f7fffffffff 4294967296 6 00000001100000000 4294967295 22 00000000ffffffff 2147483648 43 0000000080000000 2147483647 26 000000007fffffff 16777216 34 0000000001000000 16777215 20 0000000000ffffff 8388608 36 0000000000800000 8388607 24 00000000007fffff 65536 38 0000000000010000 65535 37 000000000000ffff 32768 44 0000000000008000 32767 8 0000000000007fff 256 2 0000000000000100 255 48 00000000000000ff 128 30 0000000000000080 127 19 000000000000007f}
do_test boundary4-1.14 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY x DESC
  }
} {-128 27 ffffffffffffffffffffffffffffff80 -129 1 ffffffffffffffffffffffffffffff7f -32768 45 ffffffffffffffffffffffffffff8000 -32769 13 ffffffffffffffffffffffffffff7fff -8388608 16 ffffffffffffffffffffffffff800000 -8388609 29 ffffffffffffffffffffffffff7fffff -2147483648 35 ffffffffffffffffffffffff80000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 1152921504606846976 17 100000001000000000000000 1152921504606846975 15 0ffffffffffffffffffffff 576460752303423488 31 08000000800000000000000 576460752303423487 9 07ffffff7ffffffffffffff 72057594037927936 11 01000000100000000000000 72057594037927935 32 00ffffffffffffffffffff 36028797018963968 25 0080000080000000000000 36028797018963967 18 007fffff7fffffffffffff 281474976710656 10 000100001000000000000 281474976710655 39 0000ffffffffffffffff 140737488355328 47 00008000800000000000 140737488355327 3 00007fff7fffffffffff 1099511627776 28 0000010010000000000 1099511627775 40 000000ffffffffffff 549755813888 21 000000808000000000 549755813887 23 0000007f7fffffffff 4294967296 6 00000001100000000 4294967295 22 00000000ffffffff 2147483648 43 0000000080000000 2147483647 26 000000007fffffff 16777216 34 0000000001000000 16777215 20 0000000000ffffff 8388608 36 0000000000800000 8388607 24 00000000007fffff 65536 38 0000000000010000 65535 37 000000000000ffff 32768 44 0000000000008000 32767 8 0000000000007fff 256 2 0000000000000100 255 48 00000000000000ff 128 30 0000000000000080 127 19 000000000000007f}
do_test boundary4-2.1 {
  db eval {
    UPDATE t1 SET oid=a, a=oid
  }
} {}
do_test boundary4-2.3 {
  db eval {
    SELECT a, oid, x FROM t1 ORDER BY +a
  }
} {-576460752303423489 33 fffffffff7fffffff7ffffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -2147483648 35 ffffffffffffffffffffffff80000000 -8388609 29 ffffffffffffffffffffffffff7fffff -8388608 16 ffffffffffffffffffffffffff800000 -32769 13 ffffffffffffffffffffffffffff7fff -32768 45 ffffffffffffffffffffffffffff8000 -129 1 ffffffffffffffffffffffffffffff7f -128 27 ffffffffffffffffffffffffffffff80 127 19 000000000000007f 128 30 0000000000000080 255 48 00000000000000ff 256 2 0000000000000100 32767 8 0000000000007fff 32768 44 0000000000008000 65535 37 000000000000ffff 65536 38 0000000000010000 8388607 24 00000000007fffff 8388608 36 0000000000800000 16777215 20 0000000000ffffff 16777216 34 0000000001000000 2147483647 26 000000007fffffff 2147483648 43 0000000080000000 4294967295 22 00000000ffffffff 4294967296 6 00000001100000000 549755813887 23 0000007f7fffffffff 549755813888 21 000000808000000000 1099511627775 40 000000ffffffffffff 1099511627776 28 0000010010000000000 140737488355327 3 00007fff7fffffffffff 140737488355328 47 00008000800000000000 281474976710655 39 0000ffffffffffffffff 281474976710656 10 000100001000000000000 36028797018963967 18 007fffff7fffffffffffff 36028797018963968 25 0080000080000000000000 72057594037927935 32 00ffffffffffffffffffff 72057594037927936 11 01000000100000000000000 576460752303423487 9 07ffffff7ffffffffffffff 576460752303423488 31 08000000800000000000000 1152921504606846975 15 0ffffffffffffffffffffff 1152921504606846976 17 100000001000000000000000}
do_test boundary4-2.4 {
  db eval {
    SELECT a, oid, x FROM t1 ORDER BY a
  }
} {-576460752303423489 33 fffffffff7fffffff7ffffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -2147483648 35 ffffffffffffffffffffffff80000000 -8388609 29 ffffffffffffffffffffffffff7fffff -8388608 16 ffffffffffffffffffffffffff800000 -32769 13 ffffffffffffffffffffffffffff7fff -32768 45 ffffffffffffffffffffffffffff8000 -129 1 ffffffffffffffffffffffffffffff7f -128 27 ffffffffffffffffffffffffffffff80 127 19 000000000000007f 128 30 0000000000000080 255 48 00000000000000ff 256 2 0000000000000100 32767 8 0000000000007fff 32768 44 0000000000008000 65535 37 000000000000ffff 65536 38 0000000000010000 8388607 24 00000000007fffff 8388608 36 0000000000800000 16777215 20 0000000000ffffff 16777216 34 0000000001000000 2147483647 26 000000007fffffff 2147483648 43 0000000080000000 4294967295 22 00000000ffffffff 4294967296 6 00000001100000000 549755813887 23 0000007f7fffffffff 549755813888 21 000000808000000000 1099511627775 40 000000ffffffffffff 1099511627776 28 0000010010000000000 140737488355327 3 00007fff7fffffffffff 140737488355328 47 00008000800000000000 281474976710655 39 0000ffffffffffffffff 281474976710656 10 000100001000000000000 36028797018963967 18 007fffff7fffffffffffff 36028797018963968 25 0080000080000000000000 72057594037927935 32 00ffffffffffffffffffff 72057594037927936 11 01000000100000000000000 576460752303423487 9 07ffffff7ffffffffffffff 576460752303423488 31 08000000800000000000000 1152921504606846975 15 0ffffffffffffffffffffff 1152921504606846976 17 100000001000000000000000}
do_test boundary4-2.5 {
  db eval {
    SELECT a, oid, x FROM t1 ORDER BY +a DESC
  }
} {1152921504606846976 17 100000001000000000000000 1152921504606846975 15 0ffffffffffffffffffffff 576460752303423488 31 08000000800000000000000 576460752303423487 9 07ffffff7ffffffffffffff 72057594037927936 11 01000000100000000000000 72057594037927935 32 00ffffffffffffffffffff 36028797018963968 25 0080000080000000000000 36028797018963967 18 007fffff7fffffffffffff 281474976710656 10 000100001000000000000 281474976710655 39 0000ffffffffffffffff 140737488355328 47 00008000800000000000 140737488355327 3 00007fff7fffffffffff 1099511627776 28 0000010010000000000 1099511627775 40 000000ffffffffffff 549755813888 21 000000808000000000 549755813887 23 0000007f7fffffffff 4294967296 6 00000001100000000 4294967295 22 00000000ffffffff 2147483648 43 0000000080000000 2147483647 26 000000007fffffff 16777216 34 0000000001000000 16777215 20 0000000000ffffff 8388608 36 0000000000800000 8388607 24 00000000007fffff 65536 38 0000000000010000 65535 37 000000000000ffff 32768 44 0000000000008000 32767 8 0000000000007fff 256 2 0000000000000100 255 48 00000000000000ff 128 30 0000000000000080 127 19 000000000000007f -128 27 ffffffffffffffffffffffffffffff80 -129 1 ffffffffffffffffffffffffffffff7f -32768 45 ffffffffffffffffffffffffffff8000 -32769 13 ffffffffffffffffffffffffffff7fff -8388608 16 ffffffffffffffffffffffffff800000 -8388609 29 ffffffffffffffffffffffffff7fffff -2147483648 35 ffffffffffffffffffffffff80000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff}
do_test boundary4-2.6 {
  db eval {
    SELECT a, oid, x FROM t1 ORDER BY a DESC
  }
} {1152921504606846976 17 100000001000000000000000 1152921504606846975 15 0ffffffffffffffffffffff 576460752303423488 31 08000000800000000000000 576460752303423487 9 07ffffff7ffffffffffffff 72057594037927936 11 01000000100000000000000 72057594037927935 32 00ffffffffffffffffffff 36028797018963968 25 0080000080000000000000 36028797018963967 18 007fffff7fffffffffffff 281474976710656 10 000100001000000000000 281474976710655 39 0000ffffffffffffffff 140737488355328 47 00008000800000000000 140737488355327 3 00007fff7fffffffffff 1099511627776 28 0000010010000000000 1099511627775 40 000000ffffffffffff 549755813888 21 000000808000000000 549755813887 23 0000007f7fffffffff 4294967296 6 00000001100000000 4294967295 22 00000000ffffffff 2147483648 43 0000000080000000 2147483647 26 000000007fffffff 16777216 34 0000000001000000 16777215 20 0000000000ffffff 8388608 36 0000000000800000 8388607 24 00000000007fffff 65536 38 0000000000010000 65535 37 000000000000ffff 32768 44 0000000000008000 32767 8 0000000000007fff 256 2 0000000000000100 255 48 00000000000000ff 128 30 0000000000000080 127 19 000000000000007f -128 27 ffffffffffffffffffffffffffffff80 -129 1 ffffffffffffffffffffffffffffff7f -32768 45 ffffffffffffffffffffffffffff8000 -32769 13 ffffffffffffffffffffffffffff7fff -8388608 16 ffffffffffffffffffffffffff800000 -8388609 29 ffffffffffffffffffffffffff7fffff -2147483648 35 ffffffffffffffffffffffff80000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff}
do_test boundary4-2.7 {
  db eval {
    SELECT a, oid, x FROM t1 ORDER BY +oid
  }
} {-129 1 ffffffffffffffffffffffffffffff7f 256 2 0000000000000100 140737488355327 3 00007fff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff 4294967296 6 00000001100000000 -549755813888 7 ffffffffffffff80ffffff8000000000 32767 8 0000000000007fff 576460752303423487 9 07ffffff7ffffffffffffff 281474976710656 10 000100001000000000000 72057594037927936 11 01000000100000000000000 -576460752303423488 12 fffffffff8000000f800000000000000 -32769 13 ffffffffffffffffffffffffffff7fff -36028797018963969 14 ffffffffff7fffffff7fffffffffffff 1152921504606846975 15 0ffffffffffffffffffffff -8388608 16 ffffffffffffffffffffffffff800000 1152921504606846976 17 100000001000000000000000 36028797018963967 18 007fffff7fffffffffffff 127 19 000000000000007f 16777215 20 0000000000ffffff 549755813888 21 000000808000000000 4294967295 22 00000000ffffffff 549755813887 23 0000007f7fffffffff 8388607 24 00000000007fffff 36028797018963968 25 0080000080000000000000 2147483647 26 000000007fffffff -128 27 ffffffffffffffffffffffffffffff80 1099511627776 28 0000010010000000000 -8388609 29 ffffffffffffffffffffffffff7fffff 128 30 0000000000000080 576460752303423488 31 08000000800000000000000 72057594037927935 32 00ffffffffffffffffffff -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 16777216 34 0000000001000000 -2147483648 35 ffffffffffffffffffffffff80000000 8388608 36 0000000000800000 65535 37 000000000000ffff 65536 38 0000000000010000 281474976710655 39 0000ffffffffffffffff 1099511627775 40 000000ffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff 2147483648 43 0000000080000000 32768 44 0000000000008000 -32768 45 ffffffffffffffffffffffffffff8000 -2147483649 46 ffffffffffffffffffffffff7fffffff 140737488355328 47 00008000800000000000 255 48 00000000000000ff}
do_test boundary4-2.8 {
  db eval {
    SELECT a, oid, x FROM t1 ORDER BY oid
  }
} {-129 1 ffffffffffffffffffffffffffffff7f 256 2 0000000000000100 140737488355327 3 00007fff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff 4294967296 6 00000001100000000 -549755813888 7 ffffffffffffff80ffffff8000000000 32767 8 0000000000007fff 576460752303423487 9 07ffffff7ffffffffffffff 281474976710656 10 000100001000000000000 72057594037927936 11 01000000100000000000000 -576460752303423488 12 fffffffff8000000f800000000000000 -32769 13 ffffffffffffffffffffffffffff7fff -36028797018963969 14 ffffffffff7fffffff7fffffffffffff 1152921504606846975 15 0ffffffffffffffffffffff -8388608 16 ffffffffffffffffffffffffff800000 1152921504606846976 17 100000001000000000000000 36028797018963967 18 007fffff7fffffffffffff 127 19 000000000000007f 16777215 20 0000000000ffffff 549755813888 21 000000808000000000 4294967295 22 00000000ffffffff 549755813887 23 0000007f7fffffffff 8388607 24 00000000007fffff 36028797018963968 25 0080000080000000000000 2147483647 26 000000007fffffff -128 27 ffffffffffffffffffffffffffffff80 1099511627776 28 0000010010000000000 -8388609 29 ffffffffffffffffffffffffff7fffff 128 30 0000000000000080 576460752303423488 31 08000000800000000000000 72057594037927935 32 00ffffffffffffffffffff -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 16777216 34 0000000001000000 -2147483648 35 ffffffffffffffffffffffff80000000 8388608 36 0000000000800000 65535 37 000000000000ffff 65536 38 0000000000010000 281474976710655 39 0000ffffffffffffffff 1099511627775 40 000000ffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff 2147483648 43 0000000080000000 32768 44 0000000000008000 -32768 45 ffffffffffffffffffffffffffff8000 -2147483649 46 ffffffffffffffffffffffff7fffffff 140737488355328 47 00008000800000000000 255 48 00000000000000ff}
do_test boundary4-2.9 {
  db eval {
    SELECT a, oid, x FROM t1 ORDER BY +oid DESC
  }
} {255 48 00000000000000ff 140737488355328 47 00008000800000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -32768 45 ffffffffffffffffffffffffffff8000 32768 44 0000000000008000 2147483648 43 0000000080000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 1099511627775 40 000000ffffffffffff 281474976710655 39 0000ffffffffffffffff 65536 38 0000000000010000 65535 37 000000000000ffff 8388608 36 0000000000800000 -2147483648 35 ffffffffffffffffffffffff80000000 16777216 34 0000000001000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 72057594037927935 32 00ffffffffffffffffffff 576460752303423488 31 08000000800000000000000 128 30 0000000000000080 -8388609 29 ffffffffffffffffffffffffff7fffff 1099511627776 28 0000010010000000000 -128 27 ffffffffffffffffffffffffffffff80 2147483647 26 000000007fffffff 36028797018963968 25 0080000080000000000000 8388607 24 00000000007fffff 549755813887 23 0000007f7fffffffff 4294967295 22 00000000ffffffff 549755813888 21 000000808000000000 16777215 20 0000000000ffffff 127 19 000000000000007f 36028797018963967 18 007fffff7fffffffffffff 1152921504606846976 17 100000001000000000000000 -8388608 16 ffffffffffffffffffffffffff800000 1152921504606846975 15 0ffffffffffffffffffffff -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -32769 13 ffffffffffffffffffffffffffff7fff -576460752303423488 12 fffffffff8000000f800000000000000 72057594037927936 11 01000000100000000000000 281474976710656 10 000100001000000000000 576460752303423487 9 07ffffff7ffffffffffffff 32767 8 0000000000007fff -549755813888 7 ffffffffffffff80ffffff8000000000 4294967296 6 00000001100000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 140737488355327 3 00007fff7fffffffffff 256 2 0000000000000100 -129 1 ffffffffffffffffffffffffffffff7f}
do_test boundary4-2.10 {
  db eval {
    SELECT a, oid, x FROM t1 ORDER BY oid DESC
  }
} {255 48 00000000000000ff 140737488355328 47 00008000800000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -32768 45 ffffffffffffffffffffffffffff8000 32768 44 0000000000008000 2147483648 43 0000000080000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 1099511627775 40 000000ffffffffffff 281474976710655 39 0000ffffffffffffffff 65536 38 0000000000010000 65535 37 000000000000ffff 8388608 36 0000000000800000 -2147483648 35 ffffffffffffffffffffffff80000000 16777216 34 0000000001000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 72057594037927935 32 00ffffffffffffffffffff 576460752303423488 31 08000000800000000000000 128 30 0000000000000080 -8388609 29 ffffffffffffffffffffffffff7fffff 1099511627776 28 0000010010000000000 -128 27 ffffffffffffffffffffffffffffff80 2147483647 26 000000007fffffff 36028797018963968 25 0080000080000000000000 8388607 24 00000000007fffff 549755813887 23 0000007f7fffffffff 4294967295 22 00000000ffffffff 549755813888 21 000000808000000000 16777215 20 0000000000ffffff 127 19 000000000000007f 36028797018963967 18 007fffff7fffffffffffff 1152921504606846976 17 100000001000000000000000 -8388608 16 ffffffffffffffffffffffffff800000 1152921504606846975 15 0ffffffffffffffffffffff -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -32769 13 ffffffffffffffffffffffffffff7fff -576460752303423488 12 fffffffff8000000f800000000000000 72057594037927936 11 01000000100000000000000 281474976710656 10 000100001000000000000 576460752303423487 9 07ffffff7ffffffffffffff 32767 8 0000000000007fff -549755813888 7 ffffffffffffff80ffffff8000000000 4294967296 6 00000001100000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 140737488355327 3 00007fff7fffffffffff 256 2 0000000000000100 -129 1 ffffffffffffffffffffffffffffff7f}
do_test boundary4-2.11 {
  db eval {
    SELECT a, oid, x FROM t1 ORDER BY +x
  }
} {127 19 000000000000007f 128 30 0000000000000080 255 48 00000000000000ff 256 2 0000000000000100 32767 8 0000000000007fff 32768 44 0000000000008000 65535 37 000000000000ffff 65536 38 0000000000010000 8388607 24 00000000007fffff 8388608 36 0000000000800000 16777215 20 0000000000ffffff 16777216 34 0000000001000000 2147483647 26 000000007fffffff 2147483648 43 0000000080000000 4294967295 22 00000000ffffffff 4294967296 6 00000001100000000 549755813887 23 0000007f7fffffffff 549755813888 21 000000808000000000 1099511627775 40 000000ffffffffffff 1099511627776 28 0000010010000000000 140737488355327 3 00007fff7fffffffffff 140737488355328 47 00008000800000000000 281474976710655 39 0000ffffffffffffffff 281474976710656 10 000100001000000000000 36028797018963967 18 007fffff7fffffffffffff 36028797018963968 25 0080000080000000000000 72057594037927935 32 00ffffffffffffffffffff 72057594037927936 11 01000000100000000000000 576460752303423487 9 07ffffff7ffffffffffffff 576460752303423488 31 08000000800000000000000 1152921504606846975 15 0ffffffffffffffffffffff 1152921504606846976 17 100000001000000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -2147483648 35 ffffffffffffffffffffffff80000000 -8388609 29 ffffffffffffffffffffffffff7fffff -8388608 16 ffffffffffffffffffffffffff800000 -32769 13 ffffffffffffffffffffffffffff7fff -32768 45 ffffffffffffffffffffffffffff8000 -129 1 ffffffffffffffffffffffffffffff7f -128 27 ffffffffffffffffffffffffffffff80}
do_test boundary4-2.12 {
  db eval {
    SELECT a, oid, x FROM t1 ORDER BY x
  }
} {127 19 000000000000007f 128 30 0000000000000080 255 48 00000000000000ff 256 2 0000000000000100 32767 8 0000000000007fff 32768 44 0000000000008000 65535 37 000000000000ffff 65536 38 0000000000010000 8388607 24 00000000007fffff 8388608 36 0000000000800000 16777215 20 0000000000ffffff 16777216 34 0000000001000000 2147483647 26 000000007fffffff 2147483648 43 0000000080000000 4294967295 22 00000000ffffffff 4294967296 6 00000001100000000 549755813887 23 0000007f7fffffffff 549755813888 21 000000808000000000 1099511627775 40 000000ffffffffffff 1099511627776 28 0000010010000000000 140737488355327 3 00007fff7fffffffffff 140737488355328 47 00008000800000000000 281474976710655 39 0000ffffffffffffffff 281474976710656 10 000100001000000000000 36028797018963967 18 007fffff7fffffffffffff 36028797018963968 25 0080000080000000000000 72057594037927935 32 00ffffffffffffffffffff 72057594037927936 11 01000000100000000000000 576460752303423487 9 07ffffff7ffffffffffffff 576460752303423488 31 08000000800000000000000 1152921504606846975 15 0ffffffffffffffffffffff 1152921504606846976 17 100000001000000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -2147483648 35 ffffffffffffffffffffffff80000000 -8388609 29 ffffffffffffffffffffffffff7fffff -8388608 16 ffffffffffffffffffffffffff800000 -32769 13 ffffffffffffffffffffffffffff7fff -32768 45 ffffffffffffffffffffffffffff8000 -129 1 ffffffffffffffffffffffffffffff7f -128 27 ffffffffffffffffffffffffffffff80}
do_test boundary4-2.13 {
  db eval {
    SELECT a, oid, x FROM t1 ORDER BY +x DESC
  }
} {-128 27 ffffffffffffffffffffffffffffff80 -129 1 ffffffffffffffffffffffffffffff7f -32768 45 ffffffffffffffffffffffffffff8000 -32769 13 ffffffffffffffffffffffffffff7fff -8388608 16 ffffffffffffffffffffffffff800000 -8388609 29 ffffffffffffffffffffffffff7fffff -2147483648 35 ffffffffffffffffffffffff80000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 1152921504606846976 17 100000001000000000000000 1152921504606846975 15 0ffffffffffffffffffffff 576460752303423488 31 08000000800000000000000 576460752303423487 9 07ffffff7ffffffffffffff 72057594037927936 11 01000000100000000000000 72057594037927935 32 00ffffffffffffffffffff 36028797018963968 25 0080000080000000000000 36028797018963967 18 007fffff7fffffffffffff 281474976710656 10 000100001000000000000 281474976710655 39 0000ffffffffffffffff 140737488355328 47 00008000800000000000 140737488355327 3 00007fff7fffffffffff 1099511627776 28 0000010010000000000 1099511627775 40 000000ffffffffffff 549755813888 21 000000808000000000 549755813887 23 0000007f7fffffffff 4294967296 6 00000001100000000 4294967295 22 00000000ffffffff 2147483648 43 0000000080000000 2147483647 26 000000007fffffff 16777216 34 0000000001000000 16777215 20 0000000000ffffff 8388608 36 0000000000800000 8388607 24 00000000007fffff 65536 38 0000000000010000 65535 37 000000000000ffff 32768 44 0000000000008000 32767 8 0000000000007fff 256 2 0000000000000100 255 48 00000000000000ff 128 30 0000000000000080 127 19 000000000000007f}
do_test boundary4-2.14 {
  db eval {
    SELECT a, oid, x FROM t1 ORDER BY x DESC
  }
} {-128 27 ffffffffffffffffffffffffffffff80 -129 1 ffffffffffffffffffffffffffffff7f -32768 45 ffffffffffffffffffffffffffff8000 -32769 13 ffffffffffffffffffffffffffff7fff -8388608 16 ffffffffffffffffffffffffff800000 -8388609 29 ffffffffffffffffffffffffff7fffff -2147483648 35 ffffffffffffffffffffffff80000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 1152921504606846976 17 100000001000000000000000 1152921504606846975 15 0ffffffffffffffffffffff 576460752303423488 31 08000000800000000000000 576460752303423487 9 07ffffff7ffffffffffffff 72057594037927936 11 01000000100000000000000 72057594037927935 32 00ffffffffffffffffffff 36028797018963968 25 0080000080000000000000 36028797018963967 18 007fffff7fffffffffffff 281474976710656 10 000100001000000000000 281474976710655 39 0000ffffffffffffffff 140737488355328 47 00008000800000000000 140737488355327 3 00007fff7fffffffffff 1099511627776 28 0000010010000000000 1099511627775 40 000000ffffffffffff 549755813888 21 000000808000000000 549755813887 23 0000007f7fffffffff 4294967296 6 00000001100000000 4294967295 22 00000000ffffffff 2147483648 43 0000000080000000 2147483647 26 000000007fffffff 16777216 34 0000000001000000 16777215 20 0000000000ffffff 8388608 36 0000000000800000 8388607 24 00000000007fffff 65536 38 0000000000010000 65535 37 000000000000ffff 32768 44 0000000000008000 32767 8 0000000000007fff 256 2 0000000000000100 255 48 00000000000000ff 128 30 0000000000000080 127 19 000000000000007f}
do_test boundary4-3.1 {
  db eval {
    UPDATE t1 SET oid=a, a=oid
  }
} {}
do_test boundary4-3.2 {
  db eval {
    ALTER TABLE t1 ADD COLUMN z; UPDATE t1 SET z=randomblob(600)
  }
} {}
do_test boundary4-3.3 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY +oid
  }
} {-576460752303423489 33 fffffffff7fffffff7ffffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -2147483648 35 ffffffffffffffffffffffff80000000 -8388609 29 ffffffffffffffffffffffffff7fffff -8388608 16 ffffffffffffffffffffffffff800000 -32769 13 ffffffffffffffffffffffffffff7fff -32768 45 ffffffffffffffffffffffffffff8000 -129 1 ffffffffffffffffffffffffffffff7f -128 27 ffffffffffffffffffffffffffffff80 127 19 000000000000007f 128 30 0000000000000080 255 48 00000000000000ff 256 2 0000000000000100 32767 8 0000000000007fff 32768 44 0000000000008000 65535 37 000000000000ffff 65536 38 0000000000010000 8388607 24 00000000007fffff 8388608 36 0000000000800000 16777215 20 0000000000ffffff 16777216 34 0000000001000000 2147483647 26 000000007fffffff 2147483648 43 0000000080000000 4294967295 22 00000000ffffffff 4294967296 6 00000001100000000 549755813887 23 0000007f7fffffffff 549755813888 21 000000808000000000 1099511627775 40 000000ffffffffffff 1099511627776 28 0000010010000000000 140737488355327 3 00007fff7fffffffffff 140737488355328 47 00008000800000000000 281474976710655 39 0000ffffffffffffffff 281474976710656 10 000100001000000000000 36028797018963967 18 007fffff7fffffffffffff 36028797018963968 25 0080000080000000000000 72057594037927935 32 00ffffffffffffffffffff 72057594037927936 11 01000000100000000000000 576460752303423487 9 07ffffff7ffffffffffffff 576460752303423488 31 08000000800000000000000 1152921504606846975 15 0ffffffffffffffffffffff 1152921504606846976 17 100000001000000000000000}
do_test boundary4-3.4 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY oid
  }
} {-576460752303423489 33 fffffffff7fffffff7ffffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -2147483648 35 ffffffffffffffffffffffff80000000 -8388609 29 ffffffffffffffffffffffffff7fffff -8388608 16 ffffffffffffffffffffffffff800000 -32769 13 ffffffffffffffffffffffffffff7fff -32768 45 ffffffffffffffffffffffffffff8000 -129 1 ffffffffffffffffffffffffffffff7f -128 27 ffffffffffffffffffffffffffffff80 127 19 000000000000007f 128 30 0000000000000080 255 48 00000000000000ff 256 2 0000000000000100 32767 8 0000000000007fff 32768 44 0000000000008000 65535 37 000000000000ffff 65536 38 0000000000010000 8388607 24 00000000007fffff 8388608 36 0000000000800000 16777215 20 0000000000ffffff 16777216 34 0000000001000000 2147483647 26 000000007fffffff 2147483648 43 0000000080000000 4294967295 22 00000000ffffffff 4294967296 6 00000001100000000 549755813887 23 0000007f7fffffffff 549755813888 21 000000808000000000 1099511627775 40 000000ffffffffffff 1099511627776 28 0000010010000000000 140737488355327 3 00007fff7fffffffffff 140737488355328 47 00008000800000000000 281474976710655 39 0000ffffffffffffffff 281474976710656 10 000100001000000000000 36028797018963967 18 007fffff7fffffffffffff 36028797018963968 25 0080000080000000000000 72057594037927935 32 00ffffffffffffffffffff 72057594037927936 11 01000000100000000000000 576460752303423487 9 07ffffff7ffffffffffffff 576460752303423488 31 08000000800000000000000 1152921504606846975 15 0ffffffffffffffffffffff 1152921504606846976 17 100000001000000000000000}
do_test boundary4-3.5 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY +oid DESC
  }
} {1152921504606846976 17 100000001000000000000000 1152921504606846975 15 0ffffffffffffffffffffff 576460752303423488 31 08000000800000000000000 576460752303423487 9 07ffffff7ffffffffffffff 72057594037927936 11 01000000100000000000000 72057594037927935 32 00ffffffffffffffffffff 36028797018963968 25 0080000080000000000000 36028797018963967 18 007fffff7fffffffffffff 281474976710656 10 000100001000000000000 281474976710655 39 0000ffffffffffffffff 140737488355328 47 00008000800000000000 140737488355327 3 00007fff7fffffffffff 1099511627776 28 0000010010000000000 1099511627775 40 000000ffffffffffff 549755813888 21 000000808000000000 549755813887 23 0000007f7fffffffff 4294967296 6 00000001100000000 4294967295 22 00000000ffffffff 2147483648 43 0000000080000000 2147483647 26 000000007fffffff 16777216 34 0000000001000000 16777215 20 0000000000ffffff 8388608 36 0000000000800000 8388607 24 00000000007fffff 65536 38 0000000000010000 65535 37 000000000000ffff 32768 44 0000000000008000 32767 8 0000000000007fff 256 2 0000000000000100 255 48 00000000000000ff 128 30 0000000000000080 127 19 000000000000007f -128 27 ffffffffffffffffffffffffffffff80 -129 1 ffffffffffffffffffffffffffffff7f -32768 45 ffffffffffffffffffffffffffff8000 -32769 13 ffffffffffffffffffffffffffff7fff -8388608 16 ffffffffffffffffffffffffff800000 -8388609 29 ffffffffffffffffffffffffff7fffff -2147483648 35 ffffffffffffffffffffffff80000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff}
do_test boundary4-3.6 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY oid DESC
  }
} {1152921504606846976 17 100000001000000000000000 1152921504606846975 15 0ffffffffffffffffffffff 576460752303423488 31 08000000800000000000000 576460752303423487 9 07ffffff7ffffffffffffff 72057594037927936 11 01000000100000000000000 72057594037927935 32 00ffffffffffffffffffff 36028797018963968 25 0080000080000000000000 36028797018963967 18 007fffff7fffffffffffff 281474976710656 10 000100001000000000000 281474976710655 39 0000ffffffffffffffff 140737488355328 47 00008000800000000000 140737488355327 3 00007fff7fffffffffff 1099511627776 28 0000010010000000000 1099511627775 40 000000ffffffffffff 549755813888 21 000000808000000000 549755813887 23 0000007f7fffffffff 4294967296 6 00000001100000000 4294967295 22 00000000ffffffff 2147483648 43 0000000080000000 2147483647 26 000000007fffffff 16777216 34 0000000001000000 16777215 20 0000000000ffffff 8388608 36 0000000000800000 8388607 24 00000000007fffff 65536 38 0000000000010000 65535 37 000000000000ffff 32768 44 0000000000008000 32767 8 0000000000007fff 256 2 0000000000000100 255 48 00000000000000ff 128 30 0000000000000080 127 19 000000000000007f -128 27 ffffffffffffffffffffffffffffff80 -129 1 ffffffffffffffffffffffffffffff7f -32768 45 ffffffffffffffffffffffffffff8000 -32769 13 ffffffffffffffffffffffffffff7fff -8388608 16 ffffffffffffffffffffffffff800000 -8388609 29 ffffffffffffffffffffffffff7fffff -2147483648 35 ffffffffffffffffffffffff80000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff}
do_test boundary4-3.7 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY +a
  }
} {-129 1 ffffffffffffffffffffffffffffff7f 256 2 0000000000000100 140737488355327 3 00007fff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff 4294967296 6 00000001100000000 -549755813888 7 ffffffffffffff80ffffff8000000000 32767 8 0000000000007fff 576460752303423487 9 07ffffff7ffffffffffffff 281474976710656 10 000100001000000000000 72057594037927936 11 01000000100000000000000 -576460752303423488 12 fffffffff8000000f800000000000000 -32769 13 ffffffffffffffffffffffffffff7fff -36028797018963969 14 ffffffffff7fffffff7fffffffffffff 1152921504606846975 15 0ffffffffffffffffffffff -8388608 16 ffffffffffffffffffffffffff800000 1152921504606846976 17 100000001000000000000000 36028797018963967 18 007fffff7fffffffffffff 127 19 000000000000007f 16777215 20 0000000000ffffff 549755813888 21 000000808000000000 4294967295 22 00000000ffffffff 549755813887 23 0000007f7fffffffff 8388607 24 00000000007fffff 36028797018963968 25 0080000080000000000000 2147483647 26 000000007fffffff -128 27 ffffffffffffffffffffffffffffff80 1099511627776 28 0000010010000000000 -8388609 29 ffffffffffffffffffffffffff7fffff 128 30 0000000000000080 576460752303423488 31 08000000800000000000000 72057594037927935 32 00ffffffffffffffffffff -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 16777216 34 0000000001000000 -2147483648 35 ffffffffffffffffffffffff80000000 8388608 36 0000000000800000 65535 37 000000000000ffff 65536 38 0000000000010000 281474976710655 39 0000ffffffffffffffff 1099511627775 40 000000ffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff 2147483648 43 0000000080000000 32768 44 0000000000008000 -32768 45 ffffffffffffffffffffffffffff8000 -2147483649 46 ffffffffffffffffffffffff7fffffff 140737488355328 47 00008000800000000000 255 48 00000000000000ff}
do_test boundary4-3.8 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY a
  }
} {-129 1 ffffffffffffffffffffffffffffff7f 256 2 0000000000000100 140737488355327 3 00007fff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff 4294967296 6 00000001100000000 -549755813888 7 ffffffffffffff80ffffff8000000000 32767 8 0000000000007fff 576460752303423487 9 07ffffff7ffffffffffffff 281474976710656 10 000100001000000000000 72057594037927936 11 01000000100000000000000 -576460752303423488 12 fffffffff8000000f800000000000000 -32769 13 ffffffffffffffffffffffffffff7fff -36028797018963969 14 ffffffffff7fffffff7fffffffffffff 1152921504606846975 15 0ffffffffffffffffffffff -8388608 16 ffffffffffffffffffffffffff800000 1152921504606846976 17 100000001000000000000000 36028797018963967 18 007fffff7fffffffffffff 127 19 000000000000007f 16777215 20 0000000000ffffff 549755813888 21 000000808000000000 4294967295 22 00000000ffffffff 549755813887 23 0000007f7fffffffff 8388607 24 00000000007fffff 36028797018963968 25 0080000080000000000000 2147483647 26 000000007fffffff -128 27 ffffffffffffffffffffffffffffff80 1099511627776 28 0000010010000000000 -8388609 29 ffffffffffffffffffffffffff7fffff 128 30 0000000000000080 576460752303423488 31 08000000800000000000000 72057594037927935 32 00ffffffffffffffffffff -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 16777216 34 0000000001000000 -2147483648 35 ffffffffffffffffffffffff80000000 8388608 36 0000000000800000 65535 37 000000000000ffff 65536 38 0000000000010000 281474976710655 39 0000ffffffffffffffff 1099511627775 40 000000ffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff 2147483648 43 0000000080000000 32768 44 0000000000008000 -32768 45 ffffffffffffffffffffffffffff8000 -2147483649 46 ffffffffffffffffffffffff7fffffff 140737488355328 47 00008000800000000000 255 48 00000000000000ff}
do_test boundary4-3.9 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY +a DESC
  }
} {255 48 00000000000000ff 140737488355328 47 00008000800000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -32768 45 ffffffffffffffffffffffffffff8000 32768 44 0000000000008000 2147483648 43 0000000080000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 1099511627775 40 000000ffffffffffff 281474976710655 39 0000ffffffffffffffff 65536 38 0000000000010000 65535 37 000000000000ffff 8388608 36 0000000000800000 -2147483648 35 ffffffffffffffffffffffff80000000 16777216 34 0000000001000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 72057594037927935 32 00ffffffffffffffffffff 576460752303423488 31 08000000800000000000000 128 30 0000000000000080 -8388609 29 ffffffffffffffffffffffffff7fffff 1099511627776 28 0000010010000000000 -128 27 ffffffffffffffffffffffffffffff80 2147483647 26 000000007fffffff 36028797018963968 25 0080000080000000000000 8388607 24 00000000007fffff 549755813887 23 0000007f7fffffffff 4294967295 22 00000000ffffffff 549755813888 21 000000808000000000 16777215 20 0000000000ffffff 127 19 000000000000007f 36028797018963967 18 007fffff7fffffffffffff 1152921504606846976 17 100000001000000000000000 -8388608 16 ffffffffffffffffffffffffff800000 1152921504606846975 15 0ffffffffffffffffffffff -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -32769 13 ffffffffffffffffffffffffffff7fff -576460752303423488 12 fffffffff8000000f800000000000000 72057594037927936 11 01000000100000000000000 281474976710656 10 000100001000000000000 576460752303423487 9 07ffffff7ffffffffffffff 32767 8 0000000000007fff -549755813888 7 ffffffffffffff80ffffff8000000000 4294967296 6 00000001100000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 140737488355327 3 00007fff7fffffffffff 256 2 0000000000000100 -129 1 ffffffffffffffffffffffffffffff7f}
do_test boundary4-3.10 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY a DESC
  }
} {255 48 00000000000000ff 140737488355328 47 00008000800000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -32768 45 ffffffffffffffffffffffffffff8000 32768 44 0000000000008000 2147483648 43 0000000080000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 1099511627775 40 000000ffffffffffff 281474976710655 39 0000ffffffffffffffff 65536 38 0000000000010000 65535 37 000000000000ffff 8388608 36 0000000000800000 -2147483648 35 ffffffffffffffffffffffff80000000 16777216 34 0000000001000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 72057594037927935 32 00ffffffffffffffffffff 576460752303423488 31 08000000800000000000000 128 30 0000000000000080 -8388609 29 ffffffffffffffffffffffffff7fffff 1099511627776 28 0000010010000000000 -128 27 ffffffffffffffffffffffffffffff80 2147483647 26 000000007fffffff 36028797018963968 25 0080000080000000000000 8388607 24 00000000007fffff 549755813887 23 0000007f7fffffffff 4294967295 22 00000000ffffffff 549755813888 21 000000808000000000 16777215 20 0000000000ffffff 127 19 000000000000007f 36028797018963967 18 007fffff7fffffffffffff 1152921504606846976 17 100000001000000000000000 -8388608 16 ffffffffffffffffffffffffff800000 1152921504606846975 15 0ffffffffffffffffffffff -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -32769 13 ffffffffffffffffffffffffffff7fff -576460752303423488 12 fffffffff8000000f800000000000000 72057594037927936 11 01000000100000000000000 281474976710656 10 000100001000000000000 576460752303423487 9 07ffffff7ffffffffffffff 32767 8 0000000000007fff -549755813888 7 ffffffffffffff80ffffff8000000000 4294967296 6 00000001100000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 140737488355327 3 00007fff7fffffffffff 256 2 0000000000000100 -129 1 ffffffffffffffffffffffffffffff7f}
do_test boundary4-3.11 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY +x
  }
} {127 19 000000000000007f 128 30 0000000000000080 255 48 00000000000000ff 256 2 0000000000000100 32767 8 0000000000007fff 32768 44 0000000000008000 65535 37 000000000000ffff 65536 38 0000000000010000 8388607 24 00000000007fffff 8388608 36 0000000000800000 16777215 20 0000000000ffffff 16777216 34 0000000001000000 2147483647 26 000000007fffffff 2147483648 43 0000000080000000 4294967295 22 00000000ffffffff 4294967296 6 00000001100000000 549755813887 23 0000007f7fffffffff 549755813888 21 000000808000000000 1099511627775 40 000000ffffffffffff 1099511627776 28 0000010010000000000 140737488355327 3 00007fff7fffffffffff 140737488355328 47 00008000800000000000 281474976710655 39 0000ffffffffffffffff 281474976710656 10 000100001000000000000 36028797018963967 18 007fffff7fffffffffffff 36028797018963968 25 0080000080000000000000 72057594037927935 32 00ffffffffffffffffffff 72057594037927936 11 01000000100000000000000 576460752303423487 9 07ffffff7ffffffffffffff 576460752303423488 31 08000000800000000000000 1152921504606846975 15 0ffffffffffffffffffffff 1152921504606846976 17 100000001000000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -2147483648 35 ffffffffffffffffffffffff80000000 -8388609 29 ffffffffffffffffffffffffff7fffff -8388608 16 ffffffffffffffffffffffffff800000 -32769 13 ffffffffffffffffffffffffffff7fff -32768 45 ffffffffffffffffffffffffffff8000 -129 1 ffffffffffffffffffffffffffffff7f -128 27 ffffffffffffffffffffffffffffff80}
do_test boundary4-3.12 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY x
  }
} {127 19 000000000000007f 128 30 0000000000000080 255 48 00000000000000ff 256 2 0000000000000100 32767 8 0000000000007fff 32768 44 0000000000008000 65535 37 000000000000ffff 65536 38 0000000000010000 8388607 24 00000000007fffff 8388608 36 0000000000800000 16777215 20 0000000000ffffff 16777216 34 0000000001000000 2147483647 26 000000007fffffff 2147483648 43 0000000080000000 4294967295 22 00000000ffffffff 4294967296 6 00000001100000000 549755813887 23 0000007f7fffffffff 549755813888 21 000000808000000000 1099511627775 40 000000ffffffffffff 1099511627776 28 0000010010000000000 140737488355327 3 00007fff7fffffffffff 140737488355328 47 00008000800000000000 281474976710655 39 0000ffffffffffffffff 281474976710656 10 000100001000000000000 36028797018963967 18 007fffff7fffffffffffff 36028797018963968 25 0080000080000000000000 72057594037927935 32 00ffffffffffffffffffff 72057594037927936 11 01000000100000000000000 576460752303423487 9 07ffffff7ffffffffffffff 576460752303423488 31 08000000800000000000000 1152921504606846975 15 0ffffffffffffffffffffff 1152921504606846976 17 100000001000000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -2147483648 35 ffffffffffffffffffffffff80000000 -8388609 29 ffffffffffffffffffffffffff7fffff -8388608 16 ffffffffffffffffffffffffff800000 -32769 13 ffffffffffffffffffffffffffff7fff -32768 45 ffffffffffffffffffffffffffff8000 -129 1 ffffffffffffffffffffffffffffff7f -128 27 ffffffffffffffffffffffffffffff80}
do_test boundary4-3.13 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY +x DESC
  }
} {-128 27 ffffffffffffffffffffffffffffff80 -129 1 ffffffffffffffffffffffffffffff7f -32768 45 ffffffffffffffffffffffffffff8000 -32769 13 ffffffffffffffffffffffffffff7fff -8388608 16 ffffffffffffffffffffffffff800000 -8388609 29 ffffffffffffffffffffffffff7fffff -2147483648 35 ffffffffffffffffffffffff80000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 1152921504606846976 17 100000001000000000000000 1152921504606846975 15 0ffffffffffffffffffffff 576460752303423488 31 08000000800000000000000 576460752303423487 9 07ffffff7ffffffffffffff 72057594037927936 11 01000000100000000000000 72057594037927935 32 00ffffffffffffffffffff 36028797018963968 25 0080000080000000000000 36028797018963967 18 007fffff7fffffffffffff 281474976710656 10 000100001000000000000 281474976710655 39 0000ffffffffffffffff 140737488355328 47 00008000800000000000 140737488355327 3 00007fff7fffffffffff 1099511627776 28 0000010010000000000 1099511627775 40 000000ffffffffffff 549755813888 21 000000808000000000 549755813887 23 0000007f7fffffffff 4294967296 6 00000001100000000 4294967295 22 00000000ffffffff 2147483648 43 0000000080000000 2147483647 26 000000007fffffff 16777216 34 0000000001000000 16777215 20 0000000000ffffff 8388608 36 0000000000800000 8388607 24 00000000007fffff 65536 38 0000000000010000 65535 37 000000000000ffff 32768 44 0000000000008000 32767 8 0000000000007fff 256 2 0000000000000100 255 48 00000000000000ff 128 30 0000000000000080 127 19 000000000000007f}
do_test boundary4-3.14 {
  db eval {
    SELECT oid, a, x FROM t1 ORDER BY x DESC
  }
} {-128 27 ffffffffffffffffffffffffffffff80 -129 1 ffffffffffffffffffffffffffffff7f -32768 45 ffffffffffffffffffffffffffff8000 -32769 13 ffffffffffffffffffffffffffff7fff -8388608 16 ffffffffffffffffffffffffff800000 -8388609 29 ffffffffffffffffffffffffff7fffff -2147483648 35 ffffffffffffffffffffffff80000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 1152921504606846976 17 100000001000000000000000 1152921504606846975 15 0ffffffffffffffffffffff 576460752303423488 31 08000000800000000000000 576460752303423487 9 07ffffff7ffffffffffffff 72057594037927936 11 01000000100000000000000 72057594037927935 32 00ffffffffffffffffffff 36028797018963968 25 0080000080000000000000 36028797018963967 18 007fffff7fffffffffffff 281474976710656 10 000100001000000000000 281474976710655 39 0000ffffffffffffffff 140737488355328 47 00008000800000000000 140737488355327 3 00007fff7fffffffffff 1099511627776 28 0000010010000000000 1099511627775 40 000000ffffffffffff 549755813888 21 000000808000000000 549755813887 23 0000007f7fffffffff 4294967296 6 00000001100000000 4294967295 22 00000000ffffffff 2147483648 43 0000000080000000 2147483647 26 000000007fffffff 16777216 34 0000000001000000 16777215 20 0000000000ffffff 8388608 36 0000000000800000 8388607 24 00000000007fffff 65536 38 0000000000010000 65535 37 000000000000ffff 32768 44 0000000000008000 32767 8 0000000000007fff 256 2 0000000000000100 255 48 00000000000000ff 128 30 0000000000000080 127 19 000000000000007f}
do_test boundary4-4.1 {
  db eval {
    UPDATE t1 SET oid=a, a=oid, x=z, z=x
  }
} {}
do_test boundary4-4.3 {
  db eval {
    SELECT a, oid, z FROM t1 ORDER BY +a
  }
} {-576460752303423489 33 fffffffff7fffffff7ffffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -2147483648 35 ffffffffffffffffffffffff80000000 -8388609 29 ffffffffffffffffffffffffff7fffff -8388608 16 ffffffffffffffffffffffffff800000 -32769 13 ffffffffffffffffffffffffffff7fff -32768 45 ffffffffffffffffffffffffffff8000 -129 1 ffffffffffffffffffffffffffffff7f -128 27 ffffffffffffffffffffffffffffff80 127 19 000000000000007f 128 30 0000000000000080 255 48 00000000000000ff 256 2 0000000000000100 32767 8 0000000000007fff 32768 44 0000000000008000 65535 37 000000000000ffff 65536 38 0000000000010000 8388607 24 00000000007fffff 8388608 36 0000000000800000 16777215 20 0000000000ffffff 16777216 34 0000000001000000 2147483647 26 000000007fffffff 2147483648 43 0000000080000000 4294967295 22 00000000ffffffff 4294967296 6 00000001100000000 549755813887 23 0000007f7fffffffff 549755813888 21 000000808000000000 1099511627775 40 000000ffffffffffff 1099511627776 28 0000010010000000000 140737488355327 3 00007fff7fffffffffff 140737488355328 47 00008000800000000000 281474976710655 39 0000ffffffffffffffff 281474976710656 10 000100001000000000000 36028797018963967 18 007fffff7fffffffffffff 36028797018963968 25 0080000080000000000000 72057594037927935 32 00ffffffffffffffffffff 72057594037927936 11 01000000100000000000000 576460752303423487 9 07ffffff7ffffffffffffff 576460752303423488 31 08000000800000000000000 1152921504606846975 15 0ffffffffffffffffffffff 1152921504606846976 17 100000001000000000000000}
do_test boundary4-4.4 {
  db eval {
    SELECT a, oid, z FROM t1 ORDER BY a
  }
} {-576460752303423489 33 fffffffff7fffffff7ffffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -2147483648 35 ffffffffffffffffffffffff80000000 -8388609 29 ffffffffffffffffffffffffff7fffff -8388608 16 ffffffffffffffffffffffffff800000 -32769 13 ffffffffffffffffffffffffffff7fff -32768 45 ffffffffffffffffffffffffffff8000 -129 1 ffffffffffffffffffffffffffffff7f -128 27 ffffffffffffffffffffffffffffff80 127 19 000000000000007f 128 30 0000000000000080 255 48 00000000000000ff 256 2 0000000000000100 32767 8 0000000000007fff 32768 44 0000000000008000 65535 37 000000000000ffff 65536 38 0000000000010000 8388607 24 00000000007fffff 8388608 36 0000000000800000 16777215 20 0000000000ffffff 16777216 34 0000000001000000 2147483647 26 000000007fffffff 2147483648 43 0000000080000000 4294967295 22 00000000ffffffff 4294967296 6 00000001100000000 549755813887 23 0000007f7fffffffff 549755813888 21 000000808000000000 1099511627775 40 000000ffffffffffff 1099511627776 28 0000010010000000000 140737488355327 3 00007fff7fffffffffff 140737488355328 47 00008000800000000000 281474976710655 39 0000ffffffffffffffff 281474976710656 10 000100001000000000000 36028797018963967 18 007fffff7fffffffffffff 36028797018963968 25 0080000080000000000000 72057594037927935 32 00ffffffffffffffffffff 72057594037927936 11 01000000100000000000000 576460752303423487 9 07ffffff7ffffffffffffff 576460752303423488 31 08000000800000000000000 1152921504606846975 15 0ffffffffffffffffffffff 1152921504606846976 17 100000001000000000000000}
do_test boundary4-4.5 {
  db eval {
    SELECT a, oid, z FROM t1 ORDER BY +a DESC
  }
} {1152921504606846976 17 100000001000000000000000 1152921504606846975 15 0ffffffffffffffffffffff 576460752303423488 31 08000000800000000000000 576460752303423487 9 07ffffff7ffffffffffffff 72057594037927936 11 01000000100000000000000 72057594037927935 32 00ffffffffffffffffffff 36028797018963968 25 0080000080000000000000 36028797018963967 18 007fffff7fffffffffffff 281474976710656 10 000100001000000000000 281474976710655 39 0000ffffffffffffffff 140737488355328 47 00008000800000000000 140737488355327 3 00007fff7fffffffffff 1099511627776 28 0000010010000000000 1099511627775 40 000000ffffffffffff 549755813888 21 000000808000000000 549755813887 23 0000007f7fffffffff 4294967296 6 00000001100000000 4294967295 22 00000000ffffffff 2147483648 43 0000000080000000 2147483647 26 000000007fffffff 16777216 34 0000000001000000 16777215 20 0000000000ffffff 8388608 36 0000000000800000 8388607 24 00000000007fffff 65536 38 0000000000010000 65535 37 000000000000ffff 32768 44 0000000000008000 32767 8 0000000000007fff 256 2 0000000000000100 255 48 00000000000000ff 128 30 0000000000000080 127 19 000000000000007f -128 27 ffffffffffffffffffffffffffffff80 -129 1 ffffffffffffffffffffffffffffff7f -32768 45 ffffffffffffffffffffffffffff8000 -32769 13 ffffffffffffffffffffffffffff7fff -8388608 16 ffffffffffffffffffffffffff800000 -8388609 29 ffffffffffffffffffffffffff7fffff -2147483648 35 ffffffffffffffffffffffff80000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff}
do_test boundary4-4.6 {
  db eval {
    SELECT a, oid, z FROM t1 ORDER BY a DESC
  }
} {1152921504606846976 17 100000001000000000000000 1152921504606846975 15 0ffffffffffffffffffffff 576460752303423488 31 08000000800000000000000 576460752303423487 9 07ffffff7ffffffffffffff 72057594037927936 11 01000000100000000000000 72057594037927935 32 00ffffffffffffffffffff 36028797018963968 25 0080000080000000000000 36028797018963967 18 007fffff7fffffffffffff 281474976710656 10 000100001000000000000 281474976710655 39 0000ffffffffffffffff 140737488355328 47 00008000800000000000 140737488355327 3 00007fff7fffffffffff 1099511627776 28 0000010010000000000 1099511627775 40 000000ffffffffffff 549755813888 21 000000808000000000 549755813887 23 0000007f7fffffffff 4294967296 6 00000001100000000 4294967295 22 00000000ffffffff 2147483648 43 0000000080000000 2147483647 26 000000007fffffff 16777216 34 0000000001000000 16777215 20 0000000000ffffff 8388608 36 0000000000800000 8388607 24 00000000007fffff 65536 38 0000000000010000 65535 37 000000000000ffff 32768 44 0000000000008000 32767 8 0000000000007fff 256 2 0000000000000100 255 48 00000000000000ff 128 30 0000000000000080 127 19 000000000000007f -128 27 ffffffffffffffffffffffffffffff80 -129 1 ffffffffffffffffffffffffffffff7f -32768 45 ffffffffffffffffffffffffffff8000 -32769 13 ffffffffffffffffffffffffffff7fff -8388608 16 ffffffffffffffffffffffffff800000 -8388609 29 ffffffffffffffffffffffffff7fffff -2147483648 35 ffffffffffffffffffffffff80000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff}
do_test boundary4-4.7 {
  db eval {
    SELECT a, oid, z FROM t1 ORDER BY +oid
  }
} {-129 1 ffffffffffffffffffffffffffffff7f 256 2 0000000000000100 140737488355327 3 00007fff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff 4294967296 6 00000001100000000 -549755813888 7 ffffffffffffff80ffffff8000000000 32767 8 0000000000007fff 576460752303423487 9 07ffffff7ffffffffffffff 281474976710656 10 000100001000000000000 72057594037927936 11 01000000100000000000000 -576460752303423488 12 fffffffff8000000f800000000000000 -32769 13 ffffffffffffffffffffffffffff7fff -36028797018963969 14 ffffffffff7fffffff7fffffffffffff 1152921504606846975 15 0ffffffffffffffffffffff -8388608 16 ffffffffffffffffffffffffff800000 1152921504606846976 17 100000001000000000000000 36028797018963967 18 007fffff7fffffffffffff 127 19 000000000000007f 16777215 20 0000000000ffffff 549755813888 21 000000808000000000 4294967295 22 00000000ffffffff 549755813887 23 0000007f7fffffffff 8388607 24 00000000007fffff 36028797018963968 25 0080000080000000000000 2147483647 26 000000007fffffff -128 27 ffffffffffffffffffffffffffffff80 1099511627776 28 0000010010000000000 -8388609 29 ffffffffffffffffffffffffff7fffff 128 30 0000000000000080 576460752303423488 31 08000000800000000000000 72057594037927935 32 00ffffffffffffffffffff -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 16777216 34 0000000001000000 -2147483648 35 ffffffffffffffffffffffff80000000 8388608 36 0000000000800000 65535 37 000000000000ffff 65536 38 0000000000010000 281474976710655 39 0000ffffffffffffffff 1099511627775 40 000000ffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff 2147483648 43 0000000080000000 32768 44 0000000000008000 -32768 45 ffffffffffffffffffffffffffff8000 -2147483649 46 ffffffffffffffffffffffff7fffffff 140737488355328 47 00008000800000000000 255 48 00000000000000ff}
do_test boundary4-4.8 {
  db eval {
    SELECT a, oid, z FROM t1 ORDER BY oid
  }
} {-129 1 ffffffffffffffffffffffffffffff7f 256 2 0000000000000100 140737488355327 3 00007fff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff 4294967296 6 00000001100000000 -549755813888 7 ffffffffffffff80ffffff8000000000 32767 8 0000000000007fff 576460752303423487 9 07ffffff7ffffffffffffff 281474976710656 10 000100001000000000000 72057594037927936 11 01000000100000000000000 -576460752303423488 12 fffffffff8000000f800000000000000 -32769 13 ffffffffffffffffffffffffffff7fff -36028797018963969 14 ffffffffff7fffffff7fffffffffffff 1152921504606846975 15 0ffffffffffffffffffffff -8388608 16 ffffffffffffffffffffffffff800000 1152921504606846976 17 100000001000000000000000 36028797018963967 18 007fffff7fffffffffffff 127 19 000000000000007f 16777215 20 0000000000ffffff 549755813888 21 000000808000000000 4294967295 22 00000000ffffffff 549755813887 23 0000007f7fffffffff 8388607 24 00000000007fffff 36028797018963968 25 0080000080000000000000 2147483647 26 000000007fffffff -128 27 ffffffffffffffffffffffffffffff80 1099511627776 28 0000010010000000000 -8388609 29 ffffffffffffffffffffffffff7fffff 128 30 0000000000000080 576460752303423488 31 08000000800000000000000 72057594037927935 32 00ffffffffffffffffffff -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 16777216 34 0000000001000000 -2147483648 35 ffffffffffffffffffffffff80000000 8388608 36 0000000000800000 65535 37 000000000000ffff 65536 38 0000000000010000 281474976710655 39 0000ffffffffffffffff 1099511627775 40 000000ffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff 2147483648 43 0000000080000000 32768 44 0000000000008000 -32768 45 ffffffffffffffffffffffffffff8000 -2147483649 46 ffffffffffffffffffffffff7fffffff 140737488355328 47 00008000800000000000 255 48 00000000000000ff}
do_test boundary4-4.9 {
  db eval {
    SELECT a, oid, z FROM t1 ORDER BY +oid DESC
  }
} {255 48 00000000000000ff 140737488355328 47 00008000800000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -32768 45 ffffffffffffffffffffffffffff8000 32768 44 0000000000008000 2147483648 43 0000000080000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 1099511627775 40 000000ffffffffffff 281474976710655 39 0000ffffffffffffffff 65536 38 0000000000010000 65535 37 000000000000ffff 8388608 36 0000000000800000 -2147483648 35 ffffffffffffffffffffffff80000000 16777216 34 0000000001000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 72057594037927935 32 00ffffffffffffffffffff 576460752303423488 31 08000000800000000000000 128 30 0000000000000080 -8388609 29 ffffffffffffffffffffffffff7fffff 1099511627776 28 0000010010000000000 -128 27 ffffffffffffffffffffffffffffff80 2147483647 26 000000007fffffff 36028797018963968 25 0080000080000000000000 8388607 24 00000000007fffff 549755813887 23 0000007f7fffffffff 4294967295 22 00000000ffffffff 549755813888 21 000000808000000000 16777215 20 0000000000ffffff 127 19 000000000000007f 36028797018963967 18 007fffff7fffffffffffff 1152921504606846976 17 100000001000000000000000 -8388608 16 ffffffffffffffffffffffffff800000 1152921504606846975 15 0ffffffffffffffffffffff -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -32769 13 ffffffffffffffffffffffffffff7fff -576460752303423488 12 fffffffff8000000f800000000000000 72057594037927936 11 01000000100000000000000 281474976710656 10 000100001000000000000 576460752303423487 9 07ffffff7ffffffffffffff 32767 8 0000000000007fff -549755813888 7 ffffffffffffff80ffffff8000000000 4294967296 6 00000001100000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 140737488355327 3 00007fff7fffffffffff 256 2 0000000000000100 -129 1 ffffffffffffffffffffffffffffff7f}
do_test boundary4-4.10 {
  db eval {
    SELECT a, oid, z FROM t1 ORDER BY oid DESC
  }
} {255 48 00000000000000ff 140737488355328 47 00008000800000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -32768 45 ffffffffffffffffffffffffffff8000 32768 44 0000000000008000 2147483648 43 0000000080000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 1099511627775 40 000000ffffffffffff 281474976710655 39 0000ffffffffffffffff 65536 38 0000000000010000 65535 37 000000000000ffff 8388608 36 0000000000800000 -2147483648 35 ffffffffffffffffffffffff80000000 16777216 34 0000000001000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 72057594037927935 32 00ffffffffffffffffffff 576460752303423488 31 08000000800000000000000 128 30 0000000000000080 -8388609 29 ffffffffffffffffffffffffff7fffff 1099511627776 28 0000010010000000000 -128 27 ffffffffffffffffffffffffffffff80 2147483647 26 000000007fffffff 36028797018963968 25 0080000080000000000000 8388607 24 00000000007fffff 549755813887 23 0000007f7fffffffff 4294967295 22 00000000ffffffff 549755813888 21 000000808000000000 16777215 20 0000000000ffffff 127 19 000000000000007f 36028797018963967 18 007fffff7fffffffffffff 1152921504606846976 17 100000001000000000000000 -8388608 16 ffffffffffffffffffffffffff800000 1152921504606846975 15 0ffffffffffffffffffffff -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -32769 13 ffffffffffffffffffffffffffff7fff -576460752303423488 12 fffffffff8000000f800000000000000 72057594037927936 11 01000000100000000000000 281474976710656 10 000100001000000000000 576460752303423487 9 07ffffff7ffffffffffffff 32767 8 0000000000007fff -549755813888 7 ffffffffffffff80ffffff8000000000 4294967296 6 00000001100000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 140737488355327 3 00007fff7fffffffffff 256 2 0000000000000100 -129 1 ffffffffffffffffffffffffffffff7f}
do_test boundary4-4.11 {
  db eval {
    SELECT a, oid, z FROM t1 ORDER BY +z
  }
} {127 19 000000000000007f 128 30 0000000000000080 255 48 00000000000000ff 256 2 0000000000000100 32767 8 0000000000007fff 32768 44 0000000000008000 65535 37 000000000000ffff 65536 38 0000000000010000 8388607 24 00000000007fffff 8388608 36 0000000000800000 16777215 20 0000000000ffffff 16777216 34 0000000001000000 2147483647 26 000000007fffffff 2147483648 43 0000000080000000 4294967295 22 00000000ffffffff 4294967296 6 00000001100000000 549755813887 23 0000007f7fffffffff 549755813888 21 000000808000000000 1099511627775 40 000000ffffffffffff 1099511627776 28 0000010010000000000 140737488355327 3 00007fff7fffffffffff 140737488355328 47 00008000800000000000 281474976710655 39 0000ffffffffffffffff 281474976710656 10 000100001000000000000 36028797018963967 18 007fffff7fffffffffffff 36028797018963968 25 0080000080000000000000 72057594037927935 32 00ffffffffffffffffffff 72057594037927936 11 01000000100000000000000 576460752303423487 9 07ffffff7ffffffffffffff 576460752303423488 31 08000000800000000000000 1152921504606846975 15 0ffffffffffffffffffffff 1152921504606846976 17 100000001000000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -2147483648 35 ffffffffffffffffffffffff80000000 -8388609 29 ffffffffffffffffffffffffff7fffff -8388608 16 ffffffffffffffffffffffffff800000 -32769 13 ffffffffffffffffffffffffffff7fff -32768 45 ffffffffffffffffffffffffffff8000 -129 1 ffffffffffffffffffffffffffffff7f -128 27 ffffffffffffffffffffffffffffff80}
do_test boundary4-4.12 {
  db eval {
    SELECT a, oid, z FROM t1 ORDER BY z
  }
} {127 19 000000000000007f 128 30 0000000000000080 255 48 00000000000000ff 256 2 0000000000000100 32767 8 0000000000007fff 32768 44 0000000000008000 65535 37 000000000000ffff 65536 38 0000000000010000 8388607 24 00000000007fffff 8388608 36 0000000000800000 16777215 20 0000000000ffffff 16777216 34 0000000001000000 2147483647 26 000000007fffffff 2147483648 43 0000000080000000 4294967295 22 00000000ffffffff 4294967296 6 00000001100000000 549755813887 23 0000007f7fffffffff 549755813888 21 000000808000000000 1099511627775 40 000000ffffffffffff 1099511627776 28 0000010010000000000 140737488355327 3 00007fff7fffffffffff 140737488355328 47 00008000800000000000 281474976710655 39 0000ffffffffffffffff 281474976710656 10 000100001000000000000 36028797018963967 18 007fffff7fffffffffffff 36028797018963968 25 0080000080000000000000 72057594037927935 32 00ffffffffffffffffffff 72057594037927936 11 01000000100000000000000 576460752303423487 9 07ffffff7ffffffffffffff 576460752303423488 31 08000000800000000000000 1152921504606846975 15 0ffffffffffffffffffffff 1152921504606846976 17 100000001000000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -2147483648 35 ffffffffffffffffffffffff80000000 -8388609 29 ffffffffffffffffffffffffff7fffff -8388608 16 ffffffffffffffffffffffffff800000 -32769 13 ffffffffffffffffffffffffffff7fff -32768 45 ffffffffffffffffffffffffffff8000 -129 1 ffffffffffffffffffffffffffffff7f -128 27 ffffffffffffffffffffffffffffff80}
do_test boundary4-4.13 {
  db eval {
    SELECT a, oid, z FROM t1 ORDER BY +z DESC
  }
} {-128 27 ffffffffffffffffffffffffffffff80 -129 1 ffffffffffffffffffffffffffffff7f -32768 45 ffffffffffffffffffffffffffff8000 -32769 13 ffffffffffffffffffffffffffff7fff -8388608 16 ffffffffffffffffffffffffff800000 -8388609 29 ffffffffffffffffffffffffff7fffff -2147483648 35 ffffffffffffffffffffffff80000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 1152921504606846976 17 100000001000000000000000 1152921504606846975 15 0ffffffffffffffffffffff 576460752303423488 31 08000000800000000000000 576460752303423487 9 07ffffff7ffffffffffffff 72057594037927936 11 01000000100000000000000 72057594037927935 32 00ffffffffffffffffffff 36028797018963968 25 0080000080000000000000 36028797018963967 18 007fffff7fffffffffffff 281474976710656 10 000100001000000000000 281474976710655 39 0000ffffffffffffffff 140737488355328 47 00008000800000000000 140737488355327 3 00007fff7fffffffffff 1099511627776 28 0000010010000000000 1099511627775 40 000000ffffffffffff 549755813888 21 000000808000000000 549755813887 23 0000007f7fffffffff 4294967296 6 00000001100000000 4294967295 22 00000000ffffffff 2147483648 43 0000000080000000 2147483647 26 000000007fffffff 16777216 34 0000000001000000 16777215 20 0000000000ffffff 8388608 36 0000000000800000 8388607 24 00000000007fffff 65536 38 0000000000010000 65535 37 000000000000ffff 32768 44 0000000000008000 32767 8 0000000000007fff 256 2 0000000000000100 255 48 00000000000000ff 128 30 0000000000000080 127 19 000000000000007f}
do_test boundary4-4.14 {
  db eval {
    SELECT a, oid, z FROM t1 ORDER BY z DESC
  }
} {-128 27 ffffffffffffffffffffffffffffff80 -129 1 ffffffffffffffffffffffffffffff7f -32768 45 ffffffffffffffffffffffffffff8000 -32769 13 ffffffffffffffffffffffffffff7fff -8388608 16 ffffffffffffffffffffffffff800000 -8388609 29 ffffffffffffffffffffffffff7fffff -2147483648 35 ffffffffffffffffffffffff80000000 -2147483649 46 ffffffffffffffffffffffff7fffffff -549755813888 7 ffffffffffffff80ffffff8000000000 -549755813889 5 ffffffffffffff7fffffff7fffffffff -140737488355328 4 ffffffffffff8000ffff800000000000 -140737488355329 42 ffffffffffff7fffffff7fffffffffff -36028797018963968 41 ffffffffff800000ff80000000000000 -36028797018963969 14 ffffffffff7fffffff7fffffffffffff -576460752303423488 12 fffffffff8000000f800000000000000 -576460752303423489 33 fffffffff7fffffff7ffffffffffffff 1152921504606846976 17 100000001000000000000000 1152921504606846975 15 0ffffffffffffffffffffff 576460752303423488 31 08000000800000000000000 576460752303423487 9 07ffffff7ffffffffffffff 72057594037927936 11 01000000100000000000000 72057594037927935 32 00ffffffffffffffffffff 36028797018963968 25 0080000080000000000000 36028797018963967 18 007fffff7fffffffffffff 281474976710656 10 000100001000000000000 281474976710655 39 0000ffffffffffffffff 140737488355328 47 00008000800000000000 140737488355327 3 00007fff7fffffffffff 1099511627776 28 0000010010000000000 1099511627775 40 000000ffffffffffff 549755813888 21 000000808000000000 549755813887 23 0000007f7fffffffff 4294967296 6 00000001100000000 4294967295 22 00000000ffffffff 2147483648 43 0000000080000000 2147483647 26 000000007fffffff 16777216 34 0000000001000000 16777215 20 0000000000ffffff 8388608 36 0000000000800000 8388607 24 00000000007fffff 65536 38 0000000000010000 65535 37 000000000000ffff 32768 44 0000000000008000 32767 8 0000000000007fff 256 2 0000000000000100 255 48 00000000000000ff 128 30 0000000000000080 127 19 000000000000007f}
finish_test