Debian Codegraph @

mysql-test/suite/test_services/t/test_status_var_reader.test

raw
1 --echo #
2 --echo # WL#15173: A component service to read status variable values
3 --echo #
4
5 INSTALL COMPONENT "file://component_test_status_var_reader";
6
7 # Exclusions are due to not doing aggregation prior to fetching
8
9 --echo # FR5: test that no aggregation is triggered for session-altered variables
10 --echo # Should return 0 rows
11 query_vertical
12 SELECT VARIABLE_NAME, VARIABLE_VALUE, test_get_status_var(VARIABLE_NAME, 0)
13 FROM performance_schema.global_status
14 WHERE VARIABLE_VALUE = test_get_status_var(VARIABLE_NAME, 0) AND
15 VARIABLE_NAME IN (
16 'Bytes_received',
17 'Bytes_sent');
18
19 --echo # FR2, FR3, FR4.1 Test global status: should return 0 rows
20 #variables listed in the NOT IN should only be ones that are changed
21 #at session level and then aggregated
22 query_vertical
23 SELECT VARIABLE_NAME, VARIABLE_VALUE, test_get_status_var(VARIABLE_NAME, 0)
24 FROM performance_schema.global_status
25 WHERE VARIABLE_VALUE <> test_get_status_var(VARIABLE_NAME, 0) AND
26 VARIABLE_NAME NOT IN (
27 'Bytes_received',
28 'Bytes_sent',
29 'Handler_commit',
30 'Handler_external_lock',
31 'Handler_write',
32 'Handler_read_key',
33 'Handler_read_next',
34 'Handler_read_rnd_next',
35 'Created_tmp_disk_tables',
36 'Created_tmp_tables',
37 'Handler_read_first',
38 'Com_stmt_reprepare');
39
40 --echo # FR4 Test session status: should return 0 rows
41 # Should be the same list as above
42 query_vertical
43 SELECT VARIABLE_NAME, VARIABLE_VALUE, test_get_status_var(VARIABLE_NAME, 1)
44 FROM performance_schema.session_status
45 WHERE VARIABLE_VALUE <> test_get_status_var(VARIABLE_NAME, 1) AND
46 VARIABLE_NAME NOT IN (
47 'Bytes_received',
48 'Bytes_sent',
49 'Handler_commit',
50 'Handler_external_lock',
51 'Handler_write',
52 'Handler_read_key',
53 'Handler_read_next',
54 'Handler_read_rnd_next',
55 'Created_tmp_disk_tables',
56 'Created_tmp_tables',
57 'Handler_read_first',
58 'Com_stmt_reprepare');
59
60 UNINSTALL COMPONENT "file://component_test_status_var_reader";
61
62 --echo # End of 8.0 tests