Debian Codegraph @

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

raw
1 ##
2 ## Miscellaneous test cases for performance_schema.processlist
3 ##
4 ## Test cases:
5 ## 1. Verify naming of foreground system threads.
6 ##
7
8 ##
9 ## Test Case 1: Verify naming of foreground system threads.
10 ##
11 ## Foreground system threads should be named 'system user' except for
12 ## singleton threads such as 'event_scheduler'.
13 ##
14 ## Reference: Bug#36895513 "Wrong result in P_S.processlist on replica node"
15 ## NOTE: Results must be manually verified.
16 ##
17
18 # Configure two servers to be source and replica.
19 include/master-slave.inc
20 Warnings:
21 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
22 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
23 [connection master]
24
25 # Wait until the replica SQL thread has been synced and all events have been copied over to the replica.
26 include/sync_slave_sql_with_master.inc
27
28 # Stop replica.
29 include/stop_slave.inc
30
31 # Start replica.
32 include/start_slave.inc
33
34 # Verify processlist user name is 'system_user'.
35
36 select * from performance_schema.processlist order by user, id;
37 ID USER HOST DB COMMAND TIME STATE INFO EXECUTION_ENGINE
38 <Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL PRIMARY
39 <Id> root <Host> test <Command> <Time> <State> NULL PRIMARY
40 <Id> root <Host> test <Command> <Time> <State> NULL PRIMARY
41 <Id> root <Host> test Query <Time> <State> select * from performance_schema.processlist order by user, id PRIMARY
42 <Id> root <Host> test <Command> <Time> <State> NULL PRIMARY
43 <Id> system user <Host> NULL <Command> <Time> <State> NULL PRIMARY
44 <Id> system user <Host> NULL Query <Time> <State> NULL PRIMARY
45 <Id> system user <Host> NULL <Command> <Time> <State> NULL PRIMARY
46 <Id> system user <Host> NULL <Command> <Time> <State> NULL PRIMARY
47 <Id> system user <Host> NULL <Command> <Time> <State> NULL PRIMARY
48 <Id> system user <Host> NULL <Command> <Time> <State> NULL PRIMARY
49
50 # Create user 'test_processlist' then restart the replica and verify that
51 # the processlist user name for the replica threads is 'system user'.
52
53 CREATE USER 'test_processlist'@'localhost';
54 GRANT ALL ON *.* TO 'test_processlist'@'localhost';
55
56 # Stop replica.
57 include/stop_slave.inc
58
59 # Connect as 'test_processlist'.
60
61 # Start replica as user 'test_processlist'.
62 include/start_slave.inc
63
64 # Verify processlist user name is 'system_user' for the replica threads.
65
66 select * from performance_schema.processlist order by user, id;
67 ID USER HOST DB COMMAND TIME STATE INFO EXECUTION_ENGINE
68 <Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL PRIMARY
69 <Id> root <Host> test <Command> <Time> <State> NULL PRIMARY
70 <Id> root <Host> test <Command> <Time> <State> NULL PRIMARY
71 <Id> root <Host> test <Command> <Time> <State> NULL PRIMARY
72 <Id> root <Host> test <Command> <Time> <State> NULL PRIMARY
73 <Id> system user <Host> NULL <Command> <Time> <State> NULL PRIMARY
74 <Id> system user <Host> NULL Query <Time> <State> NULL PRIMARY
75 <Id> system user <Host> NULL <Command> <Time> <State> NULL PRIMARY
76 <Id> system user <Host> NULL <Command> <Time> <State> NULL PRIMARY
77 <Id> system user <Host> NULL <Command> <Time> <State> NULL PRIMARY
78 <Id> system user <Host> NULL <Command> <Time> <State> NULL PRIMARY
79 <Id> test_processlist <Host> test Query <Time> <State> select * from performance_schema.processlist order by user, id PRIMARY
80
81 # Clean up.
82
83 DROP USER 'test_processlist'@'localhost';
84 include/rpl_end.inc