summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorunknown <vva@eagle.mysql.r18.ru>2004-05-21 19:57:03 +0500
committerunknown <vva@eagle.mysql.r18.ru>2004-05-21 19:57:03 +0500
commitea63df7f54cbaf8553890eaa87d35045a733780c (patch)
treee17af21dff1c62a563a59b94a4e07d102eb006c3 /sql/sql_lex.h
parentccdbfd1492693aeb94fc8771f410fb4718da56f3 (diff)
downloadmariadb-git-ea63df7f54cbaf8553890eaa87d35045a733780c.tar.gz
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
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 2df2c998ff0..bc2a5a9201b 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -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)
{