diff options
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index bf21a717fed..4180089a501 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -4200,7 +4200,7 @@ TABLE *select_create::create_table_from_items(THD *thd, List<Item> *items, if (!opt_explicit_defaults_for_timestamp) promote_first_timestamp_column(&alter_info->create_list); - if (create_info->fix_create_fields(thd, alter_info, *create_table, true)) + if (create_info->fix_create_fields(thd, alter_info, *create_table)) DBUG_RETURN(NULL); while ((item=it++)) @@ -4240,7 +4240,10 @@ TABLE *select_create::create_table_from_items(THD *thd, List<Item> *items, alter_info->create_list.push_back(cr_field, thd->mem_root); } - if (create_info->check_fields(thd, alter_info, *create_table)) + if (create_info->check_fields(thd, alter_info, + create_table->table_name, + create_table->db, + select_field_count)) DBUG_RETURN(NULL); DEBUG_SYNC(thd,"create_table_select_before_create"); |