mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-4516 SELECT from I_S.QUERY_CACHE_INFO produces ER_UNKNOWN_ERROR when query cache size is 0
if qc->try_lock() fails, it's not an error
This commit is contained in:
@ -12,4 +12,7 @@ test select * from t1 1 512
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
select statement_schema, statement_text, result_blocks_count, result_blocks_size from information_schema.query_cache_info;
|
select statement_schema, statement_text, result_blocks_count, result_blocks_size from information_schema.query_cache_info;
|
||||||
statement_schema statement_text result_blocks_count result_blocks_size
|
statement_schema statement_text result_blocks_count result_blocks_size
|
||||||
|
set global query_cache_size = 0;
|
||||||
|
select * from information_schema.query_cache_info;
|
||||||
|
STATEMENT_SCHEMA STATEMENT_TEXT RESULT_BLOCKS_COUNT RESULT_BLOCKS_SIZE RESULT_BLOCKS_SIZE_USED
|
||||||
set global query_cache_size= default;
|
set global query_cache_size= default;
|
||||||
|
@ -4,5 +4,8 @@ drop table t1;
|
|||||||
# the query was invalidated
|
# the query was invalidated
|
||||||
select statement_schema, statement_text, result_blocks_count, result_blocks_size from information_schema.query_cache_info;
|
select statement_schema, statement_text, result_blocks_count, result_blocks_size from information_schema.query_cache_info;
|
||||||
|
|
||||||
|
set global query_cache_size = 0;
|
||||||
|
select * from information_schema.query_cache_info;
|
||||||
|
|
||||||
set global query_cache_size= default;
|
set global query_cache_size= default;
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ static int qc_info_fill_table(THD *thd, TABLE_LIST *tables,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (qc->try_lock(thd))
|
if (qc->try_lock(thd))
|
||||||
return status;
|
return 0; // QC is or is being disabled
|
||||||
|
|
||||||
/* loop through all queries in the query cache */
|
/* loop through all queries in the query cache */
|
||||||
for (uint i= 0; i < queries->records; i++)
|
for (uint i= 0; i < queries->records; i++)
|
||||||
|
Reference in New Issue
Block a user