duckdb / duckdb-fuzzer

Repository that contains automatic reports of issues found through fuzzing DuckDB
0 stars 0 forks source link

ABORT THROWN BY INTERNAL EXCEPTION: Failed to bind column reference "c1" [55.6] (bindings: {#[53.0], #[53.1], #[53.2]}) #3171

Closed fuzzerofducks closed 3 months ago

fuzzerofducks commented 3 months ago

Issue found by SQLSmith on git commit hash dd9e6 using seed 803888243.

To Reproduce

create table all_types as select * exclude(small_enum, medium_enum, large_enum) from test_all_types();
SELECT NULL FROM (SELECT (SELECT NULL) AS c12) INNER JOIN main.all_types AS ref_1 INNER JOIN main.all_types INNER JOIN main.all_types AS ref_3 INNER JOIN main.all_types AS ref_4 ON (NULL) ON (0) ON (1) INNER JOIN main.all_types AS ref_5 ON (NULL) ON (NULL) LEFT JOIN (SELECT ref_6.timestamp_ns AS c1 FROM main.all_types AS ref_6 , (SELECT ref_7.timestamp_ns AS c0, ref_7.int_array AS c1, ref_6."bigint" AS c2 FROM main.all_types AS ref_7 WHERE ((SELECT time_tz FROM main.all_types LIMIT 1 OFFSET 5) IS NOT NULL) LIMIT 93) AS subq_1 WHERE (ref_6."varchar" !~~ ref_6."varchar")) RIGHT JOIN main.all_types AS ref_8 INNER JOIN main.all_types AS ref_9 ON ((((SELECT "varchar" FROM main.all_types LIMIT 1 OFFSET 4) !~~ ref_9."varchar") AND 0)) INNER JOIN main.all_types AS ref_10 ON ((ref_9.varchar_array = ref_10.varchar_array)) ON ((ref_10."varchar" ~~~ ref_8."varchar")) RIGHT JOIN main.all_types AS ref_11 INNER JOIN main.all_types AS ref_12 LEFT JOIN main.all_types AS ref_13 ON ((ref_12."varchar" ~~ ref_12."varchar")) INNER JOIN main.all_types AS ref_14 ON ((ref_13.timestamp_s = ref_14.timestamp_s)) ON (EXISTS(SELECT ref_14.ubigint AS c0, ref_13."int" AS c1, ref_12.dec_18_6 AS c2, ref_15."map" AS c3 FROM main.all_types AS ref_15 WHERE ((ref_11."time" IS NULL) AND (ref_11."varchar" ~~ CAST(NULL AS VARCHAR))) LIMIT 34)) ON ((ref_9."varchar" !~~ ref_11."varchar")) ON (1) WHERE ref_14.date LIMIT 150

Error Message

ABORT THROWN BY INTERNAL EXCEPTION: Failed to bind column reference "c1" [55.6] (bindings: {#[53.0], #[53.1], #[53.2]})