~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysql-test/r/query_cache_limit_func.result

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
** Setup **
 
2
 
 
3
SET @global_query_cache_limit = @@global.query_cache_limit;
 
4
** warnings **
 
5
DROP TABLE IF EXISTS t;
 
6
** creating table **
 
7
CREATE TABLE t
 
8
(
 
9
id INT AUTO_INCREMENT PRIMARY KEY,
 
10
c TEXT(30)
 
11
);
 
12
**inserting value **
 
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 **
 
18
FLUSH STATUS;
 
19
RESET QUERY CACHE;
 
20
** On query_cache_type **
 
21
SET GLOBAL query_cache_type = ON;
 
22
** Allocating cache size **
 
23
SET GLOBAL query_cache_size = 131072;
 
24
** Reset values
 
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 **
 
30
FLUSH STATUS;
 
31
RESET QUERY CACHE;
 
32
** fetching results **
 
33
SELECT * FROM t;
 
34
id      c
 
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';
 
41
Variable_name   Value
 
42
Qcache_not_cached       0
 
43
SHOW STATUS LIKE 'Qcache_queries_in_cache';
 
44
Variable_name   Value
 
45
Qcache_queries_in_cache 1
 
46
'#---------------------FN_DYNVARS_132_02----------------------#'
 
47
** Reset cache values **
 
48
FLUSH STATUS;
 
49
RESET QUERY CACHE;
 
50
** set cache limit **
 
51
SET @@GLOBAL.query_cache_limit=0;
 
52
** fetching results **
 
53
SELECT * FROM t;
 
54
id      c
 
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';
 
61
Variable_name   Value
 
62
Qcache_not_cached       1
 
63
1 Expected
 
64
SHOW STATUS LIKE 'Qcache_queries_in_cache';
 
65
Variable_name   Value
 
66
Qcache_queries_in_cache 0
 
67
0 Expected
 
68
'#---------------------FN_DYNVARS_132_03----------------------#'
 
69
** set cache limit **
 
70
SET @@GLOBAL.query_cache_limit=DEFAULT;
 
71
** Reset cache values **
 
72
FLUSH STATUS;
 
73
RESET QUERY CACHE;
 
74
** fetching results **
 
75
SELECT * FROM t;
 
76
id      c
 
77
1       xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 
78
2       xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
 
79
3       xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
 
80
4       xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
 
81
SHOW STATUS LIKE 'Qcache_not_cached';
 
82
Variable_name   Value
 
83
Qcache_not_cached       0
 
84
0 Expected
 
85
SHOW STATUS LIKE 'Qcache_queries_in_cache';
 
86
Variable_name   Value
 
87
Qcache_queries_in_cache 1
 
88
1 Expected
 
89
SET @@GLOBAL.query_cache_limit=0;
 
90
SHOW STATUS LIKE 'Qcache_not_cached';
 
91
Variable_name   Value
 
92
Qcache_not_cached       0
 
93
0 Expected
 
94
SHOW STATUS LIKE 'Qcache_queries_in_cache';
 
95
Variable_name   Value
 
96
Qcache_queries_in_cache 1
 
97
1 Expected
 
98
** fetching results **
 
99
SELECT * FROM t;
 
100
id      c
 
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';
 
107
Variable_name   Value
 
108
Qcache_not_cached       0
 
109
0 Expected
 
110
SHOW STATUS LIKE 'Qcache_queries_in_cache';
 
111
Variable_name   Value
 
112
Qcache_queries_in_cache 1
 
113
1 Expected
 
114
SET @@GLOBAL.query_cache_limit = @global_query_cache_limit;
 
115
DROP TABLE IF EXISTS t;