3
SET @global_query_cache_limit = @@global.query_cache_limit;
4
SET @global_query_cache_size = @@global.query_cache_size;
5
SET @global_query_cache_type = @@global.query_cache_type;
7
DROP TABLE IF EXISTS t;
11
id INT AUTO_INCREMENT PRIMARY KEY,
15
INSERT INTO t set c = repeat('x',29);
16
INSERT INTO t set c = concat(repeat('x',28),'r','x');
17
INSERT INTO t set c = concat(repeat('x',28),'s','y');
18
INSERT INTO t set c = concat(repeat('x',28),'g','w');
19
** Reset cache values **
22
** On query_cache_type **
23
SET GLOBAL query_cache_type = ON;
24
** Allocating cache size **
25
SET GLOBAL query_cache_size = 131072;
27
SET GLOBAL query_cache_size = 0;
28
SET GLOBAL query_cache_size = 131072;
29
SET GLOBAL query_cache_type = ON;
30
'#---------------------FN_DYNVARS_132_01----------------------#'
31
** Reset cache values **
34
** fetching results **
37
1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
38
2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
39
3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
40
4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
41
** check status on not setting query_cache_limit value **
42
SHOW STATUS LIKE 'Qcache_not_cached';
45
SHOW STATUS LIKE 'Qcache_queries_in_cache';
47
Qcache_queries_in_cache 1
48
'#---------------------FN_DYNVARS_132_02----------------------#'
49
** Reset cache values **
53
SET @@GLOBAL.query_cache_limit = 0;
54
** fetching results **
57
1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
58
2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
59
3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
60
4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
61
** Check status after setting value **
62
SHOW STATUS LIKE 'Qcache_not_cached';
66
SHOW STATUS LIKE 'Qcache_queries_in_cache';
68
Qcache_queries_in_cache 0
70
'#---------------------FN_DYNVARS_132_03----------------------#'
72
SET @@GLOBAL.query_cache_limit = DEFAULT;
73
** Reset cache values **
76
** fetching results **
79
1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
80
2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
81
3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
82
4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
83
SHOW STATUS LIKE 'Qcache_not_cached';
87
SHOW STATUS LIKE 'Qcache_queries_in_cache';
89
Qcache_queries_in_cache 1
91
SET @@GLOBAL.query_cache_limit = 0;
92
SHOW STATUS LIKE 'Qcache_not_cached';
96
SHOW STATUS LIKE 'Qcache_queries_in_cache';
98
Qcache_queries_in_cache 1
100
** fetching results **
103
1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
104
2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
105
3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
106
4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
107
** Check status after setting value **
108
SHOW STATUS LIKE 'Qcache_not_cached';
112
SHOW STATUS LIKE 'Qcache_queries_in_cache';
114
Qcache_queries_in_cache 1
116
SET @@GLOBAL.query_cache_limit = @global_query_cache_limit;
117
SET GLOBAL query_cache_size = @global_query_cache_size;
118
SET GLOBAL query_cache_type = @global_query_cache_type;
119
DROP TABLE IF EXISTS t;