diff options
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 5d2da0f46eb..dcffc0662dd 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -3659,10 +3659,8 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u) if (!res && fields->elements) { - bool saved_abort_on_warning= thd->abort_on_warning; - thd->abort_on_warning= !info.ignore && thd->is_strict_mode(); + Abort_on_warning_instant_set aws(thd, !info.ignore && thd->is_strict_mode()); res= check_that_all_fields_are_given_values(thd, table_list->table, table_list); - thd->abort_on_warning= saved_abort_on_warning; } if (info.handle_duplicates == DUP_UPDATE && !res) @@ -4134,11 +4132,11 @@ void select_insert::abort_result_set() { CREATE TABLE (SELECT) ... ***************************************************************************/ -Field *Item::create_field_for_create_select(TABLE *table) +Field *Item::create_field_for_create_select(MEM_ROOT *root, TABLE *table) { static Tmp_field_param param(false, false, false, false); Tmp_field_src src; - return create_tmp_field_ex(table, &src, ¶m); + return create_tmp_field_ex(root, table, &src, ¶m); } @@ -4209,7 +4207,8 @@ TABLE *select_create::create_table_from_items(THD *thd, List<Item> *items, while ((item=it++)) { - Field *tmp_field= item->create_field_for_create_select(&tmp_table); + Field *tmp_field= item->create_field_for_create_select(thd->mem_root, + &tmp_table); if (!tmp_field) DBUG_RETURN(NULL); |