diff options
author | Marc Alff <marc.alff@sun.com> | 2009-11-02 09:31:00 -0700 |
---|---|---|
committer | Marc Alff <marc.alff@sun.com> | 2009-11-02 09:31:00 -0700 |
commit | 587a696a82402dc246acfb0e41d40016c2c30ef8 (patch) | |
tree | 7a6bb218b937aaeaab0ee4794a23a8bea1bb2529 /sql/sql_lex.h | |
parent | e1be32db5a9c1aaf3e193e9443b9af1742b67bac (diff) | |
download | mariadb-git-587a696a82402dc246acfb0e41d40016c2c30ef8.tar.gz |
Bug#9801 Views: imperfect error message
Backport for 5.5
The root cause of this bug is that the grammar for GROUP BY clauses,
when using WITH CUBE or WITH ROLLUP, cause conflicts with the grammar
for VIEW, when using WITH CHECK OPTION.
The solution is to implement two token look ahead when parsing a WITH token,
to disambiguate the non standard WITH CUBE and WITH ROLLUP syntaxes.
Patch based on code from Marc Alff and Antony Curtis
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 4a4acde6e76..be7375fa3fa 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -1411,6 +1411,17 @@ public: /** Interface with bison, value of the last token parsed. */ LEX_YYSTYPE yylval; + /** + LALR(2) resolution, look ahead token. + Value of the next token to return, if any, + or -1, if no token was parsed in advance. + Note: 0 is a legal token, and represents YYEOF. + */ + int lookahead_token; + + /** LALR(2) resolution, value of the look ahead token.*/ + LEX_YYSTYPE lookahead_yylval; + private: /** Pointer to the current position in the raw input stream. */ const char *m_ptr; |