3
SET @global_query_cache_limit = @@global.query_cache_limit;
5
DROP TABLE IF EXISTS t;
9
id INT AUTO_INCREMENT PRIMARY KEY,
13
INSERT INTO t set c = repeat('x',29);
14
INSERT INTO t set c = concat(repeat('x',28),'r','x');
15
INSERT INTO t set c = concat(repeat('x',28),'s','y');
16
INSERT INTO t set c = concat(repeat('x',28),'g','w');
17
** Reset cache values **
20
** On query_cache_type **
21
SET GLOBAL query_cache_type = ON;
22
** Allocating cache size **
23
SET GLOBAL query_cache_size = 131072;
25
SET GLOBAL query_cache_size = 0;
26
SET GLOBAL query_cache_size = 131072;
27
SET GLOBAL query_cache_type = ON;
28
'#---------------------FN_DYNVARS_132_01----------------------#'
29
** Reset cache values **
32
** fetching results **
35
1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
36
2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
37
3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
38
4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
39
** check status on not setting query_cache_limit value **
40
SHOW STATUS LIKE 'Qcache_not_cached';
43
SHOW STATUS LIKE 'Qcache_queries_in_cache';
45
Qcache_queries_in_cache 1
46
'#---------------------FN_DYNVARS_132_02----------------------#'
47
** Reset cache values **
51
SET @@GLOBAL.query_cache_limit=0;
52
** fetching results **
55
1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
56
2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
57
3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
58
4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
59
** Check status after setting value **
60
SHOW STATUS LIKE 'Qcache_not_cached';
64
SHOW STATUS LIKE 'Qcache_queries_in_cache';
66
Qcache_queries_in_cache 0
68
'#---------------------FN_DYNVARS_132_03----------------------#'
70
SET @@GLOBAL.query_cache_limit=DEFAULT;
71
** Reset cache values **
74
** fetching results **
77
1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
78
2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
79
3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
80
4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
81
SHOW STATUS LIKE 'Qcache_not_cached';
85
SHOW STATUS LIKE 'Qcache_queries_in_cache';
87
Qcache_queries_in_cache 1
89
SET @@GLOBAL.query_cache_limit=0;
90
SHOW STATUS LIKE 'Qcache_not_cached';
94
SHOW STATUS LIKE 'Qcache_queries_in_cache';
96
Qcache_queries_in_cache 1
98
** fetching results **
101
1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
102
2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
103
3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
104
4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
105
** Check status after setting value **
106
SHOW STATUS LIKE 'Qcache_not_cached';
110
SHOW STATUS LIKE 'Qcache_queries_in_cache';
112
Qcache_queries_in_cache 1
114
SET @@GLOBAL.query_cache_limit = @global_query_cache_limit;
115
DROP TABLE IF EXISTS t;