1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +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:
Aleksey Midenkov
2022-08-31 11:55:02 +03:00
committed by Monty
parent f8ba5ced55
commit 1f85eeeb53
7 changed files with 24 additions and 25 deletions

View File

@@ -2336,8 +2336,7 @@ struct Table_scope_and_contents_source_st:
bool fix_period_fields(THD *thd, Alter_info *alter_info);
bool check_fields(THD *thd, Alter_info *alter_info,
const Lex_ident_table &table_name,
const Lex_ident_db &db,
int select_count= 0);
const Lex_ident_db &db);
bool check_period_fields(THD *thd, Alter_info *alter_info);
void vers_check_native();
@@ -2346,8 +2345,7 @@ struct Table_scope_and_contents_source_st:
bool vers_check_system_fields(THD *thd, Alter_info *alter_info,
const Lex_ident_table &table_name,
const Lex_ident_db &db,
int select_count= 0);
const Lex_ident_db &db);
};
@@ -5852,8 +5850,7 @@ inline void Cost_estimate::reset(handler *file)
avg_io_cost= file->DISK_READ_COST * file->DISK_READ_RATIO;
}
int get_select_field_pos(Alter_info *alter_info, int select_field_count,
bool versioned);
int get_select_field_pos(Alter_info *alter_info, bool versioned);
#ifndef DBUG_OFF
const char* dbug_print_row(TABLE *table, const uchar *rec, bool print_names= true);