summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-04-24 15:16:07 +0200
committerSergei Golubchik <serg@mariadb.org>2022-04-25 21:22:59 +0200
commit9b7886bbf1eeb80136f0c208ef74fcc300514f50 (patch)
treed27e34e4ed20792f68c1e597e9dbf35d5098d5d3 /sql/sql_select.cc
parentc5e68b6dcddbb6325c7684bfb4fba28e1c13e1ae (diff)
downloadmariadb-git-9b7886bbf1eeb80136f0c208ef74fcc300514f50.tar.gz
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
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc4
1 files changed, 2 insertions, 2 deletions
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<Item> &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);