blob: 8f5bc4b6f3739fff74df06670e66bf84379758c3 (
plain)
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
|
connection node_2;
connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
RESET QUERY CACHE;
FLUSH STATUS;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Qcache_queries_in_cache';
VARIABLE_VALUE = 1
1
SELECT COUNT(*) FROM t1;
COUNT(*)
1
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits';
VARIABLE_VALUE = 1
1
connection node_1;
INSERT INTO t1 VALUES (2);
connection node_2;
FLUSH STATUS;
SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Qcache_queries_in_cache';
VARIABLE_VALUE = 0
1
SELECT COUNT(*) FROM t1;
COUNT(*)
2
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Qcache_queries_in_cache';
VARIABLE_VALUE = 1
1
SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits';
VARIABLE_VALUE = 0
1
SELECT COUNT(*) FROM t1;
COUNT(*)
2
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits';
VARIABLE_VALUE = 1
1
connection node_1;
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
connection node_2;
FLUSH STATUS;
SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Qcache_queries_in_cache';
VARIABLE_VALUE = 0
1
SELECT COUNT(*) FROM t1;
COUNT(*)
2
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Qcache_queries_in_cache';
VARIABLE_VALUE = 1
1
SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits';
VARIABLE_VALUE = 0
1
SELECT COUNT(*) FROM t1;
COUNT(*)
2
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits';
VARIABLE_VALUE = 1
1
DROP TABLE t1;
|