1** Setup **
2
3SET @global_query_cache_limit = @@global.query_cache_limit;
4Warnings:
5Warning	1287	'@@query_cache_limit' is deprecated and will be removed in a future release.
6SET @global_query_cache_size = @@global.query_cache_size;
7Warnings:
8Warning	1287	'@@query_cache_size' is deprecated and will be removed in a future release.
9SET @global_query_cache_type = @@global.query_cache_type;
10Warnings:
11Warning	1287	'@@query_cache_type' is deprecated and will be removed in a future release.
12** warnings **
13DROP TABLE IF EXISTS t;
14** creating table **
15CREATE TABLE t
16(
17id INT AUTO_INCREMENT PRIMARY KEY,
18c TEXT(30)
19);
20**inserting value **
21INSERT INTO t set c = repeat('x',29);
22INSERT INTO t set c = concat(repeat('x',28),'r','x');
23INSERT INTO t set c = concat(repeat('x',28),'s','y');
24INSERT INTO t set c = concat(repeat('x',28),'g','w');
25** Reset cache values **
26FLUSH STATUS;
27RESET QUERY CACHE;
28Warnings:
29Warning	1681	'RESET QUERY CACHE' is deprecated and will be removed in a future release.
30** On query_cache_type **
31SET GLOBAL query_cache_type = ON;
32Warnings:
33Warning	1287	'@@query_cache_type' is deprecated and will be removed in a future release.
34** Allocating cache size **
35SET GLOBAL query_cache_size = 131072;
36Warnings:
37Warning	1287	'@@query_cache_size' is deprecated and will be removed in a future release.
38** Reset values
39SET GLOBAL query_cache_size = 0;
40Warnings:
41Warning	1287	'@@query_cache_size' is deprecated and will be removed in a future release.
42SET GLOBAL query_cache_size = 131072;
43Warnings:
44Warning	1287	'@@query_cache_size' is deprecated and will be removed in a future release.
45SET GLOBAL query_cache_type = ON;
46Warnings:
47Warning	1287	'@@query_cache_type' is deprecated and will be removed in a future release.
48'#---------------------FN_DYNVARS_132_01----------------------#'
49** Reset cache values **
50FLUSH STATUS;
51RESET QUERY CACHE;
52Warnings:
53Warning	1681	'RESET QUERY CACHE' is deprecated and will be removed in a future release.
54** fetching results **
55SELECT * FROM t;
56id	c
571	xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
582	xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
593	xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
604	xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
61** check status on not setting query_cache_limit value **
62SHOW STATUS LIKE 'Qcache_not_cached';
63Variable_name	Value
64Qcache_not_cached	0
65SHOW STATUS LIKE 'Qcache_queries_in_cache';
66Variable_name	Value
67Qcache_queries_in_cache	1
68'#---------------------FN_DYNVARS_132_02----------------------#'
69** Reset cache values **
70FLUSH STATUS;
71RESET QUERY CACHE;
72Warnings:
73Warning	1681	'RESET QUERY CACHE' is deprecated and will be removed in a future release.
74** set cache limit **
75SET @@GLOBAL.query_cache_limit = 0;
76Warnings:
77Warning	1287	'@@query_cache_limit' is deprecated and will be removed in a future release.
78** fetching results **
79SELECT * FROM t;
80id	c
811	xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
822	xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
833	xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
844	xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
85** Check status after setting value **
86SHOW STATUS LIKE 'Qcache_not_cached';
87Variable_name	Value
88Qcache_not_cached	1
891 Expected
90SHOW STATUS LIKE 'Qcache_queries_in_cache';
91Variable_name	Value
92Qcache_queries_in_cache	0
930 Expected
94'#---------------------FN_DYNVARS_132_03----------------------#'
95** set cache limit **
96SET @@GLOBAL.query_cache_limit = DEFAULT;
97Warnings:
98Warning	1287	'@@query_cache_limit' is deprecated and will be removed in a future release.
99** Reset cache values **
100FLUSH STATUS;
101RESET QUERY CACHE;
102Warnings:
103Warning	1681	'RESET QUERY CACHE' is deprecated and will be removed in a future release.
104** fetching results **
105SELECT * FROM t;
106id	c
1071	xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1082	xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
1093	xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
1104	xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
111SHOW STATUS LIKE 'Qcache_not_cached';
112Variable_name	Value
113Qcache_not_cached	0
1140 Expected
115SHOW STATUS LIKE 'Qcache_queries_in_cache';
116Variable_name	Value
117Qcache_queries_in_cache	1
1181 Expected
119SET @@GLOBAL.query_cache_limit = 0;
120Warnings:
121Warning	1287	'@@query_cache_limit' is deprecated and will be removed in a future release.
122SHOW STATUS LIKE 'Qcache_not_cached';
123Variable_name	Value
124Qcache_not_cached	0
1250 Expected
126SHOW STATUS LIKE 'Qcache_queries_in_cache';
127Variable_name	Value
128Qcache_queries_in_cache	1
1291 Expected
130** fetching results **
131SELECT * FROM t;
132id	c
1331	xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1342	xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
1353	xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
1364	xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
137** Check status after setting value **
138SHOW STATUS LIKE 'Qcache_not_cached';
139Variable_name	Value
140Qcache_not_cached	0
1410 Expected
142SHOW STATUS LIKE 'Qcache_queries_in_cache';
143Variable_name	Value
144Qcache_queries_in_cache	1
1451 Expected
146SET @@GLOBAL.query_cache_limit = @global_query_cache_limit;
147Warnings:
148Warning	1287	'@@query_cache_limit' is deprecated and will be removed in a future release.
149SET GLOBAL query_cache_size = @global_query_cache_size;
150Warnings:
151Warning	1287	'@@query_cache_size' is deprecated and will be removed in a future release.
152SET GLOBAL query_cache_type = @global_query_cache_type;
153Warnings:
154Warning	1287	'@@query_cache_type' is deprecated and will be removed in a future release.
155DROP TABLE IF EXISTS t;
156