summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-05-20 02:07:21 +0200
committerSergei Golubchik <serg@mariadb.org>2018-05-20 20:25:35 +0200
commitff1d10ef9c8595136cc7687aa59e638cf31db332 (patch)
tree1aeb1d16ce75cb40a56d34789f0b2c083e4aa8f6 /sql/sql_lex.h
parent6f530c63cd90a86e3acb5e5e6bf81c6d666025eb (diff)
parent91dfb6141f45aed5cf3fe585d8c5db86f9ddbfe9 (diff)
downloadmariadb-git-ff1d10ef9c8595136cc7687aa59e638cf31db332.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 4acb1e441c1..ed5e423fd5a 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -770,7 +770,7 @@ public:
/*
Point to the LEX in which it was created, used in view subquery detection.
- TODO: make also st_select_lex::parent_stmt_lex (see THD::stmt_lex)
+ TODO: make also st_select_lex::parent_stmt_lex (see LEX::stmt_lex)
and use st_select_lex::parent_lex & st_select_lex::parent_stmt_lex
instead of global (from THD) references where it is possible.
*/
@@ -2553,6 +2553,21 @@ struct LEX: public Query_tables_list
// type information
CHARSET_INFO *charset;
+ /*
+ LEX which represents current statement (conventional, SP or PS)
+
+ For example during view parsing THD::lex will point to the views LEX and
+ lex::stmt_lex will point to LEX of the statement where the view will be
+ included
+
+ Currently it is used to have always correct select numbering inside
+ statement (LEX::current_select_number) without storing and restoring a
+ global counter which was THD::select_number.
+
+ TODO: make some unified statement representation (now SP has different)
+ to store such data like LEX::current_select_number.
+ */
+ LEX *stmt_lex;
LEX_STRING name;
char *help_arg;