File: query_cache_limit_func.result

package info (click to toggle)
mariadb-10.0 10.0.32-0%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 476,064 kB
  • sloc: cpp: 1,400,131; ansic: 832,140; perl: 54,391; sh: 41,304; pascal: 32,365; yacc: 14,921; xml: 5,257; sql: 4,667; cs: 4,647; makefile: 4,555; ruby: 4,465; python: 2,292; lex: 1,427; java: 941; asm: 295; awk: 54; php: 22; sed: 16
file content (119 lines) | stat: -rw-r--r-- 3,332 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
** Setup **

SET @global_query_cache_limit = @@global.query_cache_limit;
SET @global_query_cache_size = @@global.query_cache_size;
SET @global_query_cache_type = @@global.query_cache_type;
** warnings **
DROP TABLE IF EXISTS t;
** creating table **
CREATE TABLE t
(
id INT AUTO_INCREMENT PRIMARY KEY,
c TEXT(30)
);
**inserting value **
INSERT INTO t set c = repeat('x',29);
INSERT INTO t set c = concat(repeat('x',28),'r','x');
INSERT INTO t set c = concat(repeat('x',28),'s','y');
INSERT INTO t set c = concat(repeat('x',28),'g','w');
** Reset cache values **
FLUSH STATUS;
RESET QUERY CACHE;
** On query_cache_type **
SET GLOBAL query_cache_type = ON;
** Allocating cache size **
SET GLOBAL query_cache_size = 131072;
** Reset values
SET GLOBAL query_cache_size = 0;
SET GLOBAL query_cache_size = 131072;
SET GLOBAL query_cache_type = ON;
'#---------------------FN_DYNVARS_132_01----------------------#'
** Reset cache values **
FLUSH STATUS;
RESET QUERY CACHE;
** fetching results **
SELECT * FROM t;
id	c
1	xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2	xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
3	xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
4	xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
** check status on not setting query_cache_limit value **
SHOW STATUS LIKE 'Qcache_not_cached';
Variable_name	Value
Qcache_not_cached	0
SHOW STATUS LIKE 'Qcache_queries_in_cache';
Variable_name	Value
Qcache_queries_in_cache	1
'#---------------------FN_DYNVARS_132_02----------------------#'
** Reset cache values **
FLUSH STATUS;
RESET QUERY CACHE;
** set cache limit **
SET @@GLOBAL.query_cache_limit = 0;
** fetching results **
SELECT * FROM t;
id	c
1	xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2	xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
3	xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
4	xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
** Check status after setting value **
SHOW STATUS LIKE 'Qcache_not_cached';
Variable_name	Value
Qcache_not_cached	1
1 Expected
SHOW STATUS LIKE 'Qcache_queries_in_cache';
Variable_name	Value
Qcache_queries_in_cache	0
0 Expected
'#---------------------FN_DYNVARS_132_03----------------------#'
** set cache limit **
SET @@GLOBAL.query_cache_limit = DEFAULT;
** Reset cache values **
FLUSH STATUS;
RESET QUERY CACHE;
** fetching results **
SELECT * FROM t;
id	c
1	xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2	xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
3	xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
4	xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
SHOW STATUS LIKE 'Qcache_not_cached';
Variable_name	Value
Qcache_not_cached	0
0 Expected
SHOW STATUS LIKE 'Qcache_queries_in_cache';
Variable_name	Value
Qcache_queries_in_cache	1
1 Expected
SET @@GLOBAL.query_cache_limit = 0;
SHOW STATUS LIKE 'Qcache_not_cached';
Variable_name	Value
Qcache_not_cached	0
0 Expected
SHOW STATUS LIKE 'Qcache_queries_in_cache';
Variable_name	Value
Qcache_queries_in_cache	1
1 Expected
** fetching results **
SELECT * FROM t;
id	c
1	xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2	xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
3	xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
4	xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
** Check status after setting value **
SHOW STATUS LIKE 'Qcache_not_cached';
Variable_name	Value
Qcache_not_cached	0
0 Expected
SHOW STATUS LIKE 'Qcache_queries_in_cache';
Variable_name	Value
Qcache_queries_in_cache	1
1 Expected
SET @@GLOBAL.query_cache_limit = @global_query_cache_limit;
SET GLOBAL query_cache_size = @global_query_cache_size;
SET GLOBAL query_cache_type = @global_query_cache_type;
DROP TABLE IF EXISTS t;