1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
# name: test/optimizer/compare_blob.test
# description: Test case simplification
# group: [optimizer]
statement ok
CREATE TABLE t1(c0 BLOB);
statement ok
CREATE TABLE t0(c0 BIT);
statement ok
INSERT INTO t0(c0) VALUES (0);
statement ok
INSERT INTO t0(c0) VALUES (1);
statement ok
INSERT INTO t0(c0) VALUES (2);
statement ok
INSERT INTO t0(c0) VALUES (3);
statement ok
INSERT INTO t0(c0) VALUES (4);
statement ok
INSERT INTO t0(c0) VALUES (5);
statement ok
INSERT INTO t1(c0) VALUES (X'41');
statement ok
INSERT INTO t1(c0) VALUES ( X'123456');
statement ok
INSERT INTO t1(c0) VALUES ('2119350449');
statement ok
INSERT INTO t1(c0) VALUES ( X'48656C6C6F');
statement ok
INSERT INTO t1(c0) VALUES (E'\\xabcd');
statement ok
INSERT INTO t1(c0) VALUES (CAST('' AS BLOB));
query III
SELECT t0.c0, t1.c0, (t1.c0)>=(CAST(t0.c0 AS BLOB)) FROM t0, t1 WHERE ((t1.c0)>=(CAST(t0.c0 AS BLOB))) ORDER BY ALL;
----
00000000000000000000000000000000 2119350449 1
00000000000000000000000000000000 x123456 1
00000000000000000000000000000000 x41 1
00000000000000000000000000000000 x48656C6C6F 1
00000000000000000000000000000000 \xABcd 1
00000000000000000000000000000001 2119350449 1
00000000000000000000000000000001 x123456 1
00000000000000000000000000000001 x41 1
00000000000000000000000000000001 x48656C6C6F 1
00000000000000000000000000000001 \xABcd 1
00000000000000000000000000000010 2119350449 1
00000000000000000000000000000010 x123456 1
00000000000000000000000000000010 x41 1
00000000000000000000000000000010 x48656C6C6F 1
00000000000000000000000000000010 \xABcd 1
00000000000000000000000000000011 2119350449 1
00000000000000000000000000000011 x123456 1
00000000000000000000000000000011 x41 1
00000000000000000000000000000011 x48656C6C6F 1
00000000000000000000000000000011 \xABcd 1
00000000000000000000000000000100 2119350449 1
00000000000000000000000000000100 x123456 1
00000000000000000000000000000100 x41 1
00000000000000000000000000000100 x48656C6C6F 1
00000000000000000000000000000100 \xABcd 1
00000000000000000000000000000101 2119350449 1
00000000000000000000000000000101 x123456 1
00000000000000000000000000000101 x41 1
00000000000000000000000000000101 x48656C6C6F 1
00000000000000000000000000000101 \xABcd 1
## original issue
statement ok
CREATE OR REPLACE TABLE t1(c0 BLOB);
statement ok
CREATE OR REPLACE TABLE t0(c0 BIT);
statement ok
CREATE OR REPLACE VIEW v0(c0) AS SELECT 1 FROM t1, t0 GROUP BY t0.c0;
statement ok
INSERT INTO t0(c0) VALUES ( NULL);
statement ok
INSERT INTO t0(c0) VALUES (0);
statement ok
INSERT INTO t0(c0) VALUES ( 1);
statement ok
INSERT INTO t1(c0) VALUES (X'41');
statement ok
INSERT INTO t1(c0) VALUES ( X'123456');
statement ok
INSERT INTO t1(c0) VALUES ('2119350449');
statement ok
INSERT INTO t1(c0) VALUES ( X'48656C6C6F');
statement ok
INSERT INTO t1(c0) VALUES (E'\\xabcd');
statement ok
INSERT INTO t1(c0) VALUES (CAST('' AS BLOB));
query III
SELECT t0.c0, t1.c0, (t1.c0)>=(CAST(t0.c0 AS BLOB)) FROM t0, v0, t1 WHERE ((t1.c0)>=(CAST(t0.c0 AS BLOB))) ORDER BY ALL
----
00000000000000000000000000000000 2119350449 true
00000000000000000000000000000000 2119350449 true
00000000000000000000000000000000 2119350449 true
00000000000000000000000000000000 x123456 true
00000000000000000000000000000000 x123456 true
00000000000000000000000000000000 x123456 true
00000000000000000000000000000000 x41 true
00000000000000000000000000000000 x41 true
00000000000000000000000000000000 x41 true
00000000000000000000000000000000 x48656C6C6F true
00000000000000000000000000000000 x48656C6C6F true
00000000000000000000000000000000 x48656C6C6F true
00000000000000000000000000000000 \xABcd true
00000000000000000000000000000000 \xABcd true
00000000000000000000000000000000 \xABcd true
00000000000000000000000000000001 2119350449 true
00000000000000000000000000000001 2119350449 true
00000000000000000000000000000001 2119350449 true
00000000000000000000000000000001 x123456 true
00000000000000000000000000000001 x123456 true
00000000000000000000000000000001 x123456 true
00000000000000000000000000000001 x41 true
00000000000000000000000000000001 x41 true
00000000000000000000000000000001 x41 true
00000000000000000000000000000001 x48656C6C6F true
00000000000000000000000000000001 x48656C6C6F true
00000000000000000000000000000001 x48656C6C6F true
00000000000000000000000000000001 \xABcd true
00000000000000000000000000000001 \xABcd true
00000000000000000000000000000001 \xABcd true
|