From 9b7886bbf1eeb80136f0c208ef74fcc300514f50 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 24 Apr 2022 15:16:07 +0200 Subject: MDEV-28403 ASAN heap-use-after-free in String::copy / get_field_default_value This reverts commit 5ba77222e9fe7af8ff403816b5338b18b342053c but keeps the test. A different fix for MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view internal temporary tables should use THD as expr_area --- sql/sql_select.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql/sql_select.cc') diff --git a/sql/sql_select.cc b/sql/sql_select.cc index d2186f60709..e9d81417ee6 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -16333,8 +16333,7 @@ Field *create_tmp_field_from_field(THD *thd, Field *org_field, table->s->db_create_options|= HA_OPTION_PACK_RECORD; else if (org_field->type() == FIELD_TYPE_DOUBLE) ((Field_double *) new_field)->not_fixed= TRUE; - new_field->vcol_info= new_field->default_value= - new_field->check_constraint= 0; + new_field->vcol_info= 0; new_field->cond_selectivity= 1.0; new_field->next_equal_field= NULL; new_field->option_list= NULL; @@ -16901,6 +16900,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List &fields, table->intersect_keys.init(); table->keys_in_use_for_query.init(); table->no_rows_with_nulls= param->force_not_null_cols; + table->expr_arena= thd; table->s= share; init_tmp_table_share(thd, share, "", 0, "(temporary)", tmpname); -- cgit v1.2.1