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