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.21] (bindings: {#[9.0], #[9.1], #[9.2], #[9.3]}) #3230

Closed fuzzerofducks closed 3 months ago

fuzzerofducks commented 3 months ago

Issue found by SQLSmith on git commit hash 950d7 using seed 454771588.

To Reproduce

create table all_types as select * exclude(small_enum, medium_enum, large_enum) from test_all_types() limit 0;
SELECT NULL FROM (SELECT ref_0.bool AS c0, ref_0."smallint" AS c1, ref_0."timestamp" AS c2, ref_0."int" AS c3, ref_0.hugeint AS c4, ref_0.nested_int_array AS c5, ref_0.time_tz AS c6 FROM main.all_types AS ref_0 WHERE ((ref_0."varchar" !~~* ref_0."varchar") OR (ref_0.fixed_nested_varchar_array IS NULL) OR (ref_0."varchar" ~~* CAST(NULL AS VARCHAR)))) AS subq_0 , (SELECT (SELECT "struct" FROM main.all_types LIMIT 1 OFFSET 76) AS c0, ref_1.bool AS c1, ref_1.date AS c2, ref_2."float" AS c3 FROM main.all_types AS ref_1 LEFT JOIN main.all_types AS ref_2 ON ((ref_1.struct_of_fixed_array = ref_2.struct_of_fixed_array)) WHERE (ref_1."varchar" ^@ "version"()) LIMIT 71) AS subq_1 WHERE EXISTS(SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, (SELECT int_array FROM main.all_types LIMIT 1 OFFSET 5) AS c14, subq_3.c0 AS c15, subq_1.c2 AS c16, subq_0.c3 AS c17, (SELECT usmallint FROM main.all_types LIMIT 1 OFFSET 2) AS c18, subq_1.c3 AS c19, subq_1.c2 AS c20 FROM (SELECT subq_0.c4 AS c0 FROM main.all_types AS ref_3 , (SELECT ref_3.time_tz AS c0, ref_4.timestamp_array AS c1 FROM main.all_types AS ref_4 WHERE (((ref_3."varchar" ~~~ ref_4."varchar") AND ((ref_3."varchar" !~~* ref_3."varchar") OR (ref_3."varchar" ~~* ref_3."varchar"))) OR (ref_4.time_tz IS NULL)) LIMIT 96) AS subq_2 WHERE (ref_3."varchar" ~~* CAST(NULL AS VARCHAR)) LIMIT 63) AS subq_3 WHERE ((SELECT "varchar" FROM main.all_types LIMIT 1 OFFSET 48) ~~ CAST(NULL AS VARCHAR))) LIMIT 115

Error Message

ABORT THROWN BY INTERNAL EXCEPTION: Failed to bind column reference "c0" [42.21] (bindings: {#[9.0], #[9.1], #[9.2], #[9.3]})