mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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.
This commit is contained in:
@ -124,11 +124,10 @@ 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_ALTER_TABLE -1
|
||||
#define C_ALTER_TABLE_FRM_ONLY -2
|
||||
#define C_ASSISTED_DISCOVERY -3
|
||||
#define C_ALTER_TABLE 1
|
||||
#define C_ALTER_TABLE_FRM_ONLY 2
|
||||
#define C_ASSISTED_DISCOVERY 3
|
||||
|
||||
int mysql_create_table_no_lock(THD *thd,
|
||||
DDL_LOG_STATE *ddl_log_state,
|
||||
|
Reference in New Issue
Block a user