diff options
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index d9a32f2dd35..991fa390e22 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -9373,8 +9373,20 @@ procedure_clause: if (add_proc_to_list(lex->thd, item)) MYSQL_YYABORT; Lex->uncacheable(UNCACHEABLE_SIDEEFFECT); + + /* + PROCEDURE CLAUSE cannot handle subquery as one of its parameter, + so set expr_allows_subselect as false to disallow any subqueries + further. Reset expr_allows_subselect back to true once the + parameters are reduced. + */ + Lex->expr_allows_subselect= false; } '(' procedure_list ')' + { + /* Subqueries are allowed from now.*/ + Lex->expr_allows_subselect= true; + } ; procedure_list: |