mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Introduced parameter object "ALTER_INFO" for mysql_alter_table
to make list of parameters in mysql_alter_table shorted to avoid warning in MSVC (windows) building sql/mysql_priv.h: Introduced parameter object "ALTER_INFO" for mysql_alter_table - changed declaration of mysql_alter_table - changed declaration of mysql_drop_index (replaced List<Alter_drop> by ALTER_INFO) sql/sql_lex.h: Introduced parameter object "ALTER_INFO" for mysql_alter_table - declared struct ALTER_INFO - added ALTER_INFO alter_info; into LEX - removed fields which were added into ALTER_INFO from LEX sql/sql_parse.cc: Introduced parameter object "ALTER_INFO" for mysql_alter_table - changed invotaions of mysql_alter_table - replaced cleaning fields in SQLCOM_OPTIMIZE by ALTER_INFO::reset - changed invocation of mysql_drop_index (replaced lex->drop_list by &lex->alter_info) - changed definition of mysql_create_index and mysql_drop_index to use ALTER_INFO sql/sql_table.cc: Introduced parameter object "ALTER_INFO" for mysql_alter_table - changed definition of mysql_alter_table sql/sql_yacc.yy: Introduced parameter object "ALTER_INFO" for mysql_alter_table - replaced using of removed from LEX fields my fields of LEX::alter_info
This commit is contained in:
@ -532,6 +532,20 @@ typedef class st_select_lex SELECT_LEX;
|
||||
#define ALTER_ORDER 64
|
||||
#define ALTER_OPTIONS 128
|
||||
|
||||
typedef struct st_alter_info
|
||||
{
|
||||
List<Alter_drop> drop_list;
|
||||
List<Alter_column> alter_list;
|
||||
uint flags;
|
||||
enum enum_enable_or_disable keys_onoff;
|
||||
enum tablespace_op_type tablespace_op;
|
||||
bool is_simple;
|
||||
|
||||
st_alter_info(){clear();}
|
||||
void clear(){keys_onoff= LEAVE_AS_IS;tablespace_op= NO_TABLESPACE_OP;}
|
||||
void reset(){drop_list.empty();alter_list.empty();clear();}
|
||||
} ALTER_INFO;
|
||||
|
||||
/* The state of the lex parsing. This is saved in the THD struct */
|
||||
|
||||
typedef struct st_lex
|
||||
@ -564,8 +578,6 @@ typedef struct st_lex
|
||||
|
||||
List<key_part_spec> col_list;
|
||||
List<key_part_spec> ref_list;
|
||||
List<Alter_drop> drop_list;
|
||||
List<Alter_column> alter_list;
|
||||
List<String> interval_list;
|
||||
List<LEX_USER> users_list;
|
||||
List<LEX_COLUMN> columns;
|
||||
@ -593,19 +605,17 @@ typedef struct st_lex
|
||||
enum enum_tx_isolation tx_isolation;
|
||||
enum enum_ha_read_modes ha_read_mode;
|
||||
enum ha_rkey_function ha_rkey_mode;
|
||||
enum enum_enable_or_disable alter_keys_onoff;
|
||||
enum enum_var_type option_type;
|
||||
enum tablespace_op_type tablespace_op;
|
||||
uint uint_geom_type;
|
||||
uint grant, grant_tot_col, which_columns;
|
||||
uint fk_delete_opt, fk_update_opt, fk_match_option;
|
||||
uint slave_thd_opt;
|
||||
uint alter_flags;
|
||||
uint8 describe;
|
||||
bool drop_if_exists, drop_temporary, local_file;
|
||||
bool in_comment, ignore_space, verbose, simple_alter, no_write_to_binlog;
|
||||
bool in_comment, ignore_space, verbose, no_write_to_binlog;
|
||||
bool derived_tables;
|
||||
bool safe_to_cache_query;
|
||||
ALTER_INFO alter_info;
|
||||
st_lex() {}
|
||||
inline void uncacheable(uint8 cause)
|
||||
{
|
||||
|
Reference in New Issue
Block a user