mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-25292 Refactoring: moved select_field_count into Alter_info.
There is a need in MDEV-25292 to have both C_ALTER_TABLE and select_field_count in one call. Semantically creation mode and field count are two different things. Making creation mode negative constants and field count positive variable into one parameter seems to be a lazy hack for not making the second parameter. select_count does not make sense without alter_info->create_list, so the natural way is to hold it in Alter_info too. select_count is now stored in member select_field_count. Merged and updated by: Monty
This commit is contained in:
@ -4720,7 +4720,7 @@ TABLE *select_create::create_table_from_items(THD *thd, List<Item> *items,
|
||||
TABLE tmp_table; // Used during 'Create_field()'
|
||||
TABLE_SHARE share;
|
||||
TABLE *table= 0;
|
||||
uint select_field_count= items->elements;
|
||||
alter_info->select_field_count= items->elements;
|
||||
/* Add selected items to field list */
|
||||
List_iterator_fast<Item> it(*items);
|
||||
Item *item;
|
||||
@ -4787,8 +4787,7 @@ TABLE *select_create::create_table_from_items(THD *thd, List<Item> *items,
|
||||
|
||||
if (create_info->check_fields(thd, alter_info,
|
||||
table_list->table_name,
|
||||
table_list->db,
|
||||
select_field_count))
|
||||
table_list->db))
|
||||
DBUG_RETURN(NULL);
|
||||
|
||||
DEBUG_SYNC(thd,"create_table_select_before_create");
|
||||
@ -4822,7 +4821,7 @@ TABLE *select_create::create_table_from_items(THD *thd, List<Item> *items,
|
||||
|
||||
if (!mysql_create_table_no_lock(thd, &ddl_log_state_create, &ddl_log_state_rm,
|
||||
create_info, alter_info, NULL,
|
||||
select_field_count, table_list))
|
||||
C_ORDINARY_CREATE, table_list))
|
||||
{
|
||||
DEBUG_SYNC(thd,"create_table_select_before_open");
|
||||
|
||||
|
Reference in New Issue
Block a user