diff options
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 60965209cc9..8d864c68f25 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -351,6 +351,7 @@ public: st_select_lex *fake_select_lex; st_select_lex *union_distinct; /* pointer to the last UNION DISTINCT */ + bool describe; /* union exec() called for EXPLAIN */ void init_query(); bool create_total_list(THD *thd, st_lex *lex, TABLE_LIST **result); @@ -383,6 +384,7 @@ public: void print(String *str); ulong init_prepare_fake_select_lex(THD *thd); + int change_result(select_subselect *result, select_subselect *old_result); void set_limit(st_select_lex *values, st_select_lex *sl); friend void mysql_init_query(THD *thd, bool lexonly); @@ -405,8 +407,6 @@ public: enum olap_type olap; SQL_LIST table_list, group_list; /* FROM & GROUP BY clauses */ List<Item> item_list; /* list of fields & expressions */ - List<Item> item_list_copy; /* For SPs */ - byte *table_list_first_copy; /* For SPs */ List<String> interval_list, use_index, *use_index_ptr, ignore_index, *ignore_index_ptr; /* @@ -435,6 +435,11 @@ public: uint cond_count; /* number of arguments of and/or/xor in where/having */ enum_parsing_place parsing_place; /* where we are parsing expression */ bool with_sum_func; /* sum function indicator */ + /* + PS or SP cond natural joins was alredy processed with permanent + arena and all additional items which we need alredy stored in it + */ + bool conds_processed_with_permanent_arena; ulong table_join_options; uint in_sum_expr; @@ -445,6 +450,7 @@ public: bool having_fix_field; /* explicit LIMIT clause was used */ bool explicit_limit; + bool first_execution; /* first execution in SP or PS */ /* SELECT for SELECT command st_select_lex. Used to privent scaning @@ -545,6 +551,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; + struct st_sp_chistics { LEX_STRING comment; @@ -585,8 +605,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; @@ -614,19 +632,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; sp_head *sphead; sp_name *spname; bool sp_lex_in_use; /* Keep track on lex usage in SPs for error handling */ @@ -680,6 +696,4 @@ void lex_end(LEX *lex); extern pthread_key(LEX*,THR_LEX); -extern LEX_STRING tmp_table_alias; - #define current_lex (current_thd->lex) |