summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-08-05 09:58:00 +0300
committerunknown <bell@sanja.is.com.ua>2003-08-05 09:58:00 +0300
commit4a8ab8ac5678c3ea84c8f6adeeaf6ddf1a8ac69c (patch)
tree46610d580b8026f52b7785517655879276aa1c8c /sql/sql_lex.h
parentf94d0178ca9e87e6f61950650f8b256a1bff057c (diff)
parent6181294dab759a6f5197573f164ee061668b1d18 (diff)
downloadmariadb-git-4a8ab8ac5678c3ea84c8f6adeeaf6ddf1a8ac69c.tar.gz
Merge sanja.is.com.ua:/home/bell/mysql/bk/work-top3-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-simple_in-4.1 mysql-test/r/subselect.result: Auto merged mysql-test/t/subselect.test: Auto merged sql/item_subselect.cc: Auto merged sql/item_sum.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 6d47894d737..fb336faa2a6 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -349,7 +349,12 @@ public:
// Arrays of pointers to top elements of all_fields list
Item **ref_pointer_array;
- uint select_items; /* number of items in select_list */
+ /*
+ number of items in select_list and HAVING clause used to get number
+ bigger then can be number of entries that will be added to all item
+ list during split_sum_func
+ */
+ uint select_n_having_items;
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 */
@@ -361,14 +366,27 @@ public:
bool braces; /* SELECT ... UNION (SELECT ... ) <- this braces */
/* TRUE when having fix field called in processing of this SELECT */
bool having_fix_field;
+
/*
- TRUE for primary st_select_lex structure of simple INSERT/REPLACE
+ SELECT for SELECT command st_select_lex. Used to privent scaning
+ item_list of non-SELECT st_select_lex (no sense find to finding
+ reference in it (all should be in tables, it is dangerouse due
+ to order of fix_fields calling for non-SELECTs commands (item list
+ can be not fix_fieldsd)). This value will be assigned for
+ primary select (sql_yac.yy) and for any subquery and
+ UNION SELECT (sql_parse.cc mysql_new_select())
+
+
+ INSERT for primary st_select_lex structure of simple INSERT/REPLACE
(used for name resolution, see Item_fiels & Item_ref fix_fields,
FALSE for INSERT/REPLACE ... SELECT, because it's
st_select_lex->table_list will be preprocessed (first table removed)
before passing to handle_select)
+
+ NOMATTER for other
*/
- bool insert_select;
+ enum {NOMATTER_MODE, SELECT_MODE, INSERT_MODE} resolve_mode;
+
void init_query();
void init_select();