1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-29028 Queries using RANDOM_BYTES get stored in query cache

Mark the RANDOM_BYTES function as uncacheable.
This commit is contained in:
Daniel Black
2022-07-06 14:14:53 +10:00
committed by Sergei Golubchik
parent 8b9ac5bfe0
commit a95268c5b3
3 changed files with 58 additions and 0 deletions

View File

@ -2239,3 +2239,28 @@ DROP TABLE t;
restore defaults
SET GLOBAL query_cache_type= default;
SET GLOBAL query_cache_size=@save_query_cache_size;
#
# MDEV-29028: Queries using RANDOM_BYTES get stored in query cache
#
set @qcache= @@global.query_cache_type;
set global query_cache_type= 1;
set query_cache_type= 1;
create table t1 (a int);
insert into t1 values (1000);
flush status;
select * from information_schema.global_status where variable_name in ('Qcache_inserts','Qcache_hits') order by variable_name;
VARIABLE_NAME VARIABLE_VALUE
QCACHE_HITS 0
QCACHE_INSERTS 0
select * from information_schema.global_status where variable_name in ('Qcache_inserts','Qcache_hits') order by variable_name;
VARIABLE_NAME VARIABLE_VALUE
QCACHE_HITS 0
QCACHE_INSERTS 0
select random_bytes(1024) = random_bytes(1024) as improbable;
improbable
0
drop table t1;
set global query_cache_type= @qcache;
#
# End of 10.10 tests
#