Debian Codegraph @

mysql-test/suite/group_replication/r/gr_consistent_statement_hold_select_do.result

raw
1 include/group_replication.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 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.
5 [connection server1]
6
7 ############################################################
8 # 1. Bootstrap group on server1.
9 [connection server1]
10 include/start_and_bootstrap_group_replication.inc
11 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY);
12
13 ############################################################
14 # 2. Validate that a given SELECT that access tables goes
15 # through the `trans_begin` hook on Group Replication on
16 # server1.
17
18 # Instrument GR to hold the statement on
19 # `trans_begin` hook on server1.
20 [connection server_1]
21 # Adding debug point 'group_replication_wait_on_observer_trans' to @@GLOBAL.debug
22
23 # Execute the statement on server1.
24 [connection server1]
25 SELECT * FROM t1;
26
27 # Validate that the statement went on
28 # `trans_begin` hook on server1.
29 [connection server_1]
30 SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_wait_on_observer_trans_waiting";
31
32 # Release the statement from
33 # `trans_begin` hook on server1.
34 SET DEBUG_SYNC= 'now SIGNAL signal.group_replication_wait_on_observer_trans_continue';
35
36 # Reap the statement on server1.
37 [connection server1]
38
39 # Remove GR instrumentaion to hold the statement on
40 # `trans_begin` hook on server1.
41 [connection server_1]
42 # Removing debug point 'group_replication_wait_on_observer_trans' from @@GLOBAL.debug
43
44 ############################################################
45 # 3. Validate that a given SELECT that calls a UDF goes
46 # through the `trans_begin` hook on Group Replication on
47 # server1.
48
49 # Instrument GR to hold the statement on
50 # `trans_begin` hook on server1.
51 [connection server_1]
52 # Adding debug point 'group_replication_wait_on_observer_trans' to @@GLOBAL.debug
53
54 # Execute the statement on server1.
55 [connection server1]
56 SELECT group_replication_enable_member_action("mysql_disable_super_read_only_if_primary", "AFTER_PRIMARY_ELECTION");;
57
58 # Validate that the statement went on
59 # `trans_begin` hook on server1.
60 [connection server_1]
61 SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_wait_on_observer_trans_waiting";
62
63 # Release the statement from
64 # `trans_begin` hook on server1.
65 SET DEBUG_SYNC= 'now SIGNAL signal.group_replication_wait_on_observer_trans_continue';
66
67 # Reap the statement on server1.
68 [connection server1]
69
70 # Remove GR instrumentaion to hold the statement on
71 # `trans_begin` hook on server1.
72 [connection server_1]
73 # Removing debug point 'group_replication_wait_on_observer_trans' from @@GLOBAL.debug
74
75 ############################################################
76 # 4. Validate that a given DO that calls a UDF goes
77 # through the `trans_begin` hook on Group Replication on
78 # server1.
79
80 # Instrument GR to hold the statement on
81 # `trans_begin` hook on server1.
82 [connection server_1]
83 # Adding debug point 'group_replication_wait_on_observer_trans' to @@GLOBAL.debug
84
85 # Execute the statement on server1.
86 [connection server1]
87 DO group_replication_enable_member_action("mysql_disable_super_read_only_if_primary", "AFTER_PRIMARY_ELECTION");;
88
89 # Validate that the statement went on
90 # `trans_begin` hook on server1.
91 [connection server_1]
92 SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_wait_on_observer_trans_waiting";
93
94 # Release the statement from
95 # `trans_begin` hook on server1.
96 SET DEBUG_SYNC= 'now SIGNAL signal.group_replication_wait_on_observer_trans_continue';
97
98 # Reap the statement on server1.
99 [connection server1]
100
101 # Remove GR instrumentaion to hold the statement on
102 # `trans_begin` hook on server1.
103 [connection server_1]
104 # Removing debug point 'group_replication_wait_on_observer_trans' from @@GLOBAL.debug
105
106 ############################################################
107 # 5. Clean up.
108 [connection server1]
109 DROP TABLE t1;
110 include/group_replication_end.inc