diff options
author | unknown <dkatz@damien-katzs-computer.local> | 2007-06-18 17:55:12 -0400 |
---|---|---|
committer | unknown <dkatz@damien-katzs-computer.local> | 2007-06-18 17:55:12 -0400 |
commit | 5941479ee3f540a7dc6ce6ecb9246ee8edf5eb88 (patch) | |
tree | 6cb9457efdee46117caa7be00d856224f40cd7ae /mysql-test/t/udf.test | |
parent | 1919b30826cdf2d88292b72759987bfa506fc15c (diff) | |
download | mariadb-git-5941479ee3f540a7dc6ce6ecb9246ee8edf5eb88.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 'mysql-test/t/udf.test')
-rw-r--r-- | mysql-test/t/udf.test | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/t/udf.test b/mysql-test/t/udf.test index 0b582dc61b6..75af1f4be4b 100644 --- a/mysql-test/t/udf.test +++ b/mysql-test/t/udf.test @@ -288,4 +288,28 @@ drop function metaphon; drop function myfunc_double; drop function myfunc_int; +# +# Bug #28921: Queries containing UDF functions are cached +# + +--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB +eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB"; +create table t1 (a char); + +set GLOBAL query_cache_size=1355776; +reset query cache; + +select metaphon('MySQL') from t1; +show status like "Qcache_hits"; +show status like "Qcache_queries_in_cache"; + +select metaphon('MySQL') from t1; +show status like "Qcache_hits"; +show status like "Qcache_queries_in_cache"; + +drop table t1; +drop function metaphon; +set GLOBAL query_cache_size=default; + + --echo End of 5.0 tests. |