3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
10 #***********************************************************************
11 # This file implements regression tests for SQLite library.
13 # This file implements tests for miscellanous features that were
14 # left out of other test files.
16 # $Id: misc5.test,v 1.22 2008/07/29 10:26:45 danielk1977 Exp $
18 set testdir [file dirname $argv0]
19 source $testdir/tester.tcl
21 # Build records using the MakeRecord opcode such that the size of the
22 # header is at the transition point in the size of a varint.
24 # This test causes an assertion failure or a buffer overrun in version
27 for {set i 120} {$i<140} {incr i} {
29 catchsql {DROP TABLE t1}
30 set sql1 {CREATE TABLE t1}
31 set sql2 {INSERT INTO t1 VALUES}
33 for {set j 0} {$j<$i} {incr j} {
44 # Make sure large integers are stored correctly.
49 create table t2(x unique);
50 insert into t2 values(1);
51 insert or ignore into t2 select x*2 from t2;
52 insert or ignore into t2 select x*4 from t2;
53 insert or ignore into t2 select x*16 from t2;
54 insert or ignore into t2 select x*256 from t2;
55 insert or ignore into t2 select x*65536 from t2;
56 insert or ignore into t2 select x*2147483648 from t2;
57 insert or ignore into t2 select x-1 from t2;
58 insert or ignore into t2 select x+1 from t2;
59 insert or ignore into t2 select -x from t2;
60 select count(*) from t2;
67 create table t2(x unique);
68 create table t2_temp(x);
69 insert into t2_temp values(1);
70 insert into t2_temp select x*2 from t2_temp;
71 insert into t2_temp select x*4 from t2_temp;
72 insert into t2_temp select x*16 from t2_temp;
73 insert into t2_temp select x*256 from t2_temp;
74 insert into t2_temp select x*65536 from t2_temp;
75 insert into t2_temp select x*2147483648 from t2_temp;
76 insert into t2_temp select x-1 from t2_temp;
77 insert into t2_temp select x+1 from t2_temp;
78 insert into t2_temp select -x from t2_temp;
79 INSERT INTO t2 SELECT DISTINCT(x) FROM t2_temp;
82 select count(*) from t2;
88 select x from t2 order by x;
91 "-4611686018427387905\
463 # Ticket #1210. Do proper reference counting of Table structures
464 # so that deeply nested SELECT statements can be flattened correctly.
469 CREATE TABLE songs(songid, artist, timesplayed);
470 INSERT INTO songs VALUES(1,'one',1);
471 INSERT INTO songs VALUES(2,'one',2);
472 INSERT INTO songs VALUES(3,'two',3);
473 INSERT INTO songs VALUES(4,'three',5);
474 INSERT INTO songs VALUES(5,'one',7);
475 INSERT INTO songs VALUES(6,'two',11);
476 SELECT DISTINCT artist
478 SELECT DISTINCT artist
483 WHERE LOWER(artist) = (
484 -- This sub-query is indeterminate. Because there is no ORDER BY,
485 -- it may return 'one', 'two' or 'three'. Because of this, the
486 -- outermost parent query may correctly return any of 'one', 'two'
487 -- or 'three' as well.
488 SELECT DISTINCT LOWER(artist)
490 -- This sub-query returns the table:
496 SELECT DISTINCT artist,sum(timesplayed) AS total
498 GROUP BY LOWER(artist)
506 ORDER BY LOWER(artist) ASC;
511 # Ticket #1370. Do not overwrite small files (less than 1024 bytes)
512 # when trying to open them as a database.
514 if {[permutation] == ""} {
518 set fd [open test.db w]
519 puts $fd "This is not really a database"
523 CREATE TABLE t1(a,b,c);
525 } {1 {file is not a database}}
528 # Ticket #1371. Allow floating point numbers of the form .N or N.
537 execsql {SELECT 3.e0 }
540 execsql {SELECT .4e+1}
543 # Ticket #1582. Ensure that an unknown table in a LIMIT clause applied to
544 # a UNION ALL query causes an error, not a crash.
549 ifcapable subquery&&compound {
552 SELECT * FROM sqlite_master
554 SELECT * FROM sqlite_master
555 LIMIT (SELECT count(*) FROM blah);
557 } {1 {no such table: blah}}
560 CREATE TABLE logs(msg TEXT, timestamp INTEGER, dbtime TEXT);
563 SELECT * FROM logs WHERE logs.oid >= (SELECT head FROM logs_base)
566 LIMIT (SELECT lmt FROM logs_base) ;
568 } {1 {no such table: logs_base}}
571 # Overflow the lemon parser stack by providing an overly complex
572 # expression. Make sure that the overflow is detected and reported.
574 # This test fails when building with -DYYSTACKDEPTH=0
577 execsql {CREATE TABLE t1(x)}
578 set sql "INSERT INTO t1 VALUES("
580 for {set i 0} {$i<200} {incr i} {
586 } {1 {parser stack overflow}}
588 # Parser stack overflow is silently ignored when it occurs while parsing the
589 # schema and PRAGMA writable_schema is turned on.
593 sqlite3_db_config db2 DEFENSIVE 0
595 CREATE TABLE t1(x UNIQUE);
596 PRAGMA writable_schema=ON;
597 UPDATE sqlite_master SET sql='CREATE table t(o CHECK(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((;VALUES(o)';
601 DROP TABLE IF EXISTS D;
612 SELECT name, type FROM sqlite_master WHERE name IS NULL
614 SELECT type, name FROM sqlite_master WHERE type IS NULL
615 ORDER BY 1, 2, 1, 2, 1, 2
620 SELECT name, type FROM sqlite_master WHERE name IS NULL
622 SELECT type, name FROM sqlite_master WHERE type IS NULL
623 ORDER BY 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2
628 # Ticket #1912. Make the tokenizer require a space after a numeric
635 } {1 {unrecognized token: "123abc"}}
640 } {1 {unrecognized token: "123.4e5ghi"}}
643 # Additional integer encoding tests.
648 INSERT INTO t3 VALUES(-18);
649 INSERT INTO t3 VALUES(-17);
650 INSERT INTO t3 VALUES(-16);
651 INSERT INTO t3 VALUES(-15);
652 INSERT INTO t3 VALUES(-14);
653 INSERT INTO t3 VALUES(-13);
654 INSERT INTO t3 VALUES(-12);
655 INSERT INTO t3 VALUES(-11);
656 INSERT INTO t3 VALUES(-10);
657 INSERT INTO t3 VALUES(-9);
658 INSERT INTO t3 VALUES(-8);
659 INSERT INTO t3 VALUES(-7);
660 INSERT INTO t3 VALUES(-6);
661 INSERT INTO t3 VALUES(-5);
662 INSERT INTO t3 VALUES(-4);
663 INSERT INTO t3 VALUES(-3);
664 INSERT INTO t3 VALUES(-2);
665 INSERT INTO t3 VALUES(-1);
666 INSERT INTO t3 VALUES(0);
667 INSERT INTO t3 VALUES(1);
668 INSERT INTO t3 VALUES(2);
669 INSERT INTO t3 VALUES(3);
670 INSERT INTO t3 VALUES(4);
671 INSERT INTO t3 VALUES(5);
672 INSERT INTO t3 VALUES(6);
673 INSERT INTO t3 VALUES(7);
674 INSERT INTO t3 VALUES(8);
675 INSERT INTO t3 VALUES(9);
676 INSERT INTO t3 VALUES(10);
677 INSERT INTO t3 VALUES(11);
678 INSERT INTO t3 VALUES(12);
679 INSERT INTO t3 VALUES(13);
680 INSERT INTO t3 VALUES(14);
681 INSERT INTO t3 VALUES(15);
682 INSERT INTO t3 VALUES(16);
683 INSERT INTO t3 VALUES(17);
684 INSERT INTO t3 VALUES(18);
685 INSERT INTO t3 VALUES(30);
686 INSERT INTO t3 VALUES(31);
687 INSERT INTO t3 VALUES(32);
688 INSERT INTO t3 VALUES(33);
689 INSERT INTO t3 VALUES(34);
690 INSERT INTO t3 VALUES(-30);
691 INSERT INTO t3 VALUES(-31);
692 INSERT INTO t3 VALUES(-32);
693 INSERT INTO t3 VALUES(-33);
694 INSERT INTO t3 VALUES(-34);
695 INSERT INTO t3 VALUES(62);
696 INSERT INTO t3 VALUES(63);
697 INSERT INTO t3 VALUES(64);
698 INSERT INTO t3 VALUES(65);
699 INSERT INTO t3 VALUES(66);
700 INSERT INTO t3 VALUES(-62);
701 INSERT INTO t3 VALUES(-63);
702 INSERT INTO t3 VALUES(-64);
703 INSERT INTO t3 VALUES(-65);
704 INSERT INTO t3 VALUES(-66);
705 INSERT INTO t3 VALUES(126);
706 INSERT INTO t3 VALUES(127);
707 INSERT INTO t3 VALUES(128);
708 INSERT INTO t3 VALUES(129);
709 INSERT INTO t3 VALUES(130);
710 INSERT INTO t3 VALUES(-126);
711 INSERT INTO t3 VALUES(-127);
712 INSERT INTO t3 VALUES(-128);
713 INSERT INTO t3 VALUES(-129);
714 INSERT INTO t3 VALUES(-130);
715 INSERT INTO t3 VALUES(254);
716 INSERT INTO t3 VALUES(255);
717 INSERT INTO t3 VALUES(256);
718 INSERT INTO t3 VALUES(257);
719 INSERT INTO t3 VALUES(258);
720 INSERT INTO t3 VALUES(-254);
721 INSERT INTO t3 VALUES(-255);
722 INSERT INTO t3 VALUES(-256);
723 INSERT INTO t3 VALUES(-257);
724 INSERT INTO t3 VALUES(-258);
725 INSERT INTO t3 VALUES(510);
726 INSERT INTO t3 VALUES(511);
727 INSERT INTO t3 VALUES(512);
728 INSERT INTO t3 VALUES(513);
729 INSERT INTO t3 VALUES(514);
730 INSERT INTO t3 VALUES(-510);
731 INSERT INTO t3 VALUES(-511);
732 INSERT INTO t3 VALUES(-512);
733 INSERT INTO t3 VALUES(-513);
734 INSERT INTO t3 VALUES(-514);
735 INSERT INTO t3 VALUES(1022);
736 INSERT INTO t3 VALUES(1023);
737 INSERT INTO t3 VALUES(1024);
738 INSERT INTO t3 VALUES(1025);
739 INSERT INTO t3 VALUES(1026);
740 INSERT INTO t3 VALUES(-1022);
741 INSERT INTO t3 VALUES(-1023);
742 INSERT INTO t3 VALUES(-1024);
743 INSERT INTO t3 VALUES(-1025);
744 INSERT INTO t3 VALUES(-1026);
745 INSERT INTO t3 VALUES(2046);
746 INSERT INTO t3 VALUES(2047);
747 INSERT INTO t3 VALUES(2048);
748 INSERT INTO t3 VALUES(2049);
749 INSERT INTO t3 VALUES(2050);
750 INSERT INTO t3 VALUES(-2046);
751 INSERT INTO t3 VALUES(-2047);
752 INSERT INTO t3 VALUES(-2048);
753 INSERT INTO t3 VALUES(-2049);
754 INSERT INTO t3 VALUES(-2050);
755 INSERT INTO t3 VALUES(4094);
756 INSERT INTO t3 VALUES(4095);
757 INSERT INTO t3 VALUES(4096);
758 INSERT INTO t3 VALUES(4097);
759 INSERT INTO t3 VALUES(4098);
760 INSERT INTO t3 VALUES(-4094);
761 INSERT INTO t3 VALUES(-4095);
762 INSERT INTO t3 VALUES(-4096);
763 INSERT INTO t3 VALUES(-4097);
764 INSERT INTO t3 VALUES(-4098);
765 INSERT INTO t3 VALUES(8190);
766 INSERT INTO t3 VALUES(8191);
767 INSERT INTO t3 VALUES(8192);
768 INSERT INTO t3 VALUES(8193);
769 INSERT INTO t3 VALUES(8194);
770 INSERT INTO t3 VALUES(-8190);
771 INSERT INTO t3 VALUES(-8191);
772 INSERT INTO t3 VALUES(-8192);
773 INSERT INTO t3 VALUES(-8193);
774 INSERT INTO t3 VALUES(-8194);
775 INSERT INTO t3 VALUES(16382);
776 INSERT INTO t3 VALUES(16383);
777 INSERT INTO t3 VALUES(16384);
778 INSERT INTO t3 VALUES(16385);
779 INSERT INTO t3 VALUES(16386);
780 INSERT INTO t3 VALUES(-16382);
781 INSERT INTO t3 VALUES(-16383);
782 INSERT INTO t3 VALUES(-16384);
783 INSERT INTO t3 VALUES(-16385);
784 INSERT INTO t3 VALUES(-16386);
785 INSERT INTO t3 VALUES(32766);
786 INSERT INTO t3 VALUES(32767);
787 INSERT INTO t3 VALUES(32768);
788 INSERT INTO t3 VALUES(32769);
789 INSERT INTO t3 VALUES(32770);
790 INSERT INTO t3 VALUES(-32766);
791 INSERT INTO t3 VALUES(-32767);
792 INSERT INTO t3 VALUES(-32768);
793 INSERT INTO t3 VALUES(-32769);
794 INSERT INTO t3 VALUES(-32770);
795 INSERT INTO t3 VALUES(65534);
796 INSERT INTO t3 VALUES(65535);
797 INSERT INTO t3 VALUES(65536);
798 INSERT INTO t3 VALUES(65537);
799 INSERT INTO t3 VALUES(65538);
800 INSERT INTO t3 VALUES(-65534);
801 INSERT INTO t3 VALUES(-65535);
802 INSERT INTO t3 VALUES(-65536);
803 INSERT INTO t3 VALUES(-65537);
804 INSERT INTO t3 VALUES(-65538);
805 INSERT INTO t3 VALUES(131070);
806 INSERT INTO t3 VALUES(131071);
807 INSERT INTO t3 VALUES(131072);
808 INSERT INTO t3 VALUES(131073);
809 INSERT INTO t3 VALUES(131074);
810 INSERT INTO t3 VALUES(-131070);
811 INSERT INTO t3 VALUES(-131071);
812 INSERT INTO t3 VALUES(-131072);
813 INSERT INTO t3 VALUES(-131073);
814 INSERT INTO t3 VALUES(-131074);
815 INSERT INTO t3 VALUES(262142);
816 INSERT INTO t3 VALUES(262143);
817 INSERT INTO t3 VALUES(262144);
818 INSERT INTO t3 VALUES(262145);
819 INSERT INTO t3 VALUES(262146);
820 INSERT INTO t3 VALUES(-262142);
821 INSERT INTO t3 VALUES(-262143);
822 INSERT INTO t3 VALUES(-262144);
823 INSERT INTO t3 VALUES(-262145);
824 INSERT INTO t3 VALUES(-262146);
825 INSERT INTO t3 VALUES(524286);
826 INSERT INTO t3 VALUES(524287);
827 INSERT INTO t3 VALUES(524288);
828 INSERT INTO t3 VALUES(524289);
829 INSERT INTO t3 VALUES(524290);
830 INSERT INTO t3 VALUES(-524286);
831 INSERT INTO t3 VALUES(-524287);
832 INSERT INTO t3 VALUES(-524288);
833 INSERT INTO t3 VALUES(-524289);
834 INSERT INTO t3 VALUES(-524290);
835 INSERT INTO t3 VALUES(1048574);
836 INSERT INTO t3 VALUES(1048575);
837 INSERT INTO t3 VALUES(1048576);
838 INSERT INTO t3 VALUES(1048577);
839 INSERT INTO t3 VALUES(1048578);
840 INSERT INTO t3 VALUES(-1048574);
841 INSERT INTO t3 VALUES(-1048575);
842 INSERT INTO t3 VALUES(-1048576);
843 INSERT INTO t3 VALUES(-1048577);
844 INSERT INTO t3 VALUES(-1048578);
845 INSERT INTO t3 VALUES(2097150);
846 INSERT INTO t3 VALUES(2097151);
847 INSERT INTO t3 VALUES(2097152);
848 INSERT INTO t3 VALUES(2097153);
849 INSERT INTO t3 VALUES(2097154);
850 INSERT INTO t3 VALUES(-2097150);
851 INSERT INTO t3 VALUES(-2097151);
852 INSERT INTO t3 VALUES(-2097152);
853 INSERT INTO t3 VALUES(-2097153);
854 INSERT INTO t3 VALUES(-2097154);
855 INSERT INTO t3 VALUES(4194302);
856 INSERT INTO t3 VALUES(4194303);
857 INSERT INTO t3 VALUES(4194304);
858 INSERT INTO t3 VALUES(4194305);
859 INSERT INTO t3 VALUES(4194306);
860 INSERT INTO t3 VALUES(-4194302);
861 INSERT INTO t3 VALUES(-4194303);
862 INSERT INTO t3 VALUES(-4194304);
863 INSERT INTO t3 VALUES(-4194305);
864 INSERT INTO t3 VALUES(-4194306);
865 INSERT INTO t3 VALUES(8388606);
866 INSERT INTO t3 VALUES(8388607);
867 INSERT INTO t3 VALUES(8388608);
868 INSERT INTO t3 VALUES(8388609);
869 INSERT INTO t3 VALUES(8388610);
870 INSERT INTO t3 VALUES(-8388606);
871 INSERT INTO t3 VALUES(-8388607);
872 INSERT INTO t3 VALUES(-8388608);
873 INSERT INTO t3 VALUES(-8388609);
874 INSERT INTO t3 VALUES(-8388610);
875 INSERT INTO t3 VALUES(16777214);
876 INSERT INTO t3 VALUES(16777215);
877 INSERT INTO t3 VALUES(16777216);
878 INSERT INTO t3 VALUES(16777217);
879 INSERT INTO t3 VALUES(16777218);
880 INSERT INTO t3 VALUES(-16777214);
881 INSERT INTO t3 VALUES(-16777215);
882 INSERT INTO t3 VALUES(-16777216);
883 INSERT INTO t3 VALUES(-16777217);
884 INSERT INTO t3 VALUES(-16777218);
885 INSERT INTO t3 VALUES(33554430);
886 INSERT INTO t3 VALUES(33554431);
887 INSERT INTO t3 VALUES(33554432);
888 INSERT INTO t3 VALUES(33554433);
889 INSERT INTO t3 VALUES(33554434);
890 INSERT INTO t3 VALUES(-33554430);
891 INSERT INTO t3 VALUES(-33554431);
892 INSERT INTO t3 VALUES(-33554432);
893 INSERT INTO t3 VALUES(-33554433);
894 INSERT INTO t3 VALUES(-33554434);
895 INSERT INTO t3 VALUES(67108862);
896 INSERT INTO t3 VALUES(67108863);
897 INSERT INTO t3 VALUES(67108864);
898 INSERT INTO t3 VALUES(67108865);
899 INSERT INTO t3 VALUES(67108866);
900 INSERT INTO t3 VALUES(-67108862);
901 INSERT INTO t3 VALUES(-67108863);
902 INSERT INTO t3 VALUES(-67108864);
903 INSERT INTO t3 VALUES(-67108865);
904 INSERT INTO t3 VALUES(-67108866);
905 INSERT INTO t3 VALUES(134217726);
906 INSERT INTO t3 VALUES(134217727);
907 INSERT INTO t3 VALUES(134217728);
908 INSERT INTO t3 VALUES(134217729);
909 INSERT INTO t3 VALUES(134217730);
910 INSERT INTO t3 VALUES(-134217726);
911 INSERT INTO t3 VALUES(-134217727);
912 INSERT INTO t3 VALUES(-134217728);
913 INSERT INTO t3 VALUES(-134217729);
914 INSERT INTO t3 VALUES(-134217730);
915 INSERT INTO t3 VALUES(268435454);
916 INSERT INTO t3 VALUES(268435455);
917 INSERT INTO t3 VALUES(268435456);
918 INSERT INTO t3 VALUES(268435457);
919 INSERT INTO t3 VALUES(268435458);
920 INSERT INTO t3 VALUES(-268435454);
921 INSERT INTO t3 VALUES(-268435455);
922 INSERT INTO t3 VALUES(-268435456);
923 INSERT INTO t3 VALUES(-268435457);
924 INSERT INTO t3 VALUES(-268435458);
925 INSERT INTO t3 VALUES(536870910);
926 INSERT INTO t3 VALUES(536870911);
927 INSERT INTO t3 VALUES(536870912);
928 INSERT INTO t3 VALUES(536870913);
929 INSERT INTO t3 VALUES(536870914);
930 INSERT INTO t3 VALUES(-536870910);
931 INSERT INTO t3 VALUES(-536870911);
932 INSERT INTO t3 VALUES(-536870912);
933 INSERT INTO t3 VALUES(-536870913);
934 INSERT INTO t3 VALUES(-536870914);
935 INSERT INTO t3 VALUES(1073741822);
936 INSERT INTO t3 VALUES(1073741823);
937 INSERT INTO t3 VALUES(1073741824);
938 INSERT INTO t3 VALUES(1073741825);
939 INSERT INTO t3 VALUES(1073741826);
940 INSERT INTO t3 VALUES(-1073741822);
941 INSERT INTO t3 VALUES(-1073741823);
942 INSERT INTO t3 VALUES(-1073741824);
943 INSERT INTO t3 VALUES(-1073741825);
944 INSERT INTO t3 VALUES(-1073741826);
945 INSERT INTO t3 VALUES(2147483646);
946 INSERT INTO t3 VALUES(2147483647);
947 INSERT INTO t3 VALUES(2147483648);
948 INSERT INTO t3 VALUES(2147483649);
949 INSERT INTO t3 VALUES(2147483650);
950 INSERT INTO t3 VALUES(-2147483646);
951 INSERT INTO t3 VALUES(-2147483647);
952 INSERT INTO t3 VALUES(-2147483648);
953 INSERT INTO t3 VALUES(-2147483649);
954 INSERT INTO t3 VALUES(-2147483650);
955 INSERT INTO t3 VALUES(4294967294);
956 INSERT INTO t3 VALUES(4294967295);
957 INSERT INTO t3 VALUES(4294967296);
958 INSERT INTO t3 VALUES(4294967297);
959 INSERT INTO t3 VALUES(4294967298);
960 INSERT INTO t3 VALUES(-4294967294);
961 INSERT INTO t3 VALUES(-4294967295);
962 INSERT INTO t3 VALUES(-4294967296);
963 INSERT INTO t3 VALUES(-4294967297);
964 INSERT INTO t3 VALUES(-4294967298);
965 INSERT INTO t3 VALUES(8589934590);
966 INSERT INTO t3 VALUES(8589934591);
967 INSERT INTO t3 VALUES(8589934592);
968 INSERT INTO t3 VALUES(8589934593);
969 INSERT INTO t3 VALUES(8589934594);
970 INSERT INTO t3 VALUES(-8589934590);
971 INSERT INTO t3 VALUES(-8589934591);
972 INSERT INTO t3 VALUES(-8589934592);
973 INSERT INTO t3 VALUES(-8589934593);
974 INSERT INTO t3 VALUES(-8589934594);
975 INSERT INTO t3 VALUES(17179869182);
976 INSERT INTO t3 VALUES(17179869183);
977 INSERT INTO t3 VALUES(17179869184);
978 INSERT INTO t3 VALUES(17179869185);
979 INSERT INTO t3 VALUES(17179869186);
980 INSERT INTO t3 VALUES(-17179869182);
981 INSERT INTO t3 VALUES(-17179869183);
982 INSERT INTO t3 VALUES(-17179869184);
983 INSERT INTO t3 VALUES(-17179869185);
984 INSERT INTO t3 VALUES(-17179869186);
985 INSERT INTO t3 VALUES(34359738366);
986 INSERT INTO t3 VALUES(34359738367);
987 INSERT INTO t3 VALUES(34359738368);
988 INSERT INTO t3 VALUES(34359738369);
989 INSERT INTO t3 VALUES(34359738370);
990 INSERT INTO t3 VALUES(-34359738366);
991 INSERT INTO t3 VALUES(-34359738367);
992 INSERT INTO t3 VALUES(-34359738368);
993 INSERT INTO t3 VALUES(-34359738369);
994 INSERT INTO t3 VALUES(-34359738370);
995 INSERT INTO t3 VALUES(68719476734);
996 INSERT INTO t3 VALUES(68719476735);
997 INSERT INTO t3 VALUES(68719476736);
998 INSERT INTO t3 VALUES(68719476737);
999 INSERT INTO t3 VALUES(68719476738);
1000 INSERT INTO t3 VALUES(-68719476734);
1001 INSERT INTO t3 VALUES(-68719476735);
1002 INSERT INTO t3 VALUES(-68719476736);
1003 INSERT INTO t3 VALUES(-68719476737);
1004 INSERT INTO t3 VALUES(-68719476738);
1005 INSERT INTO t3 VALUES(137438953470);
1006 INSERT INTO t3 VALUES(137438953471);
1007 INSERT INTO t3 VALUES(137438953472);
1008 INSERT INTO t3 VALUES(137438953473);
1009 INSERT INTO t3 VALUES(137438953474);
1010 INSERT INTO t3 VALUES(-137438953470);
1011 INSERT INTO t3 VALUES(-137438953471);
1012 INSERT INTO t3 VALUES(-137438953472);
1013 INSERT INTO t3 VALUES(-137438953473);
1014 INSERT INTO t3 VALUES(-137438953474);
1015 INSERT INTO t3 VALUES(274877906942);
1016 INSERT INTO t3 VALUES(274877906943);
1017 INSERT INTO t3 VALUES(274877906944);
1018 INSERT INTO t3 VALUES(274877906945);
1019 INSERT INTO t3 VALUES(274877906946);
1020 INSERT INTO t3 VALUES(-274877906942);
1021 INSERT INTO t3 VALUES(-274877906943);
1022 INSERT INTO t3 VALUES(-274877906944);
1023 INSERT INTO t3 VALUES(-274877906945);
1024 INSERT INTO t3 VALUES(-274877906946);
1025 INSERT INTO t3 VALUES(549755813886);
1026 INSERT INTO t3 VALUES(549755813887);
1027 INSERT INTO t3 VALUES(549755813888);
1028 INSERT INTO t3 VALUES(549755813889);
1029 INSERT INTO t3 VALUES(549755813890);
1030 INSERT INTO t3 VALUES(-549755813886);
1031 INSERT INTO t3 VALUES(-549755813887);
1032 INSERT INTO t3 VALUES(-549755813888);
1033 INSERT INTO t3 VALUES(-549755813889);
1034 INSERT INTO t3 VALUES(-549755813890);
1035 INSERT INTO t3 VALUES(1099511627774);
1036 INSERT INTO t3 VALUES(1099511627775);
1037 INSERT INTO t3 VALUES(1099511627776);
1038 INSERT INTO t3 VALUES(1099511627777);
1039 INSERT INTO t3 VALUES(1099511627778);
1040 INSERT INTO t3 VALUES(-1099511627774);
1041 INSERT INTO t3 VALUES(-1099511627775);
1042 INSERT INTO t3 VALUES(-1099511627776);
1043 INSERT INTO t3 VALUES(-1099511627777);
1044 INSERT INTO t3 VALUES(-1099511627778);
1045 INSERT INTO t3 VALUES(2199023255550);
1046 INSERT INTO t3 VALUES(2199023255551);
1047 INSERT INTO t3 VALUES(2199023255552);
1048 INSERT INTO t3 VALUES(2199023255553);
1049 INSERT INTO t3 VALUES(2199023255554);
1050 INSERT INTO t3 VALUES(-2199023255550);
1051 INSERT INTO t3 VALUES(-2199023255551);
1052 INSERT INTO t3 VALUES(-2199023255552);
1053 INSERT INTO t3 VALUES(-2199023255553);
1054 INSERT INTO t3 VALUES(-2199023255554);
1055 INSERT INTO t3 VALUES(4398046511102);
1056 INSERT INTO t3 VALUES(4398046511103);
1057 INSERT INTO t3 VALUES(4398046511104);
1058 INSERT INTO t3 VALUES(4398046511105);
1059 INSERT INTO t3 VALUES(4398046511106);
1060 INSERT INTO t3 VALUES(-4398046511102);
1061 INSERT INTO t3 VALUES(-4398046511103);
1062 INSERT INTO t3 VALUES(-4398046511104);
1063 INSERT INTO t3 VALUES(-4398046511105);
1064 INSERT INTO t3 VALUES(-4398046511106);
1065 INSERT INTO t3 VALUES(8796093022206);
1066 INSERT INTO t3 VALUES(8796093022207);
1067 INSERT INTO t3 VALUES(8796093022208);
1068 INSERT INTO t3 VALUES(8796093022209);
1069 INSERT INTO t3 VALUES(8796093022210);
1070 INSERT INTO t3 VALUES(-8796093022206);
1071 INSERT INTO t3 VALUES(-8796093022207);
1072 INSERT INTO t3 VALUES(-8796093022208);
1073 INSERT INTO t3 VALUES(-8796093022209);
1074 INSERT INTO t3 VALUES(-8796093022210);
1075 INSERT INTO t3 VALUES(17592186044414);
1076 INSERT INTO t3 VALUES(17592186044415);
1077 INSERT INTO t3 VALUES(17592186044416);
1078 INSERT INTO t3 VALUES(17592186044417);
1079 INSERT INTO t3 VALUES(17592186044418);
1080 INSERT INTO t3 VALUES(-17592186044414);
1081 INSERT INTO t3 VALUES(-17592186044415);
1082 INSERT INTO t3 VALUES(-17592186044416);
1083 INSERT INTO t3 VALUES(-17592186044417);
1084 INSERT INTO t3 VALUES(-17592186044418);
1085 INSERT INTO t3 VALUES(35184372088830);
1086 INSERT INTO t3 VALUES(35184372088831);
1087 INSERT INTO t3 VALUES(35184372088832);
1088 INSERT INTO t3 VALUES(35184372088833);
1089 INSERT INTO t3 VALUES(35184372088834);
1090 INSERT INTO t3 VALUES(-35184372088830);
1091 INSERT INTO t3 VALUES(-35184372088831);
1092 INSERT INTO t3 VALUES(-35184372088832);
1093 INSERT INTO t3 VALUES(-35184372088833);
1094 INSERT INTO t3 VALUES(-35184372088834);
1095 INSERT INTO t3 VALUES(70368744177662);
1096 INSERT INTO t3 VALUES(70368744177663);
1097 INSERT INTO t3 VALUES(70368744177664);
1098 INSERT INTO t3 VALUES(70368744177665);
1099 INSERT INTO t3 VALUES(70368744177666);
1100 INSERT INTO t3 VALUES(-70368744177662);
1101 INSERT INTO t3 VALUES(-70368744177663);
1102 INSERT INTO t3 VALUES(-70368744177664);
1103 INSERT INTO t3 VALUES(-70368744177665);
1104 INSERT INTO t3 VALUES(-70368744177666);
1105 INSERT INTO t3 VALUES(140737488355326);
1106 INSERT INTO t3 VALUES(140737488355327);
1107 INSERT INTO t3 VALUES(140737488355328);
1108 INSERT INTO t3 VALUES(140737488355329);
1109 INSERT INTO t3 VALUES(140737488355330);
1110 INSERT INTO t3 VALUES(-140737488355326);
1111 INSERT INTO t3 VALUES(-140737488355327);
1112 INSERT INTO t3 VALUES(-140737488355328);
1113 INSERT INTO t3 VALUES(-140737488355329);
1114 INSERT INTO t3 VALUES(-140737488355330);
1115 INSERT INTO t3 VALUES(281474976710654);
1116 INSERT INTO t3 VALUES(281474976710655);
1117 INSERT INTO t3 VALUES(281474976710656);
1118 INSERT INTO t3 VALUES(281474976710657);
1119 INSERT INTO t3 VALUES(281474976710658);
1120 INSERT INTO t3 VALUES(-281474976710654);
1121 INSERT INTO t3 VALUES(-281474976710655);
1122 INSERT INTO t3 VALUES(-281474976710656);
1123 INSERT INTO t3 VALUES(-281474976710657);
1124 INSERT INTO t3 VALUES(-281474976710658);
1125 INSERT INTO t3 VALUES(562949953421310);
1126 INSERT INTO t3 VALUES(562949953421311);
1127 INSERT INTO t3 VALUES(562949953421312);
1128 INSERT INTO t3 VALUES(562949953421313);
1129 INSERT INTO t3 VALUES(562949953421314);
1130 INSERT INTO t3 VALUES(-562949953421310);
1131 INSERT INTO t3 VALUES(-562949953421311);
1132 INSERT INTO t3 VALUES(-562949953421312);
1133 INSERT INTO t3 VALUES(-562949953421313);
1134 INSERT INTO t3 VALUES(-562949953421314);
1135 INSERT INTO t3 VALUES(1125899906842622);
1136 INSERT INTO t3 VALUES(1125899906842623);
1137 INSERT INTO t3 VALUES(1125899906842624);
1138 INSERT INTO t3 VALUES(1125899906842625);
1139 INSERT INTO t3 VALUES(1125899906842626);
1140 INSERT INTO t3 VALUES(-1125899906842622);
1141 INSERT INTO t3 VALUES(-1125899906842623);
1142 INSERT INTO t3 VALUES(-1125899906842624);
1143 INSERT INTO t3 VALUES(-1125899906842625);
1144 INSERT INTO t3 VALUES(-1125899906842626);
1145 INSERT INTO t3 VALUES(2251799813685246);
1146 INSERT INTO t3 VALUES(2251799813685247);
1147 INSERT INTO t3 VALUES(2251799813685248);
1148 INSERT INTO t3 VALUES(2251799813685249);
1149 INSERT INTO t3 VALUES(2251799813685250);
1150 INSERT INTO t3 VALUES(-2251799813685246);
1151 INSERT INTO t3 VALUES(-2251799813685247);
1152 INSERT INTO t3 VALUES(-2251799813685248);
1153 INSERT INTO t3 VALUES(-2251799813685249);
1154 INSERT INTO t3 VALUES(-2251799813685250);
1155 INSERT INTO t3 VALUES(4503599627370494);
1156 INSERT INTO t3 VALUES(4503599627370495);
1157 INSERT INTO t3 VALUES(4503599627370496);
1158 INSERT INTO t3 VALUES(4503599627370497);
1159 INSERT INTO t3 VALUES(4503599627370498);
1160 INSERT INTO t3 VALUES(-4503599627370494);
1161 INSERT INTO t3 VALUES(-4503599627370495);
1162 INSERT INTO t3 VALUES(-4503599627370496);
1163 INSERT INTO t3 VALUES(-4503599627370497);
1164 INSERT INTO t3 VALUES(-4503599627370498);
1165 INSERT INTO t3 VALUES(9007199254740990);
1166 INSERT INTO t3 VALUES(9007199254740991);
1167 INSERT INTO t3 VALUES(9007199254740992);
1168 INSERT INTO t3 VALUES(9007199254740993);
1169 INSERT INTO t3 VALUES(9007199254740994);
1170 INSERT INTO t3 VALUES(-9007199254740990);
1171 INSERT INTO t3 VALUES(-9007199254740991);
1172 INSERT INTO t3 VALUES(-9007199254740992);
1173 INSERT INTO t3 VALUES(-9007199254740993);
1174 INSERT INTO t3 VALUES(-9007199254740994);
1175 INSERT INTO t3 VALUES(18014398509481982);
1176 INSERT INTO t3 VALUES(18014398509481983);
1177 INSERT INTO t3 VALUES(18014398509481984);
1178 INSERT INTO t3 VALUES(18014398509481985);
1179 INSERT INTO t3 VALUES(18014398509481986);
1180 INSERT INTO t3 VALUES(-18014398509481982);
1181 INSERT INTO t3 VALUES(-18014398509481983);
1182 INSERT INTO t3 VALUES(-18014398509481984);
1183 INSERT INTO t3 VALUES(-18014398509481985);
1184 INSERT INTO t3 VALUES(-18014398509481986);
1185 INSERT INTO t3 VALUES(36028797018963966);
1186 INSERT INTO t3 VALUES(36028797018963967);
1187 INSERT INTO t3 VALUES(36028797018963968);
1188 INSERT INTO t3 VALUES(36028797018963969);
1189 INSERT INTO t3 VALUES(36028797018963970);
1190 INSERT INTO t3 VALUES(-36028797018963966);
1191 INSERT INTO t3 VALUES(-36028797018963967);
1192 INSERT INTO t3 VALUES(-36028797018963968);
1193 INSERT INTO t3 VALUES(-36028797018963969);
1194 INSERT INTO t3 VALUES(-36028797018963970);
1195 INSERT INTO t3 VALUES(72057594037927934);
1196 INSERT INTO t3 VALUES(72057594037927935);
1197 INSERT INTO t3 VALUES(72057594037927936);
1198 INSERT INTO t3 VALUES(72057594037927937);
1199 INSERT INTO t3 VALUES(72057594037927938);
1200 INSERT INTO t3 VALUES(-72057594037927934);
1201 INSERT INTO t3 VALUES(-72057594037927935);
1202 INSERT INTO t3 VALUES(-72057594037927936);
1203 INSERT INTO t3 VALUES(-72057594037927937);
1204 INSERT INTO t3 VALUES(-72057594037927938);
1205 INSERT INTO t3 VALUES(144115188075855870);
1206 INSERT INTO t3 VALUES(144115188075855871);
1207 INSERT INTO t3 VALUES(144115188075855872);
1208 INSERT INTO t3 VALUES(144115188075855873);
1209 INSERT INTO t3 VALUES(144115188075855874);
1210 INSERT INTO t3 VALUES(-144115188075855870);
1211 INSERT INTO t3 VALUES(-144115188075855871);
1212 INSERT INTO t3 VALUES(-144115188075855872);
1213 INSERT INTO t3 VALUES(-144115188075855873);
1214 INSERT INTO t3 VALUES(-144115188075855874);
1215 INSERT INTO t3 VALUES(288230376151711742);
1216 INSERT INTO t3 VALUES(288230376151711743);
1217 INSERT INTO t3 VALUES(288230376151711744);
1218 INSERT INTO t3 VALUES(288230376151711745);
1219 INSERT INTO t3 VALUES(288230376151711746);
1220 INSERT INTO t3 VALUES(-288230376151711742);
1221 INSERT INTO t3 VALUES(-288230376151711743);
1222 INSERT INTO t3 VALUES(-288230376151711744);
1223 INSERT INTO t3 VALUES(-288230376151711745);
1224 INSERT INTO t3 VALUES(-288230376151711746);
1225 INSERT INTO t3 VALUES(576460752303423486);
1226 INSERT INTO t3 VALUES(576460752303423487);
1227 INSERT INTO t3 VALUES(576460752303423488);
1228 INSERT INTO t3 VALUES(576460752303423489);
1229 INSERT INTO t3 VALUES(576460752303423490);
1230 INSERT INTO t3 VALUES(-576460752303423486);
1231 INSERT INTO t3 VALUES(-576460752303423487);
1232 INSERT INTO t3 VALUES(-576460752303423488);
1233 INSERT INTO t3 VALUES(-576460752303423489);
1234 INSERT INTO t3 VALUES(-576460752303423490);
1235 INSERT INTO t3 VALUES(1152921504606846974);
1236 INSERT INTO t3 VALUES(1152921504606846975);
1237 INSERT INTO t3 VALUES(1152921504606846976);
1238 INSERT INTO t3 VALUES(1152921504606846977);
1239 INSERT INTO t3 VALUES(1152921504606846978);
1240 INSERT INTO t3 VALUES(-1152921504606846974);
1241 INSERT INTO t3 VALUES(-1152921504606846975);
1242 INSERT INTO t3 VALUES(-1152921504606846976);
1243 INSERT INTO t3 VALUES(-1152921504606846977);
1244 INSERT INTO t3 VALUES(-1152921504606846978);
1245 INSERT INTO t3 VALUES(2305843009213693950);
1246 INSERT INTO t3 VALUES(2305843009213693951);
1247 INSERT INTO t3 VALUES(2305843009213693952);
1248 INSERT INTO t3 VALUES(2305843009213693953);
1249 INSERT INTO t3 VALUES(2305843009213693954);
1250 INSERT INTO t3 VALUES(-2305843009213693950);
1251 INSERT INTO t3 VALUES(-2305843009213693951);
1252 INSERT INTO t3 VALUES(-2305843009213693952);
1253 INSERT INTO t3 VALUES(-2305843009213693953);
1254 INSERT INTO t3 VALUES(-2305843009213693954);
1255 INSERT INTO t3 VALUES(4611686018427387902);
1256 INSERT INTO t3 VALUES(4611686018427387903);
1257 INSERT INTO t3 VALUES(4611686018427387904);
1258 INSERT INTO t3 VALUES(4611686018427387905);
1259 INSERT INTO t3 VALUES(4611686018427387906);
1260 INSERT INTO t3 VALUES(-4611686018427387902);
1261 INSERT INTO t3 VALUES(-4611686018427387903);
1262 INSERT INTO t3 VALUES(-4611686018427387904);
1263 INSERT INTO t3 VALUES(-4611686018427387905);
1264 INSERT INTO t3 VALUES(-4611686018427387906);
1265 INSERT INTO t3 VALUES(9223372036854775806);
1266 INSERT INTO t3 VALUES(9223372036854775807);
1267 INSERT INTO t3 VALUES(-9223372036854775806);
1268 INSERT INTO t3 VALUES(-9223372036854775807);
1269 INSERT INTO t3 VALUES(-9223372036854775808);
1270 SELECT x FROM t3 ORDER BY x;
1272 } {-9223372036854775808\
1273 -9223372036854775807\
1274 -9223372036854775806\
1275 -4611686018427387906\
1276 -4611686018427387905\
1277 -4611686018427387904\
1278 -4611686018427387903\
1279 -4611686018427387902\
1280 -2305843009213693954\
1281 -2305843009213693953\
1282 -2305843009213693952\
1283 -2305843009213693951\
1284 -2305843009213693950\
1285 -1152921504606846978\
1286 -1152921504606846977\
1287 -1152921504606846976\
1288 -1152921504606846975\
1289 -1152921504606846974\
1290 -576460752303423490\
1291 -576460752303423489\
1292 -576460752303423488\
1293 -576460752303423487\
1294 -576460752303423486\
1295 -288230376151711746\
1296 -288230376151711745\
1297 -288230376151711744\
1298 -288230376151711743\
1299 -288230376151711742\
1300 -144115188075855874\
1301 -144115188075855873\
1302 -144115188075855872\
1303 -144115188075855871\
1304 -144115188075855870\
1877 1152921504606846974\
1878 1152921504606846975\
1879 1152921504606846976\
1880 1152921504606846977\
1881 1152921504606846978\
1882 2305843009213693950\
1883 2305843009213693951\
1884 2305843009213693952\
1885 2305843009213693953\
1886 2305843009213693954\
1887 4611686018427387902\
1888 4611686018427387903\
1889 4611686018427387904\
1890 4611686018427387905\
1891 4611686018427387906\
1892 9223372036854775806\
1893 9223372036854775807}