Debian Codegraph @

mysql-test/suite/group_replication/include/gr_consistent_statement_hold.inc

raw
1 ################################################################################
2 # Validate that a given statement goes through the `trans_begin` hook on Group
3 # Replication on server1.
4 #
5 # ==== Usage ====
6 #
7 # --let $statement_to_hold= STATEMENT
8 #
9 #
10 # Parameters:
11 #
12 # $statement_to_hold
13 # The statement to be validated.
14 #
15 ################################################################################
16
17 if (!$statement_to_hold)
18 {
19 --die "Missing argument 'statement_to_hold'"
20 }
21
22 --echo
23 --echo # Instrument GR to hold the statement on
24 --echo # `trans_begin` hook on server1.
25 --let $rpl_connection_name= server_1
26 --source include/rpl_connection.inc
27 --let $debug_point= group_replication_wait_on_observer_trans
28 --source include/add_debug_point.inc
29
30 --echo
31 --echo # Execute the statement on server1.
32 --let $rpl_connection_name= server1
33 --source include/rpl_connection.inc
34 --send_eval $statement_to_hold
35
36 --echo
37 --echo # Validate that the statement went on
38 --echo # `trans_begin` hook on server1.
39 --let $rpl_connection_name= server_1
40 --source include/rpl_connection.inc
41 SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_wait_on_observer_trans_waiting";
42
43 --echo
44 --echo # Release the statement from
45 --echo # `trans_begin` hook on server1.
46 SET DEBUG_SYNC= 'now SIGNAL signal.group_replication_wait_on_observer_trans_continue';
47
48 --echo
49 --echo # Reap the statement on server1.
50 --let $rpl_connection_name= server1
51 --source include/rpl_connection.inc
52 --disable_result_log
53 --reap
54 --enable_result_log
55
56 --echo
57 --echo # Remove GR instrumentaion to hold the statement on
58 --echo # `trans_begin` hook on server1.
59 --let $rpl_connection_name= server_1
60 --source include/rpl_connection.inc
61 --let $debug_point= group_replication_wait_on_observer_trans
62 --source include/remove_debug_point.inc