summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2005-11-04 17:54:47 -0800
committerunknown <igor@rurik.mysql.com>2005-11-04 17:54:47 -0800
commitb5182e4b92bf9d4043b4ab65dedb46c14f54f6ba (patch)
treece0dd0af8ccca66eb82e7a97cf01efcdf905fbaf /sql/sql_lex.h
parent61b86c599168338632c17c243fcd65ae5f91f022 (diff)
parentbef391c878582d10a91720aaf2244082d13db867 (diff)
downloadmariadb-git-b5182e4b92bf9d4043b4ab65dedb46c14f54f6ba.tar.gz
Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2 mysql-test/r/func_gconcat.result: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.cc: Auto merged sql/item_sum.cc: Auto merged sql/mysql_priv.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_delete.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_update.cc: Auto merged
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index a8bee9bb59b..9e98ba0673d 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -527,6 +527,8 @@ public:
ulong table_join_options;
uint in_sum_expr;
uint select_number; /* number of select (used for EXPLAIN) */
+ int nest_level; /* nesting level of select */
+ Item_sum *inner_sum_func_list; /* list of sum func in nested selects */
uint with_wild; /* item list contain '*' */
bool braces; /* SELECT ... UNION (SELECT ... ) <- this braces */
/* TRUE when having fix field called in processing of this SELECT */
@@ -770,12 +772,23 @@ typedef struct st_lex
SQL_LIST proc_list, auxilliary_table_list, save_list;
create_field *last_field;
+ Item_sum *in_sum_func;
udf_func udf;
HA_CHECK_OPT check_opt; // check/repair options
HA_CREATE_INFO create_info;
LEX_MASTER_INFO mi; // used by CHANGE MASTER
USER_RESOURCES mqh;
ulong type;
+ /*
+ This variable is used in post-parse stage to declare that sum-functions,
+ or functions which have sense only if GROUP BY is present, are allowed.
+ For example in a query
+ SELECT ... FROM ...WHERE MIN(i) == 1 GROUP BY ... HAVING MIN(i) > 2
+ MIN(i) in the WHERE clause is not allowed in the opposite to MIN(i)
+ in the HAVING clause. Due to possible nesting of select construct
+ the variable can contain 0 or 1 for each nest level.
+ */
+ nesting_map allow_sum_func;
enum_sql_command sql_command, orig_sql_command;
thr_lock_type lock_option;
enum SSL_type ssl_type; /* defined in violite.h */
@@ -794,6 +807,7 @@ typedef struct st_lex
uint grant, grant_tot_col, which_columns;
uint fk_delete_opt, fk_update_opt, fk_match_option;
uint slave_thd_opt, start_transaction_opt;
+ int nest_level;
/*
In LEX representing update which were transformed to multi-update
stores total number of tables. For LEX representing multi-delete