1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +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

@@ -128,7 +128,6 @@ bool add_keyword_to_query(THD *thd, String *result, const LEX_CSTRING *keyword,
(which should be the number of fields in the SELECT ... part), and other
cases use constants as defined below.
*/
#define C_CREATE_SELECT(X) ((X) > 0 ? (X) : 0)
#define C_ORDINARY_CREATE 0
#define C_ASSISTED_DISCOVERY -1
#define C_ALTER_TABLE -2