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 "c0" [42.1] (bindings: {#[106.0], #[106.1], #[106.2], #[99.0]}) #3205

Closed fuzzerofducks closed 3 months ago

fuzzerofducks commented 3 months ago

Issue found by SQLSmith on git commit hash 50bb6 using seed 903797279.

To Reproduce

create table all_types as select * exclude(small_enum, medium_enum, large_enum) from test_all_types() limit 0;
SELECT (SELECT NULL) AS c0 FROM (SELECT ref_1.fixed_nested_varchar_array AS c0, ref_3.usmallint AS c1, now() AS c2 FROM main.all_types AS ref_0 INNER JOIN main.all_types AS ref_1 INNER JOIN main.all_types AS ref_2 ON ((ref_1."varchar" !~~ ref_1."varchar")) RIGHT JOIN main.all_types AS ref_3 ON ((ref_3."varchar" !~~ ref_3."varchar")) ON (((ref_3."varchar" ~~ ref_1."varchar") OR 0)) WHERE ((ref_2."varchar" ~~* ref_1."varchar") AND (EXISTS(SELECT ref_4.fixed_nested_varchar_array AS c0 FROM main.all_types AS ref_4 WHERE (ref_3."varchar" !~~ ref_0."varchar") LIMIT 84) OR ((ref_2."varchar" ^@ ref_2."varchar") AND (ref_3."varchar" ~~* ref_1."varchar")))) LIMIT 76) AS subq_0 WHERE EXISTS(SELECT (SELECT NULL) AS c2, (SELECT NULL) FROM main.all_types AS ref_5 INNER JOIN main.all_types AS ref_6 ON (NULL) INNER JOIN main.all_types ON (NULL) INNER JOIN (SELECT (SELECT dec_4_1 FROM main.all_types LIMIT 1 OFFSET 3) AS c2, ref_9.time_tz AS c3, subq_0.c0 AS c4, ref_9."interval" AS c5, ref_8.varchar_array AS c6, ref_9.fixed_struct_array AS c7, subq_0.c1 AS c8 FROM main.all_types AS ref_8 LEFT JOIN main.all_types AS ref_9 ON ((ref_8."varchar" !~~ ref_9."varchar")) WHERE ((ref_8."varchar" ~~~ ref_8."varchar") AND EXISTS(SELECT ref_8.timestamp_tz AS c0 FROM main.all_types AS ref_10 , (SELECT ref_9."union" AS c0, ref_9."bit" AS c1, subq_0.c0 AS c2, ref_11."double" AS c3 FROM main.all_types AS ref_11 WHERE 0) AS subq_1 WHERE EXISTS(SELECT subq_0.c2 AS c0, subq_0.c2 AS c1, subq_0.c2 AS c2, subq_1.c1 AS c3, (SELECT timestamp_ms FROM main.all_types LIMIT 1 OFFSET 4) AS c4, ref_9.dec_18_6 AS c5, subq_1.c0 AS c6, ref_8."struct" AS c7 FROM main.all_types AS ref_12 WHERE 1 LIMIT 75) LIMIT 95)) LIMIT 19) ON ((ref_6."varchar" !~~* ref_5."varchar"))) LIMIT 120

Error Message

ABORT THROWN BY INTERNAL EXCEPTION: Failed to bind column reference "c0" [42.1] (bindings: {#[106.0], #[106.1], #[106.2], #[99.0]})