mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-249 QUERY CACHE INFORMATION
This commit is contained in:
8
mysql-test/suite/plugins/t/qc_info.test
Normal file
8
mysql-test/suite/plugins/t/qc_info.test
Normal file
@ -0,0 +1,8 @@
|
||||
--source qc_info_init.inc
|
||||
|
||||
drop table t1;
|
||||
# the query was invalidated
|
||||
select statement_schema, statement_text, result_blocks_count, result_blocks_size from information_schema.query_cache_info;
|
||||
|
||||
set global query_cache_size= default;
|
||||
|
12
mysql-test/suite/plugins/t/qc_info_init.inc
Normal file
12
mysql-test/suite/plugins/t/qc_info_init.inc
Normal file
@ -0,0 +1,12 @@
|
||||
if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'query_cache_info' and plugin_status='active'`)
|
||||
{
|
||||
--skip QUERY_CACHE_INFO plugin is not active
|
||||
}
|
||||
|
||||
set global query_cache_size=1355776;
|
||||
|
||||
create table t1 (a int not null);
|
||||
insert into t1 values (1),(2),(3);
|
||||
select * from t1;
|
||||
select statement_schema, statement_text, result_blocks_count, result_blocks_size from information_schema.query_cache_info;
|
||||
|
2
mysql-test/suite/plugins/t/qc_info_init.opt
Normal file
2
mysql-test/suite/plugins/t/qc_info_init.opt
Normal file
@ -0,0 +1,2 @@
|
||||
--loose-query_cache_info
|
||||
--plugin-load=$QUERY_CACHE_INFO_SO
|
15
mysql-test/suite/plugins/t/qc_info_priv.test
Normal file
15
mysql-test/suite/plugins/t/qc_info_priv.test
Normal file
@ -0,0 +1,15 @@
|
||||
--source include/not_embedded.inc
|
||||
--source qc_info_init.inc
|
||||
|
||||
# try an unprivileged user
|
||||
create user mysqltest;
|
||||
connect (conn1,localhost,mysqltest,,);
|
||||
connection conn1;
|
||||
select a from t1;
|
||||
select count(*) from information_schema.query_cache_info;
|
||||
connection default;
|
||||
drop user mysqltest;
|
||||
drop table t1;
|
||||
|
||||
set global query_cache_size= default;
|
||||
|
Reference in New Issue
Block a user