Debian Codegraph @

mysql-test/suite/perfschema/r/show_coverage.result

raw
1
2 # TEST 3
3 # Select status and system variable tables using ORDER BY to exercise the
4 # rnd_pos() method
5 #
6 use performance_schema;
7 select * from global_variables order by variable_name;
8 select * from variables_by_thread order by variable_name;
9 select * from session_variables order by variable_name;
10 select * from global_status order by variable_name;
11 select * from session_status order by variable_name;
12 select * from status_by_thread order by variable_name;
13 select * from status_by_user order by variable_name;
14 select * from status_by_host order by variable_name;
15 select * from status_by_account order by variable_name;
16
17 # TEST 4
18 # Handling of SHOW STATUS/VARIABLES ... WHERE
19 #
20 SHOW STATUS WHERE VARIABLE_NAME LIKE "foo";
21 Variable_name Value
22
23 SHOW GLOBAL STATUS WHERE VARIABLE_NAME LIKE "foo";
24 Variable_name Value
25
26 SHOW SESSION STATUS WHERE VARIABLE_NAME LIKE "foo";
27 Variable_name Value
28
29 SHOW VARIABLES WHERE VARIABLE_NAME LIKE "foo";
30 Variable_name Value
31
32 SHOW GLOBAL VARIABLES WHERE VARIABLE_NAME LIKE "foo";
33 Variable_name Value
34
35 SHOW SESSION VARIABLES WHERE VARIABLE_NAME LIKE "foo";
36 Variable_name Value
37
38 # TEST 5
39 # Confirm FLUSH STATUS resets counters for all threads.
40 #
41
42 # Create a new connection
43
44 # Record thread id
45
46 # Increase bytes_received for new connection
47 USE test;
48 SHOW TABLES;
49 Tables_in_test
50 USE performance_schema;
51
52 # Record bytes_received for other connection
53 SELECT variable_value FROM status_by_thread
54 WHERE variable_name = "bytes_received" and thread_id = @thread_id INTO @bytes_before;
55
56 # Reset status counters
57 FLUSH STATUS;
58
59 # Record bytes_received after reset
60 SELECT variable_value FROM status_by_thread
61 WHERE variable_name = "bytes_received" and thread_id = @thread_id INTO @bytes_after;
62
63 # Expect bytes_before > bytes_after
64 SELECT @bytes_before > @bytes_after AS 'Expect 1';
65 Expect 1
66 1
67
68 # Expect bytes_after is zero
69 SELECT @bytes_after AS 'Expect 0';
70 Expect 0
71 0
72
73 # TEST 6
74 #
75 # Bug#28291258 FLUSH STATUS ADDS TWICE TO GLOBAL VALUES
76 #
77
78 # Default connection
79
80 # First connection
81 include/assert.inc [Global value requested from the first session must not change]
82
83 # Generate a slow query
84
85 SET long_query_time = 2;
86 SELECT SLEEP(4);
87 SLEEP(4)
88 0
89 SET long_query_time = @@global.long_query_time;
90
91 include/assert.inc [Global value requested from the first session after SLEEP() must increase by 1]
92 include/assert.inc [First session value must increase by 1]
93
94 # Default connection
95 include/assert.inc [Global value requested from the default session after DISCONNECT must remain the same]
96 include/assert.inc [Default session value must remain zero]
97
98 FLUSH STATUS;
99
100 include/assert.inc [Global value requested from the default session after FLUSH must remain the same]
101 include/assert.inc [Default session value after FLUSH must remain zero]