I have the following suggestions so far.
Can you please fix them and replace the commit in bb-10.4-igor?
1. In statements where subquery is not allowed, the error message become
EXECUTE stmt USING (SELECT 1);
< ERROR 1064 (42000): ... syntax to use near 'SELECT 1)' at line 1
> ERROR 1064 (42000): ... syntax to use near ')' at line 1
Please change SELECT and WITH to have the '<kwd>' type, like this:
%token <kwd> SELECT_SYM /* SQL-2003-R */
%token <kwd> WITH /* SQL-2003-R */
Then in the grammar like this:
LEX *lex= Lex;
if (!(sel= lex->alloc_select(TRUE)) ||
you will be able to use $1.pos() to get the position of the keyword,
and later use this position to generate the error properly.
2. The change in sql_cte.cc is not relevant to this task.
Please make a separate MDEV for this and push it to 10.4, then rebase
3. There are a few mistakes in comments:
+ <query expression body> ::
+ <query term>
+ | <query expression body> UNION [ ALL | DISTINCT ] <query term>
+ | <query expression body> EXCEPT [ DISTINCT ]
+ Consider the production rule of the SQL Standard
+ '(' query_expression_no_with_clause ')'
+ The latter can be re-written into
+ '(' query_expression_body_ext_parens ')'
+ | '(' with_clause query_expression_no_with_clause ')'
Please fix them as discussed on slack.
Mailing list: https://launchpad.net/~maria-developers
Post to : email@example.com
Unsubscribe : https://launchpad.net/~maria-developers
More help : https://help.launchpad.net/ListHelp