1
set GLOBAL query_cache_size=1355776;
6
DROP TABLE IF EXISTS t;
7
CREATE TABLE t(id INT, number INT);
8
INSERT INTO t VALUES (0,1);
9
INSERT INTO t VALUES (1,2);
10
INSERT INTO t VALUES (2,3);
11
SELECT number from t where id > 0;
15
SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
16
SELECT number from t where id > 0;
17
SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
18
SELECT number from t where id > 0;
19
SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
21
Id User Host db Command Time State Info
22
Id root localhost test Sleep Time NULL
23
Id root localhost test Query Time Waiting on query cache mutex SELECT number from t where id > 0
24
Id root localhost test Query Time Waiting on query cache mutex SELECT number from t where id > 0
25
Id root localhost test Query Time NULL SHOW PROCESSLIST
27
set GLOBAL query_cache_size=0;