summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorunknown <dkatz@damien-katzs-computer.local>2007-06-18 17:55:12 -0400
committerunknown <dkatz@damien-katzs-computer.local>2007-06-18 17:55:12 -0400
commit624d2d3da315cd3a3fe870e2e91a9332947c5dea (patch)
tree6cb9457efdee46117caa7be00d856224f40cd7ae /sql/sql_yacc.yy
parent60f233786973bc19bf1b4021d4696553ff10fc71 (diff)
downloadmariadb-git-624d2d3da315cd3a3fe870e2e91a9332947c5dea.tar.gz
Bug #28921 Queries containing UDF functions are cached
Fixed runtime to no longer allow the caching of queries with UDF calls. mysql-test/r/udf.result: Added a test that turns on caching and checks that querys calling UDFs don't get cached. mysql-test/t/udf.test: Added a test that turns on caching and checks that querys calling UDFs don't get cached. sql/sql_yacc.yy: Fixed code to set safe_to_cache_query=0 regardless if the function call is a UDF or SP. Where it was placed previously -- at the very end of the else testing for UDFs -- it only executed the statement if the function call was a stored procedure call.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 924a8bd6d7d..22ec7b31248 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -5150,8 +5150,8 @@ simple_expr:
$$= new Item_func_sp(Lex->current_context(), name, *$4);
else
$$= new Item_func_sp(Lex->current_context(), name);
- lex->safe_to_cache_query=0;
- }
+ }
+ lex->safe_to_cache_query=0;
}
| UNIQUE_USERS '(' text_literal ',' NUM ',' NUM ',' expr_list ')'
{