diff options
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 0268e1d3a41..480b94d0d21 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -3138,11 +3138,11 @@ bool select_insert::send_eof() temporary table flag) create_table in Pointer to TABLE_LIST object providing database and name for table to be created or to be open - extra_fields in/out Initial list of fields for table to be created - keys in List of keys for table to be created + alter_info in/out Initial list of columns and indexes for the table + to be created items in List of items which should be used to produce rest of fields for the table (corresponding fields will - be added to the end of 'extra_fields' list) + be added to the end of alter_info->create_list) lock out Pointer to the MYSQL_LOCK object for table created (or open temporary table) will be returned in this parameter. Since this table is not included in @@ -3171,8 +3171,7 @@ bool select_insert::send_eof() static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, TABLE_LIST *create_table, - List<create_field> *extra_fields, - List<Key> *keys, + Alter_info *alter_info, List<Item> *items, MYSQL_LOCK **lock, TABLEOP_HOOKS *hooks) @@ -3236,7 +3235,7 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, DBUG_RETURN(0); if (item->maybe_null) cr_field->flags &= ~NOT_NULL_FLAG; - extra_fields->push_back(cr_field); + alter_info->create_list.push_back(cr_field); } DBUG_EXECUTE_IF("sleep_create_select_before_create", my_sleep(6000000);); @@ -3261,8 +3260,8 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, tmp_disable_binlog(thd); if (!mysql_create_table_no_lock(thd, create_table->db, create_table->table_name, - create_info, *extra_fields, *keys, 0, - select_field_count, 0)) + create_info, alter_info, 0, + select_field_count)) { if (create_info->table_existed && @@ -3388,7 +3387,7 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u) } if (!(table= create_table_from_items(thd, create_info, create_table, - extra_fields, keys, &values, + alter_info, &values, &thd->extra_lock, hook_ptr))) DBUG_RETURN(-1); // abort() deletes table |