From 3f619478f796eddbba6e39502fe941b285dd97b1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 20:00:34 +0200 Subject: Adding upstream version 1:10.11.6. Signed-off-by: Daniel Baumann --- mysql-test/main/udf_query_cache.test | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 mysql-test/main/udf_query_cache.test (limited to 'mysql-test/main/udf_query_cache.test') diff --git a/mysql-test/main/udf_query_cache.test b/mysql-test/main/udf_query_cache.test new file mode 100644 index 00000000..99cbffb1 --- /dev/null +++ b/mysql-test/main/udf_query_cache.test @@ -0,0 +1,38 @@ +--source include/have_udf.inc +--source include/have_query_cache.inc +# +# To run this tests the "sql/udf_example.c" need to be compiled into +# udf_example.so and LD_LIBRARY_PATH should be setup to point out where +# the library are. +# + +--disable_warnings +drop table if exists t1; +--enable_warnings + +# +# Bug #28921: Queries containing UDF functions are cached +# + +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO"; +create table t1 (a char); + +set @save_query_cache_size=@@query_cache_size; +set GLOBAL query_cache_size=1355776; +reset query cache; +flush status; + +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=@save_query_cache_size; + + -- cgit v1.2.3