diff options
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 9b05cab6a10..bd2adc3220d 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -11682,9 +11682,19 @@ opt_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; $$= true; } ; |