~ubuntu-branches/ubuntu/trusty/mariadb-5.5/trusty-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2013-12-22 10:27:05 UTC
  • Revision ID: package-import@ubuntu.com-20131222102705-mndw7s12mz0szrcn
Tags: upstream-5.5.32
Import upstream version 5.5.32

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