summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorMithun C Y <mithun.c.y@oracle.com>2015-08-17 15:26:01 +0530
committerMithun C Y <mithun.c.y@oracle.com>2015-08-17 15:26:01 +0530
commit8fe0708808ddba0d85798d0cd9100b3173064081 (patch)
treecb8e3e07e4c6fd7254b41c2329bc6ec017811cdd /sql/sql_yacc.yy
parent608efca4c4e4afa1ffea251abda675fcc06efc69 (diff)
parent557a57f3a23c486fbe12b66306ab7adffd609677 (diff)
downloadmariadb-git-8fe0708808ddba0d85798d0cd9100b3173064081.tar.gz
Merge branch 'mysql-5.1' into mysql-5.5
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy12
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index cd86f96900e..16ed61334c6 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -10174,8 +10174,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: