[MDEV-29028] Queries using RANDOM_BYTES get stored in query cache Created: 2022-07-04  Updated: 2022-07-31  Resolved: 2022-07-13

Status: Closed
Project: MariaDB Server
Component/s: Query Cache, Server
Affects Version/s: N/A
Fix Version/s: 10.10.1

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Daniel Black
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-25704 Add RANDOM_BYTES function Closed

 Description   

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 (1),(2);
 
flush status;
select hex(random_bytes(a)) from t1;
select * from information_schema.global_status where variable_name in ('Qcache_inserts','Qcache_hits');
select hex(random_bytes(a)) from t1;
select * from information_schema.global_status where variable_name in ('Qcache_inserts','Qcache_hits');
 
# Cleanup
drop table t1;
set global query_cache_type= @qcache;

bb-10.10-MDEV-25704 1303dfde02

select hex(random_bytes(a)) from t1;
hex(random_bytes(a))
10
A6EF
select * from information_schema.global_status where variable_name in ('Qcache_inserts','Qcache_hits');
VARIABLE_NAME	VARIABLE_VALUE
QCACHE_HITS	0
QCACHE_INSERTS	1
select hex(random_bytes(a)) from t1;
hex(random_bytes(a))
10
A6EF
select * from information_schema.global_status where variable_name in ('Qcache_inserts','Qcache_hits');
VARIABLE_NAME	VARIABLE_VALUE
QCACHE_HITS	1
QCACHE_INSERTS	1



 Comments   
Comment by Daniel Black [ 2022-07-06 ]

Can I get a review of this at then end of the bb-10.10-danielblack-MDEV-29029-random-bytes-gcol branch too please.

Comment by Daniel Black [ 2022-07-13 ]

pushed to preview-10.10-misc

Generated at Thu Feb 08 10:05:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.