should be it
This commit is contained in:
35
external/duckdb/test/issues/rigger/assertion_scale.test
vendored
Normal file
35
external/duckdb/test/issues/rigger/assertion_scale.test
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
# name: test/issues/rigger/assertion_scale.test
|
||||
# description: SQLancer bug that detected an assertion triggered in type scale
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 DOUBLE, c1 DOUBLE);;
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.0,-1570504255.0);
|
||||
|
||||
statement error
|
||||
CREATE VIEW v0(c0, c1) AS SELECT 888938716, '' FROM t0 GROUP BY t0.rowid, t0.rowid, t0.c1 ORDER BY 0.9507538105182436 OFFSET 686929302;
|
||||
----
|
||||
ORDER BY non-integer literal has no effect
|
||||
|
||||
statement ok
|
||||
SET order_by_non_integer_literal=true
|
||||
|
||||
statement ok
|
||||
CREATE VIEW v0(c0, c1) AS SELECT 888938716, '' FROM t0 GROUP BY t0.rowid, t0.rowid, t0.c1 ORDER BY 0.9507538105182436 OFFSET 686929302;
|
||||
|
||||
statement ok
|
||||
COMMIT;
|
||||
|
||||
statement ok
|
||||
SELECT MAX(agg0) FROM (SELECT MAX(v0.c1) AS agg0 FROM v0, t0 WHERE ((((UNICODE('b횐')) IS NOT NULL))AND((- ((0.8179740556303334)*(0.5235330721055326))))) UNION ALL SELECT MAX(v0.c1) AS agg0 FROM v0, t0 WHERE (NOT ((((UNICODE('b횐')) IS NOT NULL))AND((- ((0.8179740556303334)*(0.5235330721055326)))))) UNION ALL SELECT MAX(v0.c1) AS agg0 FROM v0, t0 WHERE ((((((UNICODE('b횐')) IS NOT NULL))AND((- ((0.8179740556303334)*(0.5235330721055326)))))) IS NULL)) as asdf;
|
||||
|
||||
|
||||
|
||||
16
external/duckdb/test/issues/rigger/big_sum_cast_bug.test
vendored
Normal file
16
external/duckdb/test/issues/rigger/big_sum_cast_bug.test
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
# name: test/issues/rigger/big_sum_cast_bug.test
|
||||
# description: SQLancer bug that detected an error in casting of the result of a sum to double
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
query I
|
||||
SELECT SUM(-9223372036854775808)::DOUBLE AS agg0 FROM (VALUES (0), (1)) t1;
|
||||
----
|
||||
-18446744073709551616
|
||||
|
||||
query I
|
||||
SELECT SUM(-9223372036854775808) AS agg0 FROM (VALUES (0), (1)) t1;
|
||||
----
|
||||
-18446744073709551616
|
||||
19
external/duckdb/test/issues/rigger/collate_union.test
vendored
Normal file
19
external/duckdb/test/issues/rigger/collate_union.test
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# name: test/issues/rigger/collate_union.test
|
||||
# description: SQLancer bug that detected an error in collations combined with union
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
SET default_null_order='nulls_first';
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 BIGINT, c1 SMALLINT, c2 VARCHAR COLLATE NOACCENT);
|
||||
|
||||
statement ok
|
||||
insert into t0 values (0, 1, NULL), (0, 0, '0.5652217975848206'), (0, 3, 'false');
|
||||
|
||||
query II
|
||||
SELECT t0.c0, t0.c2 FROM t0 WHERE t0.c1 UNION SELECT t0.c0, t0.c2 FROM t0 WHERE (NOT t0.c1) UNION SELECT t0.c0, t0.c2 FROM t0 WHERE ((t0.c1) IS NULL) ORDER BY 1, 2;
|
||||
----
|
||||
0 NULL
|
||||
0 0.5652217975848206
|
||||
0 false
|
||||
52
external/duckdb/test/issues/rigger/complex_division.test
vendored
Normal file
52
external/duckdb/test/issues/rigger/complex_division.test
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# name: test/issues/rigger/complex_division.test
|
||||
# description: Division in complex operation
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
SET ieee_floating_point_ops=false;
|
||||
|
||||
statement ok
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 DOUBLE, c1 TINYINT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.5,0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.5,1);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.5,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.5,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.5,NULL);
|
||||
|
||||
statement ok
|
||||
COMMIT;
|
||||
|
||||
query II
|
||||
SELECT c0, c1 FROM t0;
|
||||
----
|
||||
0.5 0
|
||||
0.5 1
|
||||
0.5 NULL
|
||||
0.5 NULL
|
||||
0.5 NULL
|
||||
|
||||
|
||||
query III
|
||||
SELECT c0, c1, ((t0.c0)::varchar!~(((t0.c0)/(t0.c1)))::varchar) FROM t0;
|
||||
----
|
||||
0.5 0 NULL
|
||||
0.5 1 false
|
||||
0.5 NULL NULL
|
||||
0.5 NULL NULL
|
||||
0.5 NULL NULL
|
||||
14
external/duckdb/test/issues/rigger/date_get_value.test
vendored
Normal file
14
external/duckdb/test/issues/rigger/date_get_value.test
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
# name: test/issues/rigger/date_get_value.test
|
||||
# description: SQLancer bug that detected an error with "GetValue" not being supported for the Date type
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 BOOLEAN, c1 TINYINT, PRIMARY KEY(c1, c0));
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (false, 1);
|
||||
|
||||
statement error
|
||||
SELECT t0.c0, t0.c1 FROM t0 WHERE REVERSE((CASE 0.020672069925445347 WHEN (((DATE '1970-01-18')+(t0.c1)) NOT BETWEEN t0.c0 AND DATE '1970-01-10') THEN t0.c1 ELSE t0.c1 END )) GROUP BY t0.c0, t0.c1 UNION SELECT t0.c0, t0.c1 FROM t0 WHERE (NOT REVERSE((CASE 0.020672069925445347 WHEN (((DATE '1970-01-18')+(t0.c1)) NOT BETWEEN t0.c0 AND DATE '1970-01-10') THEN t0.c1 ELSE t0.c1 END ))) GROUP BY t0.c0, t0.c1 UNION SELECT t0.c0, t0.c1 FROM t0 WHERE ((REVERSE((CASE 0.020672069925445347 WHEN (((DATE '1970-01-18')+(t0.c1)) NOT BETWEEN t0.c0 AND DATE '1970-01-10') THEN t0.c1 ELSE t0.c1 END ))) IS NULL) GROUP BY t0.c0, t0.c1;
|
||||
----
|
||||
Binder Error: Cannot mix values of type DATE and BOOLEAN in BETWEEN
|
||||
20
external/duckdb/test/issues/rigger/decimal_int_between.test
vendored
Normal file
20
external/duckdb/test/issues/rigger/decimal_int_between.test
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# name: test/issues/rigger/decimal_int_between.test
|
||||
# description: Issue #9825 - Missing Results when using Floating-point in BETWEEN
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c1 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c1) VALUES (-1);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c1) VALUES (5);
|
||||
|
||||
query I
|
||||
SELECT * FROM t0 WHERE (c1 BETWEEN 3.1 AND c1);
|
||||
----
|
||||
5
|
||||
18
external/duckdb/test/issues/rigger/delete_empty_result.test
vendored
Normal file
18
external/duckdb/test/issues/rigger/delete_empty_result.test
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# name: test/issues/rigger/delete_empty_result.test
|
||||
# description: SQLancer bug that detected an assertion in the query profiler when deleting with a static false condition
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_profiling
|
||||
|
||||
statement ok
|
||||
PRAGMA profile_output='__TEST_DIR__/out.log';
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INTEGER);
|
||||
|
||||
statement ok
|
||||
DELETE FROM t0 WHERE false;
|
||||
63
external/duckdb/test/issues/rigger/division_by_rowid.test
vendored
Normal file
63
external/duckdb/test/issues/rigger/division_by_rowid.test
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
# name: test/issues/rigger/division_by_rowid.test
|
||||
# description: SQLancer bug that detected an error in casting of the result of a sum to double
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 BOOLEAN);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(true);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(false);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL);
|
||||
|
||||
statement ok
|
||||
COMMIT;
|
||||
|
||||
query II
|
||||
SELECT t0.c0, t0.rowid FROM t0 WHERE ((((t0.c0) ::REAL))/(t0.rowid)) GROUP BY t0.c0, t0.rowid UNION SELECT t0.c0, t0.rowid FROM t0 WHERE (NOT ((((t0.c0) ::FLOAT4))/(t0.rowid))) GROUP BY t0.c0, t0.rowid UNION SELECT t0.c0, t0.rowid FROM t0 WHERE ((((((t0.c0) ::REAL))/(t0.rowid))) IS NULL) GROUP BY t0.c0, t0.rowid ORDER BY 2;
|
||||
----
|
||||
true 0
|
||||
false 1
|
||||
NULL 2
|
||||
NULL 3
|
||||
NULL 4
|
||||
NULL 5
|
||||
NULL 6
|
||||
NULL 7
|
||||
|
||||
query II
|
||||
SELECT t0.c0, t0.rowid FROM t0 GROUP BY t0.c0, t0.rowid ORDER BY 2;
|
||||
----
|
||||
true 0
|
||||
false 1
|
||||
NULL 2
|
||||
NULL 3
|
||||
NULL 4
|
||||
NULL 5
|
||||
NULL 6
|
||||
NULL 7
|
||||
68
external/duckdb/test/issues/rigger/division_by_zero_null.test
vendored
Normal file
68
external/duckdb/test/issues/rigger/division_by_zero_null.test
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
# name: test/issues/rigger/division_by_zero_null.test
|
||||
# description: SQLancer bug that detected an error in casting of the result of a sum to double
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
SET ieee_floating_point_ops=false;
|
||||
|
||||
statement ok
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 DOUBLE, c1 DOUBLE);;
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.0,0.0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.0,NULL);
|
||||
|
||||
statement ok
|
||||
COMMIT;
|
||||
|
||||
query II
|
||||
SELECT t0.c1, (1/t0.c1) IS NULL FROM t0;
|
||||
----
|
||||
0.0 1
|
||||
NULL 1
|
||||
|
||||
query I
|
||||
SELECT t0.c1 FROM t0 WHERE (((1/(t0.c1))) IS NULL);
|
||||
----
|
||||
0.0
|
||||
NULL
|
||||
|
||||
statement ok
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 DOUBLE);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(10000.0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(0.0);
|
||||
|
||||
statement ok
|
||||
COMMIT;
|
||||
|
||||
query II
|
||||
SELECT c0, exp(c0) IS NULL FROM t1;
|
||||
----
|
||||
10000.0 false
|
||||
0.0 false
|
||||
|
||||
query II
|
||||
SELECT c0, exp(c0) FROM t1;
|
||||
----
|
||||
10000.0 inf
|
||||
0.0 1
|
||||
|
||||
query I
|
||||
SELECT c0 FROM t1 WHERE exp(c0) IS NULL;
|
||||
----
|
||||
|
||||
31
external/duckdb/test/issues/rigger/double_bigint_cast_overflow.test
vendored
Normal file
31
external/duckdb/test/issues/rigger/double_bigint_cast_overflow.test
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
# name: test/issues/rigger/double_bigint_cast_overflow.test
|
||||
# description: SQLancer bug that detected a sanitizer trigger when casting a double to a bigint
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
query I
|
||||
select 9.2233720368547750E+18::int8;
|
||||
----
|
||||
9223372036854774784
|
||||
|
||||
statement error
|
||||
select 9.2233720368547758E+18::real::int8;
|
||||
----
|
||||
<REGEX>:Conversion Error.*FLOAT.*is out of range for.*INT64.*
|
||||
|
||||
statement error
|
||||
select 9.2233720368547758E+18::int8;
|
||||
----
|
||||
<REGEX>:Conversion Error.*DOUBLE.*is out of range for.*INT64.*
|
||||
|
||||
statement error
|
||||
select 2147483648::real::int4;
|
||||
----
|
||||
<REGEX>:Conversion Error.*FLOAT.*is out of range for.*INT32.*
|
||||
|
||||
statement error
|
||||
select 2147483648::double::int4;
|
||||
----
|
||||
<REGEX>:Conversion Error.*DOUBLE.*is out of range for.*INT32.*
|
||||
14
external/duckdb/test/issues/rigger/expression_equality_bug.test
vendored
Normal file
14
external/duckdb/test/issues/rigger/expression_equality_bug.test
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
# name: test/issues/rigger/expression_equality_bug.test
|
||||
# description: SQLancer bug that detected an error in expression equality
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 BOOLEAN DEFAULT(1168904737), c1 BOOLEAN DEFAULT(DATE '1969-12-28'), c2 DATE, PRIMARY KEY(c1, c2, c0));
|
||||
|
||||
statement error
|
||||
SELECT t0.c0 FROM t0 WHERE (((t0.rowid)SIMILAR TO(TIMESTAMP '1970-01-11 11:17:02')) BETWEEN TIMESTAMP '1970-01-11 23:34:33' AND DATE '1970-01-20') UNION ALL SELECT t0.c0 FROM t0 WHERE (NOT (((t0.rowid)SIMILAR TO(TIMESTAMP '1970-01-11 11:17:02')) BETWEEN TIMESTAMP '1970-01-11 23:34:33' AND DATE '1970-01-20')) UNION ALL SELECT t0.c0 FROM t0 WHERE (((((t0.rowid)SIMILAR TO(TIMESTAMP '1970-01-11 11:17:02')) BETWEEN TIMESTAMP '1970-01-11 23:34:33' AND DATE '1970-01-20')) IS NULL);
|
||||
----
|
||||
Binder Error: No function matches the given name and argument types 'regexp_full_match
|
||||
87
external/duckdb/test/issues/rigger/hugeint_div_by_zero.test
vendored
Normal file
87
external/duckdb/test/issues/rigger/hugeint_div_by_zero.test
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
# name: test/issues/rigger/hugeint_div_by_zero.test
|
||||
# description: Division by zero bug found by sqlancer
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 BOOLEAN UNIQUE, c1 TIMESTAMP, c2 VARCHAR, PRIMARY KEY(c1, c2, c0));;
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(true,'1970-01-01 00:00:00','1970-01-15 02:36:34');
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(false,'1969-12-08 00:00:00','');
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 INTEGER UNIQUE DEFAULT(802216568), c1 TINYINT DEFAULT(1144250857), PRIMARY KEY(c0));;
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(802216568,0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(0,0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(1144250857,0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(783586315,0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(-449051989,0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(-428785526,0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(-1699690429,0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(-790542135,0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(3,0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(2135670965,0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(-1577416079,1);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(-2059225173,0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(-2120629165,0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(1617540830,1);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(1,0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(-1412788640,1);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(-7730557,0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(715464291,1);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(15908661,1);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(-613341533,0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(-1665756361,0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(2139975183,0);
|
||||
|
||||
statement ok
|
||||
SELECT t1.c0, t1.c1, t0.c2, t0.c0, t0.c1 FROM t1, t0 WHERE (((CASE ((t1.c0)*(0.537)) WHEN 0.09857124523209415 THEN (0.915585828038032::VARCHAR IN (t0.c2)) ELSE t1.c0 END )) IS NOT NULL) GROUP BY t1.c0, t1.c1, t0.c2, t0.c0, t0.c1 UNION SELECT t1.c0, t1.c1, t0.c2, t0.c0, t0.c1 FROM t1, t0 WHERE (NOT (((CASE ((t1.c0)*(0.537)) WHEN 0.09857124523209415 THEN (0.915585828038032::VARCHAR IN (t0.c2)) ELSE t1.c0 END )) IS NOT NULL)) GROUP BY t1.c0, t1.c1, t0.c2, t0.c0, t0.c1 UNION SELECT t1.c0, t1.c1, t0.c2, t0.c0, t0.c1 FROM t1, t0 WHERE (((((CASE ((t1.c0)*(0.537)) WHEN 0.09857124523209415 THEN (0.915585828038032::VARCHAR IN (t0.c2)) ELSE t1.c0 END )) IS NOT NULL)) IS NULL) GROUP BY t1.c0, t1.c1, t0.c2, t0.c0, t0.c1 ORDER BY 1, 2, 3, 4, 5;
|
||||
29
external/duckdb/test/issues/rigger/instr_crash.test
vendored
Normal file
29
external/duckdb/test/issues/rigger/instr_crash.test
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
# name: test/issues/rigger/instr_crash.test
|
||||
# description: SQLancer bug that found a crash in the instr implementation
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t96(c0 DATE, c1 BOOLEAN, c2 DATE, PRIMARY KEY(c2));
|
||||
|
||||
statement ok
|
||||
INSERT INTO t96 VALUES('1970-01-10',true,'1969-12-31');
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 DOUBLE, c1 DOUBLE);;
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(611790088.0,1873546286.9999999999);
|
||||
|
||||
statement ok
|
||||
COMMIT;
|
||||
|
||||
statement error
|
||||
SELECT t96.c0, t0.rowid, t0.c1, t96.c2 FROM t0, t96 WHERE (TIMESTAMP '1969-12-28 13:59:01' LIKE INSTR(t0.c1, t96.c0) ESCAPE RTRIM(DATE '1969-12-23')) UNION ALL SELECT t96.c0, t0.rowid, t0.c1, t96.c2 FROM t0, t96 WHERE (NOT (TIMESTAMP '1969-12-28 13:59:01' LIKE INSTR(t0.c1, t96.c0) ESCAPE RTRIM(DATE '1969-12-23'))) UNION ALL SELECT t96.c0, t0.rowid, t0.c1, t96.c2 FROM t0, t96 WHERE (((TIMESTAMP '1969-12-28 13:59:01' LIKE INSTR(t0.c1, t96.c0) ESCAPE RTRIM(DATE '1969-12-23'))) IS NULL);
|
||||
----
|
||||
Binder Error: No function matches the given name and argument types 'instr
|
||||
24
external/duckdb/test/issues/rigger/overflow_filter_pushdown.test
vendored
Normal file
24
external/duckdb/test/issues/rigger/overflow_filter_pushdown.test
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# name: test/issues/rigger/overflow_filter_pushdown.test
|
||||
# description: Issue #9806 - Unexpected Results when using IS NOT NULL
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (1);
|
||||
|
||||
query I
|
||||
SELECT * FROM t0;
|
||||
----
|
||||
1
|
||||
|
||||
query I
|
||||
SELECT c0>=(2147483647 + 1 IS NOT NULL) FROM t0;
|
||||
----
|
||||
true
|
||||
|
||||
query I
|
||||
SELECT * FROM t0 WHERE c0>=(2147483647 + 1 IS NOT NULL);
|
||||
----
|
||||
1
|
||||
32
external/duckdb/test/issues/rigger/rowid_conjunction.test
vendored
Normal file
32
external/duckdb/test/issues/rigger/rowid_conjunction.test
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# name: test/issues/rigger/rowid_conjunction.test
|
||||
# description: SQLancer bug that detected an error in using rowid in conjunctions
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
SET default_null_order='nulls_first';
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 TINYINT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (1), (2), (3), (NULL);
|
||||
|
||||
statement error
|
||||
SELECT * FROM t0 WHERE (((0.7839485854397868 BETWEEN false AND PRINTF(((0.8341154324178778)NOT SIMILAR TO(t0.c0)), NULL, ((0.9015841357551267) ::VARCHAR), DATE '1969-12-25')))AND(t0.rowid))
|
||||
UNION
|
||||
SELECT * FROM t0 WHERE (NOT (((0.7839485854397868 BETWEEN false AND PRINTF(((0.8341154324178778)NOT SIMILAR TO(t0.c0)), NULL, ((0.9015841357551267) ::VARCHAR), DATE '1969-12-25')))AND(t0.rowid)))
|
||||
UNION
|
||||
SELECT * FROM t0 WHERE (((((0.7839485854397868 BETWEEN false AND PRINTF(((0.8341154324178778)NOT SIMILAR TO(t0.c0)), NULL, ((0.9015841357551267) ::VARCHAR), DATE '1969-12-25')))AND(t0.rowid))) IS NULL)
|
||||
ORDER BY 1
|
||||
----
|
||||
|
||||
query I
|
||||
SELECT DISTINCT * FROM t0 ORDER BY 1
|
||||
----
|
||||
NULL
|
||||
1
|
||||
2
|
||||
3
|
||||
63
external/duckdb/test/issues/rigger/rowid_in_clause.test
vendored
Normal file
63
external/duckdb/test/issues/rigger/rowid_in_clause.test
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
# name: test/issues/rigger/rowid_in_clause.test
|
||||
# description: SQLancer bug that detected an error in the IN-clause simplification when different types were used
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification;
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 VARCHAR);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 VARCHAR);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (1);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1(c0) VALUES (-1);
|
||||
|
||||
query II
|
||||
SELECT * FROM t0, t1;
|
||||
----
|
||||
1 -1
|
||||
|
||||
query II
|
||||
SELECT * FROM t0, t1 WHERE (t0.rowid IN (0.1))
|
||||
----
|
||||
|
||||
query II
|
||||
SELECT * FROM t0, t1 WHERE (NOT (t0.rowid IN (0.1)))
|
||||
----
|
||||
1 -1
|
||||
|
||||
query II
|
||||
SELECT * FROM t0, t1 WHERE (((t0.rowid IN (0.1))) IS NULL);
|
||||
----
|
||||
|
||||
query II
|
||||
SELECT * FROM t0, t1 WHERE (t0.rowid IN (0.1))
|
||||
UNION ALL
|
||||
SELECT * FROM t0, t1 WHERE (NOT (t0.rowid IN (0.1)))
|
||||
UNION ALL
|
||||
SELECT * FROM t0, t1 WHERE (((t0.rowid IN (0.1))) IS NULL);
|
||||
----
|
||||
1 -1
|
||||
|
||||
query II
|
||||
SELECT * FROM t0, t1 WHERE (t0.rowid IN (0.1::REAL))
|
||||
UNION ALL
|
||||
SELECT * FROM t0, t1 WHERE (NOT (t0.rowid IN (0.1::REAL)))
|
||||
UNION ALL
|
||||
SELECT * FROM t0, t1 WHERE (((t0.rowid IN (0.1::REAL))) IS NULL);
|
||||
----
|
||||
1 -1
|
||||
|
||||
query II
|
||||
SELECT * FROM t0, t1 WHERE (t0.rowid IN (0.1::DOUBLE))
|
||||
UNION ALL
|
||||
SELECT * FROM t0, t1 WHERE (NOT (t0.rowid IN (0.1::DOUBLE)))
|
||||
UNION ALL
|
||||
SELECT * FROM t0, t1 WHERE (((t0.rowid IN (0.1::DOUBLE))) IS NULL);
|
||||
----
|
||||
1 -1
|
||||
224
external/duckdb/test/issues/rigger/string_comparison_bug.test
vendored
Normal file
224
external/duckdb/test/issues/rigger/string_comparison_bug.test
vendored
Normal file
@@ -0,0 +1,224 @@
|
||||
# name: test/issues/rigger/string_comparison_bug.test
|
||||
# description: SQLancer bug that detected a crash in a string comparison
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 DOUBLE, c1 DOUBLE);;
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.56445951710827568792,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(1.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(-2135422585.9999999999,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(-2135422585.9999999999,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(447772980.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(447772980.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(-1279354940.9999999999,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(-1279354940.9999999999,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.3041233556253911674,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(-1488564537.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.3041233556253911674,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(-1488564537.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(159735076.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(-41207930.000000000001,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.85412575301142179551,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(159735076.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(-41207930.000000000001,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.85412575301142179551,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(1.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(1.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(1.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(1.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.24714665498347263006,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.24714665498347263006,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(1.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(1.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(1027001636.9999999999,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.070780476338306974604,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(1027001636.9999999999,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.070780476338306974604,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.68074926568589144704,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.68713929665075657027,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.57829020330205271882,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.68074926568589144704,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.68713929665075657027,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.57829020330205271882,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(1.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(1.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(1.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(1.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.0,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(1974405738.9999999999,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.20733323620582655433,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(1974405738.9999999999,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.20733323620582655433,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(-65407698.000000000001,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(-65407698.000000000001,NULL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,NULL);
|
||||
|
||||
statement ok
|
||||
COMMIT;
|
||||
|
||||
statement ok
|
||||
SELECT * FROM t0 WHERE (('NN')<((t0.rowid NOT IN (t0.c1)))::VARCHAR);
|
||||
|
||||
statement ok
|
||||
PRAGMA disable_verification
|
||||
|
||||
statement ok
|
||||
PRAGMA disable_optimizer
|
||||
|
||||
statement error
|
||||
SELECT * FROM t0 WHERE (('NN')<((t0.rowid NOT IN (t0.c1))));
|
||||
----
|
||||
Conversion Error: Could not convert string 'NN' to BOOL
|
||||
18
external/duckdb/test/issues/rigger/test_10087.test
vendored
Normal file
18
external/duckdb/test/issues/rigger/test_10087.test
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# name: test/issues/rigger/test_10087.test
|
||||
# description: SQLancer bug that detected an issue with the column lifetime analyzer
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c1 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c1) VALUES (1);
|
||||
|
||||
statement ok
|
||||
CREATE VIEW v0(c0, c1, c2) AS SELECT '1', true, t0.c1 FROM t0 ORDER BY -1-2 LIMIT 2;
|
||||
|
||||
statement ok
|
||||
SELECT v0.c2 FROM v0 WHERE (NOT (v0.c1 IS NOT NULL));
|
||||
20
external/duckdb/test/issues/rigger/test_1224.test
vendored
Normal file
20
external/duckdb/test/issues/rigger/test_1224.test
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# name: test/issues/rigger/test_1224.test
|
||||
# description: SQLancer bug that detected an error in casting of the result of a sum to double
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (-1);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (0);
|
||||
|
||||
query I
|
||||
SELECT * FROM t0 WHERE t0.c0::BOOL = true; -- expected: {-1}, actual: {}
|
||||
----
|
||||
-1
|
||||
28
external/duckdb/test/issues/rigger/test_489.test
vendored
Normal file
28
external/duckdb/test/issues/rigger/test_489.test
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# name: test/issues/rigger/test_489.test
|
||||
# description: Issue 489
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# A predicate NOT(NULL OR TRUE) unexpectedly evaluates to TRUE
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (0);
|
||||
|
||||
query I
|
||||
SELECT * FROM t0 WHERE NOT(NULL OR TRUE);
|
||||
----
|
||||
|
||||
query T
|
||||
SELECT NULL OR TRUE;
|
||||
----
|
||||
1
|
||||
|
||||
query T
|
||||
SELECT NOT(NULL OR TRUE);
|
||||
----
|
||||
0
|
||||
|
||||
18
external/duckdb/test/issues/rigger/test_490.test
vendored
Normal file
18
external/duckdb/test/issues/rigger/test_490.test
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# name: test/issues/rigger/test_490.test
|
||||
# description: Issue 490
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# A comparison column=column unexpectedly evaluates to TRUE for column=NULL
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (NULL);
|
||||
|
||||
query I
|
||||
SELECT * FROM t0 WHERE c0 = c0;
|
||||
----
|
||||
|
||||
19
external/duckdb/test/issues/rigger/test_491.test
vendored
Normal file
19
external/duckdb/test/issues/rigger/test_491.test
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# name: test/issues/rigger/test_491.test
|
||||
# description: Issue 491
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# PRAGMA table_info provides no output
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
PRAGMA table_info('t0');
|
||||
|
||||
query ITTTTT
|
||||
SELECT * FROM pragma_table_info('t0');
|
||||
----
|
||||
0 c0 INTEGER 0 NULL 0
|
||||
|
||||
13
external/duckdb/test/issues/rigger/test_493.test
vendored
Normal file
13
external/duckdb/test/issues/rigger/test_493.test
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# name: test/issues/rigger/test_493.test
|
||||
# description: Issue 493
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# SIMILAR TO results in an 'Unknown error -1'
|
||||
query T
|
||||
SELECT '' SIMILAR TO '';
|
||||
----
|
||||
1
|
||||
|
||||
38
external/duckdb/test/issues/rigger/test_495.test
vendored
Normal file
38
external/duckdb/test/issues/rigger/test_495.test
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# name: test/issues/rigger/test_495.test
|
||||
# description: Issue 495
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Comparison on UNIQUE NUMERIC column causes a query to omit a row in the result set
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 DOUBLE UNIQUE);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (1163404482), (0), (488566);
|
||||
|
||||
query R
|
||||
SELECT * FROM t0 WHERE c0 > 0.1 ORDER BY 1;
|
||||
----
|
||||
488566.000000
|
||||
1163404482.000000
|
||||
|
||||
query R
|
||||
SELECT * FROM t0 WHERE c0 >= 0.1 ORDER BY 1;
|
||||
----
|
||||
488566.000000
|
||||
1163404482.000000
|
||||
|
||||
query R
|
||||
SELECT * FROM t0 WHERE 0.1 < c0 ORDER BY 1;
|
||||
----
|
||||
488566.000000
|
||||
1163404482.000000
|
||||
|
||||
query R
|
||||
SELECT * FROM t0 WHERE 0.1 <= c0 ORDER BY 1;
|
||||
----
|
||||
488566.000000
|
||||
1163404482.000000
|
||||
|
||||
25
external/duckdb/test/issues/rigger/test_497.test
vendored
Normal file
25
external/duckdb/test/issues/rigger/test_497.test
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# name: test/issues/rigger/test_497.test
|
||||
# description: Issue 497
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Comparison of two boolean columns in different tables results in an error 'Not implemented: Unimplemented
|
||||
# type for sort'
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 BOOL);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 BOOL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1(c0) VALUES (0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (0);
|
||||
|
||||
query T
|
||||
SELECT t0.c0 FROM t0, t1 WHERE t1.c0 < t0.c0;
|
||||
----
|
||||
|
||||
18
external/duckdb/test/issues/rigger/test_503.test
vendored
Normal file
18
external/duckdb/test/issues/rigger/test_503.test
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# name: test/issues/rigger/test_503.test
|
||||
# description: Issue 503
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# RIGHT JOIN with a predicate that compares two integer columns results in an 'Unhandled type' error
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 INT);
|
||||
|
||||
query II
|
||||
SELECT * FROM t0 RIGHT JOIN t1 ON t0.c0!=t1.c0;
|
||||
----
|
||||
|
||||
19
external/duckdb/test/issues/rigger/test_504.test
vendored
Normal file
19
external/duckdb/test/issues/rigger/test_504.test
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# name: test/issues/rigger/test_504.test
|
||||
# description: Issue 504
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# INSERT results in an error 'Not implemented: Cannot create data from this type'
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 BOOLEAN, c1 INT, PRIMARY KEY(c0, c1));
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c1, c0) VALUES (0, 0);
|
||||
|
||||
query TI
|
||||
SELECT * FROM t0;
|
||||
----
|
||||
0 0
|
||||
|
||||
21
external/duckdb/test/issues/rigger/test_505.test
vendored
Normal file
21
external/duckdb/test/issues/rigger/test_505.test
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# name: test/issues/rigger/test_505.test
|
||||
# description: Issue 505
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# A RIGHT JOIN unexpectedly fetches rows
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c1 BOOLEAN);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (1);
|
||||
|
||||
query IT
|
||||
SELECT * FROM t0 RIGHT JOIN t1 on true;
|
||||
----
|
||||
|
||||
22
external/duckdb/test/issues/rigger/test_506.test
vendored
Normal file
22
external/duckdb/test/issues/rigger/test_506.test
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
# name: test/issues/rigger/test_506.test
|
||||
# description: Issue 506
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Query results in an error 'INTERNAL: Failed to bind column reference 'c0' [5.0] (bindings: [6.0])'
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 INT);
|
||||
|
||||
query II
|
||||
SELECT * FROM t1 JOIN t0 ON t1.c0 < t1.c0 - t0.c0 WHERE t0.c0 <= t1.c0;
|
||||
----
|
||||
|
||||
query II
|
||||
SELECT * FROM t1 JOIN t0 ON t0.c0 + t1.c0 < t1.c0 - t0.c0;
|
||||
----
|
||||
|
||||
12
external/duckdb/test/issues/rigger/test_507.test
vendored
Normal file
12
external/duckdb/test/issues/rigger/test_507.test
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# name: test/issues/rigger/test_507.test
|
||||
# description: Issue 507
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Creating an empty table results in a crash
|
||||
statement error
|
||||
CREATE TABLE t0();
|
||||
----
|
||||
<REGEX>:Parser Error:.*at least one column.*
|
||||
25
external/duckdb/test/issues/rigger/test_508.test
vendored
Normal file
25
external/duckdb/test/issues/rigger/test_508.test
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# name: test/issues/rigger/test_508.test
|
||||
# description: Issue 508
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# LEFT JOIN on column with NULL value results in a segmentation fault
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1(c0) VALUES (NULL);
|
||||
|
||||
query II
|
||||
SELECT * FROM t1 LEFT JOIN t0 ON t0.c0=t1.c0;
|
||||
----
|
||||
NULL NULL
|
||||
|
||||
34
external/duckdb/test/issues/rigger/test_510.test
vendored
Normal file
34
external/duckdb/test/issues/rigger/test_510.test
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
# name: test/issues/rigger/test_510.test
|
||||
# description: Issue 510
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# SIMILAR TO results in an incorrect result
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (-10);
|
||||
|
||||
query T
|
||||
SELECT '-10' SIMILAR TO '0';
|
||||
----
|
||||
0
|
||||
|
||||
query T
|
||||
SELECT cast(t0.c0 as varchar) SIMILAR TO cast(0 as varchar) FROM t0;
|
||||
----
|
||||
0
|
||||
|
||||
query T
|
||||
SELECT t0.c0::VARCHAR NOT SIMILAR TO 0::VARCHAR FROM t0;
|
||||
----
|
||||
1
|
||||
|
||||
query I
|
||||
SELECT * FROM t0 WHERE t0.c0::VARCHAR NOT SIMILAR TO 0::VARCHAR;
|
||||
----
|
||||
-10
|
||||
|
||||
26
external/duckdb/test/issues/rigger/test_513.test
vendored
Normal file
26
external/duckdb/test/issues/rigger/test_513.test
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
# name: test/issues/rigger/test_513.test
|
||||
# description: Issue 513
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# LEFT JOIN with comparison on integer columns results in 'Not implemented: Unimplemented type for nested loop
|
||||
# join!'
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1(c0) VALUES (0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (0);
|
||||
|
||||
query II
|
||||
SELECT * FROM t0 LEFT JOIN t1 ON t0.c0 <= t1.c0;
|
||||
----
|
||||
0 0
|
||||
|
||||
49
external/duckdb/test/issues/rigger/test_514.test
vendored
Normal file
49
external/duckdb/test/issues/rigger/test_514.test
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
# name: test/issues/rigger/test_514.test
|
||||
# description: Issue 514
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Incorrect result after an INSERT violates a UNIQUE constraint
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
CREATE UNIQUE INDEX i0 ON t0(c0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (1);
|
||||
|
||||
query I
|
||||
SELECT * FROM t0 WHERE t0.c0 = 1;
|
||||
----
|
||||
1
|
||||
|
||||
statement error
|
||||
INSERT INTO t0(c0) VALUES (1);
|
||||
----
|
||||
<REGEX>:Constraint Error.*Duplicate key.*
|
||||
|
||||
query I
|
||||
SELECT * FROM t0 WHERE t0.c0 = 1;
|
||||
----
|
||||
1
|
||||
|
||||
# verify correct behavior here too when we have multiple nodes
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (2);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (3);
|
||||
|
||||
statement error
|
||||
INSERT INTO t0(c0) VALUES (2);
|
||||
----
|
||||
<REGEX>:Constraint Error.*Duplicate key.*
|
||||
|
||||
query I
|
||||
SELECT * FROM t0 WHERE t0.c0 = 2;
|
||||
----
|
||||
2
|
||||
|
||||
37
external/duckdb/test/issues/rigger/test_515.test
vendored
Normal file
37
external/duckdb/test/issues/rigger/test_515.test
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
# name: test/issues/rigger/test_515.test
|
||||
# description: Issue 515
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Query with a negative shift predicate yields an incorrect result
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 INT8, c1 DOUBLE);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1(c0) VALUES (0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1(c1, c0) VALUES (1, 1);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (0);
|
||||
|
||||
statement error
|
||||
SELECT * FROM t1 JOIN t0 ON t1.c1 WHERE NOT (t1.c0<<-1);
|
||||
----
|
||||
<REGEX>:Out of Range Error.*left-shift by negative number.*
|
||||
|
||||
statement error
|
||||
SELECT * FROM t1 JOIN t0 ON t1.c1 WHERE (t1.c0<<-1);
|
||||
----
|
||||
<REGEX>:Out of Range Error.*left-shift by negative number.*
|
||||
|
||||
statement error
|
||||
SELECT NOT (t1.c0<<-1) FROM t1;
|
||||
----
|
||||
<REGEX>:Out of Range Error.*left-shift by negative number.*
|
||||
19
external/duckdb/test/issues/rigger/test_516.test
vendored
Normal file
19
external/duckdb/test/issues/rigger/test_516.test
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# name: test/issues/rigger/test_516.test
|
||||
# description: Issue 516
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Query with comparison on boolean column results in 'Invalid type: Invalid Type [BOOL]: Invalid type for
|
||||
# index'
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 BOOL UNIQUE);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (0);
|
||||
|
||||
query T
|
||||
SELECT * FROM t0 WHERE t0.c0 = true;
|
||||
----
|
||||
|
||||
29
external/duckdb/test/issues/rigger/test_517.test
vendored
Normal file
29
external/duckdb/test/issues/rigger/test_517.test
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
# name: test/issues/rigger/test_517.test
|
||||
# description: Issue 517
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Query with an AND predicate, NOT and comparison yields an incorrect result
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1(c0) VALUES (0);
|
||||
|
||||
query II
|
||||
SELECT * FROM t1, t0 WHERE NOT ((t1.c0 AND t0.c0) < 0);
|
||||
----
|
||||
0 0
|
||||
|
||||
query II
|
||||
SELECT * FROM t1, t0 WHERE ((t1.c0 AND t0.c0) < 0);
|
||||
----
|
||||
|
||||
29
external/duckdb/test/issues/rigger/test_518.test
vendored
Normal file
29
external/duckdb/test/issues/rigger/test_518.test
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
# name: test/issues/rigger/test_518.test
|
||||
# description: Issue 518
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Query using the LN() function does not terminate
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1(c0) VALUES (0), (0), (1), (-1);
|
||||
|
||||
statement error
|
||||
SELECT LN(t1.c0) FROM t0, t1 WHERE LN(t1.c0) < t0.c0;
|
||||
----
|
||||
<REGEX>:Out of Range Error.*logarithm of zero.*
|
||||
|
||||
statement error
|
||||
SELECT t1.c0, LN(t1.c0) FROM t1 ORDER BY t1.c0;
|
||||
----
|
||||
<REGEX>:Out of Range Error.*logarithm of zero.*
|
||||
28
external/duckdb/test/issues/rigger/test_521.test
vendored
Normal file
28
external/duckdb/test/issues/rigger/test_521.test
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# name: test/issues/rigger/test_521.test
|
||||
# description: Issue 521
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# ROUND() evaluates to -nan
|
||||
query R
|
||||
SELECT ROUND(0.1, 1000);
|
||||
----
|
||||
0.1
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (0);
|
||||
|
||||
query I
|
||||
SELECT * FROM t0 WHERE t0.c0 > ROUND(0.1, 1000);
|
||||
----
|
||||
|
||||
query I
|
||||
SELECT * FROM t0 WHERE t0.c0 <= ROUND(0.1, 1000);
|
||||
----
|
||||
0
|
||||
|
||||
12
external/duckdb/test/issues/rigger/test_522.test
vendored
Normal file
12
external/duckdb/test/issues/rigger/test_522.test
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# name: test/issues/rigger/test_522.test
|
||||
# description: Issue 522
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Casting a large number to REAL and multiplying it with zero results in -nan
|
||||
statement error
|
||||
SELECT 1e100::real*0;
|
||||
----
|
||||
<REGEX>:Conversion Error.*DOUBLE.*is out of range for.*FLOAT.*
|
||||
12
external/duckdb/test/issues/rigger/test_523.test
vendored
Normal file
12
external/duckdb/test/issues/rigger/test_523.test
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# name: test/issues/rigger/test_523.test
|
||||
# description: Issue 523
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# The trigonometric functions can result in -nan
|
||||
statement error
|
||||
SELECT SIN(1e1000);
|
||||
----
|
||||
<REGEX>:Out of Range Error.*for numeric function.*
|
||||
24
external/duckdb/test/issues/rigger/test_525.test
vendored
Normal file
24
external/duckdb/test/issues/rigger/test_525.test
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# name: test/issues/rigger/test_525.test
|
||||
# description: Issue 525
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 FLOAT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (1), (0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1(c0) VALUES (1);
|
||||
|
||||
query R
|
||||
SELECT t1.c0 FROM t1 JOIN t0 ON t1.c0 IN (t0.c0) WHERE t1.c0<=t0.c0;
|
||||
----
|
||||
1.000000
|
||||
|
||||
33
external/duckdb/test/issues/rigger/test_526.test
vendored
Normal file
33
external/duckdb/test/issues/rigger/test_526.test
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
# name: test/issues/rigger/test_526.test
|
||||
# description: Issue 526
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Query that uses the CONCAT() function and OR expression crashes
|
||||
# FIXME: #398
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 REAL);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 INT2);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t2(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (-1);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES (0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t2 VALUES (0), (0);
|
||||
|
||||
query IIR
|
||||
SELECT * FROM t1, t2, t0 WHERE CONCAT(t1.c0) OR t0.c0;
|
||||
----
|
||||
0 0 -1.000000
|
||||
0 0 -1.000000
|
||||
|
||||
32
external/duckdb/test/issues/rigger/test_527.test
vendored
Normal file
32
external/duckdb/test/issues/rigger/test_527.test
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# name: test/issues/rigger/test_527.test
|
||||
# description: Issue 527
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Query with JOIN and WHERE condition unexpectedly fetches a value not present in the table
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES (1), (1);
|
||||
|
||||
query I
|
||||
SELECT t0.c0 FROM t0 JOIN t1 ON t0.c0=(t1.c0 IS NULL) WHERE t0.c0 NOT IN (t1.c0);
|
||||
----
|
||||
0
|
||||
0
|
||||
|
||||
query I
|
||||
SELECT t0.c0 FROM t0 JOIN t1 ON t0.c0=(t1.c0 IS NULL);
|
||||
----
|
||||
0
|
||||
0
|
||||
|
||||
42
external/duckdb/test/issues/rigger/test_528.test
vendored
Normal file
42
external/duckdb/test/issues/rigger/test_528.test
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
# name: test/issues/rigger/test_528.test
|
||||
# description: Issue 528
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Incorrect result for query that uses REGEXP_MATCHES()
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 VARCHAR);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (0.1);
|
||||
|
||||
query T
|
||||
SELECT * FROM t0 WHERE REGEXP_MATCHES(t0.c0, '1');
|
||||
----
|
||||
0.1
|
||||
|
||||
query T
|
||||
SELECT * FROM t0 WHERE NOT REGEXP_MATCHES(t0.c0, '1');
|
||||
----
|
||||
|
||||
query T
|
||||
SELECT REGEXP_MATCHES(t0.c0, '1') FROM t0;
|
||||
----
|
||||
1
|
||||
|
||||
query T
|
||||
SELECT * FROM t0 WHERE REGEXP_FULL_MATCH(t0.c0, '1');
|
||||
----
|
||||
|
||||
query T
|
||||
SELECT * FROM t0 WHERE NOT REGEXP_FULL_MATCH(t0.c0, '1');
|
||||
----
|
||||
0.1
|
||||
|
||||
query T
|
||||
SELECT REGEXP_FULL_MATCH(t0.c0, '1') FROM t0;
|
||||
----
|
||||
0
|
||||
|
||||
20
external/duckdb/test/issues/rigger/test_531.test
vendored
Normal file
20
external/duckdb/test/issues/rigger/test_531.test
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# name: test/issues/rigger/test_531.test
|
||||
# description: Issue 531
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# SELECT on DATE column with a large negative value results in a 'double free or corruption'
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 DATE);
|
||||
|
||||
statement error
|
||||
INSERT INTO t0 VALUES (-10000000);
|
||||
----
|
||||
<REGEX>:Conversion Error.*Unimplemented type for cast.*
|
||||
|
||||
statement error
|
||||
SELECT (-10000000)::DATE;
|
||||
----
|
||||
<REGEX>:Conversion Error.*Unimplemented type for cast.*
|
||||
18
external/duckdb/test/issues/rigger/test_533.test
vendored
Normal file
18
external/duckdb/test/issues/rigger/test_533.test
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# name: test/issues/rigger/test_533.test
|
||||
# description: Issue 533
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Overflow when casting from REAL to INT results in 'Invalid TypeId -1'
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 REAL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (10000000000);
|
||||
|
||||
statement error
|
||||
SELECT t0.c0 ::INT FROM t0;
|
||||
----
|
||||
<REGEX>:Conversion Error.*FLOAT.*out of range for.*INT32.*
|
||||
25
external/duckdb/test/issues/rigger/test_534.test
vendored
Normal file
25
external/duckdb/test/issues/rigger/test_534.test
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# name: test/issues/rigger/test_534.test
|
||||
# description: Issue 534
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# UPDATE causes subsequent query to segfault
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 VARCHAR, c1 DOUBLE UNIQUE);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (NULL);
|
||||
|
||||
statement ok
|
||||
UPDATE t0 SET c0=0;
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0, c1) VALUES (0, 0);
|
||||
|
||||
query TR
|
||||
SELECT * FROM t0 WHERE 1 > c1;
|
||||
----
|
||||
0 0.000000
|
||||
|
||||
26
external/duckdb/test/issues/rigger/test_535.test
vendored
Normal file
26
external/duckdb/test/issues/rigger/test_535.test
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
# name: test/issues/rigger/test_535.test
|
||||
# description: Issue 535
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# GROUP BY clause results in non-deterministic result
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 DOUBLE);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (-515965088);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (1), (-5.15965088E8);
|
||||
|
||||
statement ok
|
||||
CREATE INDEX i0 ON t0(c0);
|
||||
|
||||
query R
|
||||
SELECT t0.c0 FROM t0 GROUP BY t0.c0, REVERSE(t0.c0::VARCHAR) ORDER BY 1;
|
||||
----
|
||||
-515965088.000000
|
||||
1.000000
|
||||
|
||||
30
external/duckdb/test/issues/rigger/test_536.test
vendored
Normal file
30
external/duckdb/test/issues/rigger/test_536.test
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
# name: test/issues/rigger/test_536.test
|
||||
# description: Issue 536
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Nondeterministic clause when using an UNION query and HAVING clause
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 VARCHAR);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES (0.9201898334673894), (0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (0);
|
||||
|
||||
query IT
|
||||
SELECT * FROM t0, t1 GROUP BY t0.c0, t1.c0 HAVING t1.c0!=MAX(t1.c0);
|
||||
----
|
||||
|
||||
query IT
|
||||
SELECT * FROM t0, t1 GROUP BY t0.c0, t1.c0 HAVING t1.c0!=MAX(t1.c0) UNION ALL SELECT * FROM t0, t1 GROUP BY t0.c0, t1.c0 HAVING NOT t1.c0>MAX(t1.c0) ORDER BY 1, 2;
|
||||
----
|
||||
0 0
|
||||
0 0.9201898334673894
|
||||
|
||||
18
external/duckdb/test/issues/rigger/test_537.test
vendored
Normal file
18
external/duckdb/test/issues/rigger/test_537.test
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# name: test/issues/rigger/test_537.test
|
||||
# description: Issue 537
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Fetching from table and view results in a crash
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
CREATE VIEW v0 AS SELECT 0, 1 FROM t0 ORDER BY t0.c0;
|
||||
|
||||
query I
|
||||
SELECT t0.c0 FROM t0, v0;
|
||||
----
|
||||
|
||||
26
external/duckdb/test/issues/rigger/test_538.test
vendored
Normal file
26
external/duckdb/test/issues/rigger/test_538.test
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
# name: test/issues/rigger/test_538.test
|
||||
# description: Issue 538
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Incorrect result for predicate with shift on a BIGINT column
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 BIGINT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (-1);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (0);
|
||||
|
||||
statement error
|
||||
SELECT t0.c0 AND (t0.c0<<64) FROM t0;
|
||||
----
|
||||
<REGEX>:Out of Range Error.*left-shift negative number.*
|
||||
|
||||
statement error
|
||||
SELECT * FROM t0 WHERE t0.c0 AND (t0.c0<<64);
|
||||
----
|
||||
<REGEX>:Out of Range Error.*left-shift negative number.*
|
||||
19
external/duckdb/test/issues/rigger/test_540.test
vendored
Normal file
19
external/duckdb/test/issues/rigger/test_540.test
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# name: test/issues/rigger/test_540.test
|
||||
# description: Issue 540
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Nested MAX() results in nondeterministic result or double free
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 VARCHAR);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES ('aaaaaaaaaaaa');
|
||||
|
||||
query T
|
||||
SELECT MAX(agg0) FROM (SELECT MAX(t0.c0) AS agg0 FROM t0) as s0;
|
||||
----
|
||||
aaaaaaaaaaaa
|
||||
|
||||
39
external/duckdb/test/issues/rigger/test_543.test
vendored
Normal file
39
external/duckdb/test/issues/rigger/test_543.test
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# name: test/issues/rigger/test_543.test
|
||||
# description: Issue 543
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Unexpected result for SUM() upon overflow
|
||||
statement ok
|
||||
CREATE TABLE t0(c1 BIGINT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c1) VALUES (2);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c1) VALUES (9223372036854775807);
|
||||
|
||||
query R
|
||||
SELECT SUM(t0.c1) FROM t0;
|
||||
----
|
||||
9223372036854775809
|
||||
|
||||
statement ok
|
||||
DROP TABLE t0;
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c1 BIGINT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c1) VALUES (1);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c1) VALUES (9223372036854775807);
|
||||
|
||||
query R
|
||||
SELECT SUM(t0.c1) FROM t0;
|
||||
----
|
||||
9223372036854775808
|
||||
|
||||
29
external/duckdb/test/issues/rigger/test_544.test
vendored
Normal file
29
external/duckdb/test/issues/rigger/test_544.test
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
# name: test/issues/rigger/test_544.test
|
||||
# description: Issue 544
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# SELECT on view with text constant in ORDER BY crashes
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (0);
|
||||
|
||||
statement ok
|
||||
CREATE VIEW v0(c0) AS SELECT 1 FROM t0;
|
||||
|
||||
statement error
|
||||
SELECT * FROM v0 ORDER BY 'a';
|
||||
----
|
||||
ORDER BY non-integer literal has no effect
|
||||
|
||||
statement ok
|
||||
SET order_by_non_integer_literal=true
|
||||
|
||||
query I
|
||||
SELECT * FROM v0 ORDER BY 'a';
|
||||
----
|
||||
1
|
||||
19
external/duckdb/test/issues/rigger/test_547.test
vendored
Normal file
19
external/duckdb/test/issues/rigger/test_547.test
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# name: test/issues/rigger/test_547.test
|
||||
# description: Issue 547
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Query with SIMILAR TO results in 'Assertion `strlen(dataptr) == length' failed'
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (0);
|
||||
|
||||
query I
|
||||
SELECT * FROM t0 WHERE cast(t0.c0 as varchar) SIMILAR TO '.';
|
||||
----
|
||||
0
|
||||
|
||||
23
external/duckdb/test/issues/rigger/test_549.test
vendored
Normal file
23
external/duckdb/test/issues/rigger/test_549.test
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# name: test/issues/rigger/test_549.test
|
||||
# description: Issue 549
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Nested CASE expression results in Assertion `other.auxiliary->type == VectorBufferType::STRING_BUFFER' failed
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (NULL), (0), (1);
|
||||
|
||||
statement error
|
||||
SELECT * FROM t0 WHERE CASE WHEN c0 THEN 0 ELSE CASE '0.1' WHEN c0 THEN '' END END;
|
||||
----
|
||||
<REGEX>:Binder Error.*Cannot mix values.*
|
||||
|
||||
statement error
|
||||
SELECT CASE WHEN c0 THEN 0 ELSE (CASE '0' WHEN c0 THEN '0.6' END) END FROM t0;
|
||||
----
|
||||
<REGEX>:Binder Error.*Cannot mix values.*
|
||||
18
external/duckdb/test/issues/rigger/test_552.test
vendored
Normal file
18
external/duckdb/test/issues/rigger/test_552.test
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# name: test/issues/rigger/test_552.test
|
||||
# description: Issue 552
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# RIGHT JOIN results in Assertion `filter->expressions.size() == 1'
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 INT);
|
||||
|
||||
query II
|
||||
SELECT * FROM t0 RIGHT JOIN t1 ON 0 WHERE t0.c0 OR t1.c0 BETWEEN t0.c0 AND 1;
|
||||
----
|
||||
|
||||
19
external/duckdb/test/issues/rigger/test_560.test
vendored
Normal file
19
external/duckdb/test/issues/rigger/test_560.test
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# name: test/issues/rigger/test_560.test
|
||||
# description: Issue 560
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Incorrect result for SUM() and negative number
|
||||
statement ok
|
||||
CREATE TABLE t0 (c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (0);
|
||||
|
||||
query R
|
||||
SELECT SUM(-1) FROM t0;
|
||||
----
|
||||
-1.000000
|
||||
|
||||
20
external/duckdb/test/issues/rigger/test_562.test
vendored
Normal file
20
external/duckdb/test/issues/rigger/test_562.test
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# name: test/issues/rigger/test_562.test
|
||||
# description: Issue 562
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# SELECT with CASE expression causes an assertion failure 'Assertion `!entry.first->Equals(&expr)' failed'
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement error
|
||||
SELECT * FROM t0 GROUP BY -4.40304405E8 ORDER BY (CASE 1 WHEN 0 THEN 0 ELSE -440304405 END);
|
||||
----
|
||||
<REGEX>:Binder Error.*must appear in the GROUP BY.*
|
||||
|
||||
query I
|
||||
SELECT 1 FROM t0 GROUP BY -4.40304405E8 ORDER BY (CASE 1 WHEN 0 THEN 0 ELSE -440304405 END);
|
||||
----
|
||||
|
||||
13
external/duckdb/test/issues/rigger/test_567.test
vendored
Normal file
13
external/duckdb/test/issues/rigger/test_567.test
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# name: test/issues/rigger/test_567.test
|
||||
# description: Issue 567
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# REVERSE() on special character results in 'Assertion `strcmp(dataptr, normalized) == 0' failed.'
|
||||
query T
|
||||
SELECT REVERSE('S̈a︍');
|
||||
----
|
||||
a︍S̈
|
||||
|
||||
18
external/duckdb/test/issues/rigger/test_571.test
vendored
Normal file
18
external/duckdb/test/issues/rigger/test_571.test
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# name: test/issues/rigger/test_571.test
|
||||
# description: Issue 571
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Incorrect result for BETWEEN query that casts column to boolean #571
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (-1);
|
||||
|
||||
query I
|
||||
SELECT t0.c0 FROM t0 WHERE NOT (0 BETWEEN 0 AND t0.c0::BOOL);
|
||||
----
|
||||
|
||||
23
external/duckdb/test/issues/rigger/test_579.test
vendored
Normal file
23
external/duckdb/test/issues/rigger/test_579.test
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# name: test/issues/rigger/test_579.test
|
||||
# description: Issue 579
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Updated value in column is not visible in a SELECT
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 VARCHAR, c1 VARCHAR);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES(0), ('');
|
||||
|
||||
statement ok
|
||||
UPDATE t0 SET c1 = 1;
|
||||
|
||||
# -- expected: {1}, actual: {''}
|
||||
query T
|
||||
SELECT t0.c1 FROM t0 WHERE '' = t0.c0;
|
||||
----
|
||||
1
|
||||
|
||||
13
external/duckdb/test/issues/rigger/test_580.test
vendored
Normal file
13
external/duckdb/test/issues/rigger/test_580.test
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# name: test/issues/rigger/test_580.test
|
||||
# description: Issue 580
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# SUBSTRING with an invalid start position causes a segmentation fault #580
|
||||
query T
|
||||
SELECT SUBSTRING(0::VARCHAR, 3, 0)
|
||||
----
|
||||
(empty)
|
||||
|
||||
23
external/duckdb/test/issues/rigger/test_581.test
vendored
Normal file
23
external/duckdb/test/issues/rigger/test_581.test
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# name: test/issues/rigger/test_581.test
|
||||
# description: Issue 581
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
SET default_null_order='nulls_first';
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# DISTINCT malfunctions for BOOLEAN
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 BOOLEAN);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (NULL), (false);
|
||||
|
||||
query T
|
||||
SELECT DISTINCT t0.c0 FROM t0 ORDER BY 1;
|
||||
----
|
||||
NULL
|
||||
0
|
||||
|
||||
25
external/duckdb/test/issues/rigger/test_583.test
vendored
Normal file
25
external/duckdb/test/issues/rigger/test_583.test
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# name: test/issues/rigger/test_583.test
|
||||
# description: Issue 583
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Comparing a string with a boolean yields an incorrect result after UPDATE
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 VARCHAR);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (0);
|
||||
|
||||
statement ok
|
||||
UPDATE t0 SET c0=0;
|
||||
|
||||
statement ok
|
||||
UPDATE t0 SET c0=true;
|
||||
|
||||
# -- expected: {true}, actual: {}
|
||||
query T
|
||||
SELECT * FROM t0 WHERE t0.c0 = true::varchar;
|
||||
----
|
||||
true
|
||||
19
external/duckdb/test/issues/rigger/test_584.test
vendored
Normal file
19
external/duckdb/test/issues/rigger/test_584.test
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# name: test/issues/rigger/test_584.test
|
||||
# description: Issue 584
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# A select with BETWEEN and VARCHAR cast results in an incorrect result
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INTEGER);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (-2);
|
||||
|
||||
query I
|
||||
SELECT t0.c0 FROM t0 WHERE -1 BETWEEN t0.c0::VARCHAR::INTEGER AND 1;
|
||||
----
|
||||
-2
|
||||
|
||||
20
external/duckdb/test/issues/rigger/test_585.test
vendored
Normal file
20
external/duckdb/test/issues/rigger/test_585.test
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# name: test/issues/rigger/test_585.test
|
||||
# description: Issue 585
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Predicate checking for an empty string yields an incorrect result
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 VARCHAR);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (''), (0)
|
||||
|
||||
query T
|
||||
SELECT * FROM t0 WHERE t0.c0 = '';
|
||||
----
|
||||
(empty)
|
||||
|
||||
# -- expected: {''}, actual: {}
|
||||
18
external/duckdb/test/issues/rigger/test_586.test
vendored
Normal file
18
external/duckdb/test/issues/rigger/test_586.test
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# name: test/issues/rigger/test_586.test
|
||||
# description: Issue 586
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# NOACCENT.NOCASE comparison with a special character results in a segmentation fault
|
||||
query T
|
||||
SELECT ''='Ʇ';
|
||||
----
|
||||
0
|
||||
|
||||
query T
|
||||
SELECT '' COLLATE NOACCENT.NOCASE='Ʇ';
|
||||
----
|
||||
0
|
||||
|
||||
13
external/duckdb/test/issues/rigger/test_587.test
vendored
Normal file
13
external/duckdb/test/issues/rigger/test_587.test
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# name: test/issues/rigger/test_587.test
|
||||
# description: Issue 587
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# A negative DATE results in a 'double free or corruption' crash
|
||||
query T
|
||||
SELECT (DATE '-10000-01-01')::VARCHAR;
|
||||
----
|
||||
10001-01-01 (BC)
|
||||
|
||||
23
external/duckdb/test/issues/rigger/test_588.test
vendored
Normal file
23
external/duckdb/test/issues/rigger/test_588.test
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# name: test/issues/rigger/test_588.test
|
||||
# description: Issue 588
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
SET default_null_order='nulls_first';
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Query with complex ORDER BY causes an incorrect rowid value
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (1), (0), (1);
|
||||
|
||||
query I
|
||||
SELECT t0.rowid FROM t0 WHERE t0.rowid ORDER BY CASE ((t0.c0) ::BOOL) WHEN 1 THEN t0.rowid END;
|
||||
----
|
||||
1
|
||||
2
|
||||
|
||||
15
external/duckdb/test/issues/rigger/test_589.test
vendored
Normal file
15
external/duckdb/test/issues/rigger/test_589.test
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# name: test/issues/rigger/test_589.test
|
||||
# description: Issue 589
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Creating an index on rowid results in an internal error 'Failed to bind column reference'
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement error
|
||||
CREATE INDEX i0 ON t0(rowid, c0);
|
||||
----
|
||||
<REGEX>:Binder Error:.*cannot create an index.*
|
||||
18
external/duckdb/test/issues/rigger/test_590.test
vendored
Normal file
18
external/duckdb/test/issues/rigger/test_590.test
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# name: test/issues/rigger/test_590.test
|
||||
# description: Issue 590
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Comparison with a DATE yields an incorrect result
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 VARCHAR);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (DATE '2000-01-02');
|
||||
|
||||
query T
|
||||
SELECT * FROM t0 WHERE DATE '2000-01-01' < cast(t0.c0 as date);
|
||||
----
|
||||
2000-01-02
|
||||
13
external/duckdb/test/issues/rigger/test_591.test
vendored
Normal file
13
external/duckdb/test/issues/rigger/test_591.test
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# name: test/issues/rigger/test_591.test
|
||||
# description: Issue 591
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Subtracting a large integer from a DATE results in a 'double free or corruption'
|
||||
query T
|
||||
SELECT (- 41756167 + '1969-12-11 032657' ::DATE)::VARCHAR;
|
||||
----
|
||||
112356-06-10 (BC)
|
||||
|
||||
17
external/duckdb/test/issues/rigger/test_592.test
vendored
Normal file
17
external/duckdb/test/issues/rigger/test_592.test
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# name: test/issues/rigger/test_592.test
|
||||
# description: Issue 592
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Expression with LIKE and comparison causes an assertion failure
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 VARCHAR);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (0);
|
||||
|
||||
query T
|
||||
SELECT * FROM t0 WHERE c0 LIKE '' AND c0 < true::VARCHAR;
|
||||
----
|
||||
18
external/duckdb/test/issues/rigger/test_596.test
vendored
Normal file
18
external/duckdb/test/issues/rigger/test_596.test
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# name: test/issues/rigger/test_596.test
|
||||
# description: Issue 596
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# STDDEV_POP unexpectedly does not fetch any rows
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 DOUBLE);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES(1E200), (0);
|
||||
|
||||
statement error
|
||||
SELECT STDDEV_POP(c0) FROM t0;
|
||||
----
|
||||
<REGEX>:Out of Range Error.*STDDEV_POP.*
|
||||
26
external/duckdb/test/issues/rigger/test_599.test
vendored
Normal file
26
external/duckdb/test/issues/rigger/test_599.test
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
# name: test/issues/rigger/test_599.test
|
||||
# description: Issue 599
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
SET default_null_order='nulls_first';
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# UPDATE results in crash or ASan error
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT, c1 VARCHAR);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (0, 0), (NULL, 0);
|
||||
|
||||
statement ok
|
||||
UPDATE t0 SET c1 = c0;
|
||||
|
||||
query IT
|
||||
SELECT * FROM t0 ORDER BY 1
|
||||
----
|
||||
NULL NULL
|
||||
0 0
|
||||
|
||||
19
external/duckdb/test/issues/rigger/test_602.test
vendored
Normal file
19
external/duckdb/test/issues/rigger/test_602.test
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# name: test/issues/rigger/test_602.test
|
||||
# description: Issue 602
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# GROUP BY does not take COLLATE into account
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 VARCHAR COLLATE NOCASE);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES ('a'), ('A');
|
||||
|
||||
query T
|
||||
SELECT t0.c0 FROM t0 GROUP BY t0.c0;
|
||||
----
|
||||
a
|
||||
|
||||
17
external/duckdb/test/issues/rigger/test_603.test
vendored
Normal file
17
external/duckdb/test/issues/rigger/test_603.test
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# name: test/issues/rigger/test_603.test
|
||||
# description: Issue 603
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# BETWEEN with COLLATE NOACCENT.NOCASE expression results in a segfault/ASan failure
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 DATE, c1 VARCHAR);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (NULL), ('2000-01-01');
|
||||
|
||||
query TT
|
||||
SELECT * FROM t0 WHERE 'a' BETWEEN c0::VARCHAR AND c1 COLLATE NOACCENT.NOCASE;
|
||||
----
|
||||
38
external/duckdb/test/issues/rigger/test_609.test
vendored
Normal file
38
external/duckdb/test/issues/rigger/test_609.test
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# name: test/issues/rigger/test_609.test
|
||||
# description: Issue 609
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Incorrect result for MIN() on expression involving rowid
|
||||
statement ok
|
||||
CREATE TABLE t0(
|
||||
c0 INT,
|
||||
c1 INT
|
||||
);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) SELECT 0 from range(22);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) SELECT NULL from range(2);
|
||||
|
||||
statement ok
|
||||
CREATE INDEX b ON t0(
|
||||
c1
|
||||
);
|
||||
|
||||
statement ok
|
||||
UPDATE t0 SET c1 = NULL;
|
||||
|
||||
query I
|
||||
SELECT MIN(1000::bigint<<t0.rowid) FROM t0;
|
||||
----
|
||||
16777216000
|
||||
|
||||
query I
|
||||
SELECT MIN(1000::bigint<<t0.rowid) FROM t0 WHERE NOT c0;
|
||||
----
|
||||
16777216000
|
||||
|
||||
22
external/duckdb/test/issues/rigger/test_618.test
vendored
Normal file
22
external/duckdb/test/issues/rigger/test_618.test
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
# name: test/issues/rigger/test_618.test
|
||||
# description: Issue 618
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Failed ALTER COLUMN results in a 'Transaction conflict' error that cannot be aborted
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 DATE);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (DATE '2000-01-01');
|
||||
|
||||
statement error
|
||||
ALTER TABLE t0 ALTER COLUMN c0 SET DATA TYPE INT;
|
||||
----
|
||||
<REGEX>:Conversion Error.*Unimplemented type for cast.*
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES (DEFAULT);
|
||||
|
||||
22
external/duckdb/test/issues/rigger/test_619.test
vendored
Normal file
22
external/duckdb/test/issues/rigger/test_619.test
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
# name: test/issues/rigger/test_619.test
|
||||
# description: Issue 619
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Query on altered table results in a segmentation fault
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT UNIQUE, c1 DATE);
|
||||
|
||||
statement ok
|
||||
ALTER TABLE t0 ALTER c1 TYPE INT;
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES(-1);
|
||||
|
||||
query II
|
||||
SELECT * FROM t0 WHERE c0 < 0;
|
||||
----
|
||||
-1 NULL
|
||||
|
||||
26
external/duckdb/test/issues/rigger/test_622.test
vendored
Normal file
26
external/duckdb/test/issues/rigger/test_622.test
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
# name: test/issues/rigger/test_622.test
|
||||
# description: Issue 622
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# UPDATE on altered table results in an error 'Could not find node in column segment tree'
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 TIMESTAMP);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL);
|
||||
|
||||
statement ok
|
||||
DELETE FROM t0;
|
||||
|
||||
statement ok
|
||||
ALTER TABLE t0 ALTER c0 TYPE DATE;
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL);
|
||||
|
||||
statement ok
|
||||
UPDATE t0 SET c0 = '1969-12-18';
|
||||
|
||||
17
external/duckdb/test/issues/rigger/test_624.test
vendored
Normal file
17
external/duckdb/test/issues/rigger/test_624.test
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# name: test/issues/rigger/test_624.test
|
||||
# description: Issue 624
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# ALTER TABLE results in an assertion failure 'Assertion `expr.return_type == vector.type' failed'
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT, c1 VARCHAR);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c1) VALUES(NULL);
|
||||
|
||||
statement ok
|
||||
ALTER TABLE t0 ALTER c1 TYPE TIMESTAMP;
|
||||
|
||||
25
external/duckdb/test/issues/rigger/test_625.test
vendored
Normal file
25
external/duckdb/test/issues/rigger/test_625.test
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# name: test/issues/rigger/test_625.test
|
||||
# description: Issue 625
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# DROP column results in an assertion failure unique.index < base.columns.size()
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT, c INT UNIQUE);
|
||||
|
||||
# we don't support this case yet
|
||||
statement error
|
||||
ALTER TABLE t0 DROP c0;
|
||||
----
|
||||
<REGEX>:Catalog Error.*Cannot drop this column.*
|
||||
|
||||
# check that unique constraint still works
|
||||
statement ok
|
||||
INSERT INTO t0 (c) VALUES (1);
|
||||
|
||||
statement error
|
||||
INSERT INTO t0 (c) VALUES (1);
|
||||
----
|
||||
<REGEX>:Constraint Error.*Duplicate key.*
|
||||
15
external/duckdb/test/issues/rigger/test_628.test
vendored
Normal file
15
external/duckdb/test/issues/rigger/test_628.test
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# name: test/issues/rigger/test_628.test
|
||||
# description: Issue 628
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# DROP column results in an assertion failure unique.index < base.columns.size()
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT, c1 INT UNIQUE);
|
||||
|
||||
statement error
|
||||
ALTER TABLE t0 DROP c1;
|
||||
----
|
||||
<REGEX>:Catalog Error.*Cannot drop column.*
|
||||
14
external/duckdb/test/issues/rigger/test_629.test
vendored
Normal file
14
external/duckdb/test/issues/rigger/test_629.test
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
# name: test/issues/rigger/test_629.test
|
||||
# description: Issue 629
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# ALTER TYPE with USING results in an assertion failure 'types.size() > 0'
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
ALTER TABLE t0 ALTER c0 TYPE VARCHAR USING '';
|
||||
|
||||
24
external/duckdb/test/issues/rigger/test_633.test
vendored
Normal file
24
external/duckdb/test/issues/rigger/test_633.test
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# name: test/issues/rigger/test_633.test
|
||||
# description: Issue 633
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# Query using LEFT() results in a segmentation fault
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 BOOL);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (NULL);
|
||||
|
||||
query T
|
||||
SELECT LEFT(t0.c0::VARCHAR, -1) FROM t0;
|
||||
----
|
||||
NULL
|
||||
|
||||
query T
|
||||
SELECT RIGHT(t0.c0::VARCHAR, -1) FROM t0;
|
||||
----
|
||||
NULL
|
||||
|
||||
32
external/duckdb/test/issues/rigger/test_637.test
vendored
Normal file
32
external/duckdb/test/issues/rigger/test_637.test
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# name: test/issues/rigger/test_637.test
|
||||
# description: Issue 637
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# SELECT with RIGHT JOIN causes an assertion failure 'Assertion `!finalized' failed'
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 VARCHAR);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 VARCHAR);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES('');
|
||||
|
||||
statement ok
|
||||
INSERT INTO t1 VALUES(0);
|
||||
|
||||
statement ok
|
||||
CREATE VIEW v0 AS SELECT 0 FROM t0, t1 WHERE t0.c0 = t1.c0;
|
||||
|
||||
query I
|
||||
SELECT * FROM v0;
|
||||
----
|
||||
|
||||
query IT
|
||||
SELECT * FROM v0 RIGHT JOIN t1 ON 1;
|
||||
----
|
||||
NULL 0
|
||||
|
||||
29
external/duckdb/test/issues/rigger/test_709.test
vendored
Normal file
29
external/duckdb/test/issues/rigger/test_709.test
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
# name: test/issues/rigger/test_709.test
|
||||
# description: Issue 709
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 DATETIME DEFAULT(0.45428781614730807), c1 DATE, PRIMARY KEY(c1));
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 DOUBLE NOT NULL, c1 BOOLEAN);
|
||||
|
||||
statement ok
|
||||
insert into t0 (c0, c1) values (NULL, '2019-11-26');
|
||||
|
||||
statement ok
|
||||
insert into t1 values (42, true);
|
||||
|
||||
statement error
|
||||
SELECT t0.rowid, t1.c1, t1.c0 FROM t1, t0 WHERE (((t1.rowid NOT IN (((t1.c1) ::BOOLEAN), ((t1.c0) ::INT1))))AND((false BETWEEN '[' AND t1.c0))) UNION SELECT t0.rowid, t1.c1, t1.c0 FROM t1, t0 WHERE (NOT (((t1.rowid NOT IN (((t1.c1) ::BOOLEAN), ((t1.c0) ::INT1))))AND((false BETWEEN '[' AND t1.c0)))) UNION SELECT t0.rowid, t1.c1, t1.c0 FROM t1, t0 WHERE (((((t1.rowid NOT IN (((t1.c1) ::BOOLEAN), ((t1.c0) ::TINYINT))))AND((false BETWEEN '[' AND t1.c0)))) IS NULL);
|
||||
----
|
||||
<REGEX>:Binder Error.*Cannot mix values.*
|
||||
|
||||
query ITR
|
||||
SELECT t0.rowid, t1.c1, t1.c0 FROM t1, t0 WHERE (((t1.rowid NOT IN (((t1.c1) ::BOOLEAN), ((t1.c0) ::INT1))))AND((false::VARCHAR BETWEEN '[' AND t1.c0::VARCHAR))) UNION SELECT t0.rowid, t1.c1, t1.c0 FROM t1, t0 WHERE (NOT (((t1.rowid NOT IN (((t1.c1) ::BOOLEAN), ((t1.c0) ::INT1))))AND((false::VARCHAR BETWEEN '[' AND t1.c0::VARCHAR)))) UNION SELECT t0.rowid, t1.c1, t1.c0 FROM t1, t0 WHERE (((((t1.rowid NOT IN (((t1.c1) ::BOOLEAN), ((t1.c0) ::TINYINT))))AND((false::VARCHAR BETWEEN '[' AND t1.c0::VARCHAR)))) IS NULL);
|
||||
----
|
||||
0 1 42.000000
|
||||
|
||||
13
external/duckdb/test/issues/rigger/test_956.test
vendored
Normal file
13
external/duckdb/test/issues/rigger/test_956.test
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# name: test/issues/rigger/test_956.test
|
||||
# description: Issue 956
|
||||
# group: [rigger]
|
||||
|
||||
# Buffer overflow in duckdb::ART::IteratorNext
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 VARCHAR UNIQUE);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES('19691214 051350'), (1), ('19700118'), (0), ('1969-1214 102704'), ('1969-12-14'), ('1969-12-14 114142'), ('1969-12-30 040325'), ('1969-12-18 044750'), ('1969-12-14 100915');
|
||||
|
||||
statement ok
|
||||
SELECT * FROM t0 WHERE '19691' > c0;
|
||||
43
external/duckdb/test/issues/rigger/test_empty_string_statistics.test
vendored
Normal file
43
external/duckdb/test/issues/rigger/test_empty_string_statistics.test
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
# name: test/issues/rigger/test_empty_string_statistics.test
|
||||
# description: SQLancer bug found with statistics not being properly updated on empty strings
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 VARCHAR NOT NULL DEFAULT(-1981039679), c1 TIMESTAMP);;
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES('',NULL);
|
||||
|
||||
statement ok
|
||||
COMMIT;
|
||||
|
||||
query I
|
||||
select ''>'!9t';
|
||||
----
|
||||
0
|
||||
|
||||
query I
|
||||
select ''<='!9t';
|
||||
----
|
||||
1
|
||||
|
||||
query I
|
||||
SELECT ((t0.c0)>('!9t')) FROM t0;
|
||||
----
|
||||
0
|
||||
|
||||
query I
|
||||
SELECT COUNT(*) FROM t0 WHERE ((t0.c0)>('!9t'));
|
||||
----
|
||||
0
|
||||
|
||||
query I
|
||||
SELECT COUNT(*) FROM t0 WHERE NOT((t0.c0)>('!9t'));
|
||||
----
|
||||
1
|
||||
65
external/duckdb/test/issues/rigger/test_non_equality_right_join.test
vendored
Normal file
65
external/duckdb/test/issues/rigger/test_non_equality_right_join.test
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
# name: test/issues/rigger/test_non_equality_right_join.test
|
||||
# description: SQLancer bug that detected a problem with a non-equality predicate which would not get correctly flipped when transforming between left <-> right join
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 DATE, c1 VARCHAR DEFAULT(CAST('1970-01-16 12:55:22' AS TIMESTAMP)), actual_rowid BIGINT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES('1969-12-16','810092761', 0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES('1970-01-15','810092761', 1);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES('1970-01-11','810092761', 2);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,'810092761', 3);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,'810092761', 4);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,'810092761', 5);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,'810092761', 6);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES('1970-01-23','810092761', 7);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,'false', 8);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(NULL,'', 9);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t6(c0 DOUBLE, c1 SMALLINT DEFAULT(CAST('1969-12-27' AS DATE)), PRIMARY KEY(c1));;
|
||||
|
||||
statement ok
|
||||
INSERT INTO t6 VALUES(NULL,0);
|
||||
|
||||
statement ok
|
||||
COMMIT;
|
||||
|
||||
query III
|
||||
SELECT t0.actual_rowid, t6.c0, t0.c0 FROM t0 RIGHT JOIN t6 ON ((t0.actual_rowid)>=(((((t6.c0)<=(t6.c0))) IS NOT NULL)::INTEGER)) GROUP BY t0.actual_rowid, t6.c0, t0.c0 order by 1, 2, 3;
|
||||
----
|
||||
0 NULL 1969-12-16
|
||||
1 NULL 1970-01-15
|
||||
2 NULL 1970-01-11
|
||||
3 NULL NULL
|
||||
4 NULL NULL
|
||||
5 NULL NULL
|
||||
6 NULL NULL
|
||||
7 NULL 1970-01-23
|
||||
8 NULL NULL
|
||||
9 NULL NULL
|
||||
17
external/duckdb/test/issues/rigger/test_value_binop.test
vendored
Normal file
17
external/duckdb/test/issues/rigger/test_value_binop.test
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# name: test/issues/rigger/test_value_binop.test
|
||||
# description: Test missing value binop that triggers optimiezr bug
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 DATE, c1 SMALLINT);
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 NUMERIC, c1 DATE DEFAULT(true), PRIMARY KEY(c1));
|
||||
|
||||
statement error
|
||||
SELECT COUNT((NOT IFNULL((CASE ((t0.rowid)+(0.250079098209133)) WHEN '0.3133638032049081' THEN t0.rowid WHEN t0.rowid THEN (((- t0.rowid)) IS NULL) ELSE (('1654422017')||((t0.rowid IN (false, '6㹬', TIMESTAMP '1970-01-25 20:11:23')))) END ), DATE '1970-01-12'))) FROM t0;
|
||||
----
|
||||
Cannot mix values of type
|
||||
21
external/duckdb/test/issues/rigger/timestamp_overflow.test
vendored
Normal file
21
external/duckdb/test/issues/rigger/timestamp_overflow.test
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# name: test/issues/rigger/timestamp_overflow.test
|
||||
# description: SQLancer bug that detected an overflow in date to timestamp casting
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 DATE, c1 BOOLEAN);;
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t1(c0 TINYINT, c1 VARCHAR, c2 TIMESTAMP);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES('1969-12-18',true);
|
||||
|
||||
statement ok
|
||||
CREATE VIEW v0(c0, c1) AS SELECT TIMESTAMP '1970-01-06 13:25:51', t1.c2 FROM t1 OFFSET 1274033658;
|
||||
|
||||
statement ok
|
||||
SELECT * FROM v0, t0 WHERE ((((v0.c1) ::DATE))=(v0.c0)) UNION SELECT * FROM v0, t0 WHERE (NOT ((((v0.c1) ::DATE))=(v0.c0))) UNION SELECT * FROM v0, t0 WHERE ((((((v0.c1) ::DATE))=(v0.c0))) IS NULL);
|
||||
21
external/duckdb/test/issues/rigger/zonemap_column_out_of_range.test
vendored
Normal file
21
external/duckdb/test/issues/rigger/zonemap_column_out_of_range.test
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# name: test/issues/rigger/zonemap_column_out_of_range.test
|
||||
# description: SQLancer bug that detected a crash with zonemap columns being out of range
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 DOUBLE, c1 DOUBLE);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.0,1.0);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0 VALUES(0.0,NULL);
|
||||
|
||||
query III
|
||||
SELECT t0.rowid, t0.c0, t0.c1 FROM t0 WHERE (t0.c1 IN (true::DOUBLE, 0.478943091545613)) GROUP BY t0.rowid, t0.c0, t0.c1 UNION SELECT t0.rowid, t0.c0, t0.c1 FROM t0 WHERE (NOT (t0.c1 IN (true::DOUBLE, 0.478943091545613))) GROUP BY t0.rowid, t0.c0, t0.c1 UNION SELECT t0.rowid, t0.c0, t0.c1 FROM t0 WHERE (((t0.c1 IN (true::DOUBLE, 0.478943091545613))) IS NULL) GROUP BY t0.rowid, t0.c0, t0.c1 ORDER BY 1, 2, 3;
|
||||
----
|
||||
0 0 1
|
||||
1 0 NULL
|
||||
Reference in New Issue
Block a user