-
hf@deer.(none) authored
This crash happens in rather exotic case when we try to run SELECT DISTINCT some_func(SUM(some_field)) GROUP BY another_field; on a table with single row. Optimizer marks this table as const, sets group=NULL (with remove_const) thus, create_tmp_table makes mistake collecting columns for temporary table and then crashes because the field_count gets less than hidden_columns_count.
f0f92fe4