|
| 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 | +# 1. Add debug point to reduce certifier broadcast time to 1 second. |
| 8 | +# Bootstrap M1 and join M2. |
| 9 | +[connection server1] |
| 10 | +SET @@GLOBAL.DEBUG= '+d,group_replication_certifier_broadcast_thread_short_period'; |
| 11 | +include/start_and_bootstrap_group_replication.inc |
| 12 | +[connection server2] |
| 13 | +SET @@GLOBAL.DEBUG= '+d,group_replication_certifier_broadcast_thread_short_period'; |
| 14 | +SET @@GLOBAL.DEBUG= '+d,group_replication_certifier_garbage_collection_ran'; |
| 15 | +include/start_group_replication.inc |
| 16 | +################################################################# |
| 17 | +# 2. Insert 5 rows. |
| 18 | +# Wait for garbage collector to run for every insert. |
| 19 | +[connection server1] |
| 20 | +CREATE TABLE t1(c1 INT PRIMARY KEY); |
| 21 | +[connection server2] |
| 22 | +SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_certifier_garbage_collection_finished"; |
| 23 | +[connection server1] |
| 24 | +INSERT INTO t1 VALUES (1); |
| 25 | +[connection server2] |
| 26 | +SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_certifier_garbage_collection_finished"; |
| 27 | +[connection server1] |
| 28 | +INSERT INTO t1 VALUES (2); |
| 29 | +[connection server2] |
| 30 | +SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_certifier_garbage_collection_finished"; |
| 31 | +[connection server1] |
| 32 | +INSERT INTO t1 VALUES (3); |
| 33 | +[connection server2] |
| 34 | +SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_certifier_garbage_collection_finished"; |
| 35 | +[connection server1] |
| 36 | +INSERT INTO t1 VALUES (4); |
| 37 | +[connection server2] |
| 38 | +SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_certifier_garbage_collection_finished"; |
| 39 | +[connection server1] |
| 40 | +INSERT INTO t1 VALUES (5); |
| 41 | +include/rpl_sync.inc |
| 42 | +################################################################# |
| 43 | +# 3. Assert sequence numbers and last_committed are correct. |
| 44 | +# Verify no gaps in sequence number. |
| 45 | +[connection server2] |
| 46 | +include/include/assert_logical_timestamps.inc [0 0;1 2;2 3;3 4;4 5;5 6;6 7] |
| 47 | +################################################################# |
| 48 | +# 4. Run 5 DDLs. |
| 49 | +# Wait for garbage collector to run for every statement. |
| 50 | +[connection server1] |
| 51 | +[connection server2] |
| 52 | +SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_certifier_garbage_collection_finished"; |
| 53 | +[connection server1] |
| 54 | +CREATE TABLE tt1(c1 INT PRIMARY KEY); |
| 55 | +[connection server2] |
| 56 | +SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_certifier_garbage_collection_finished"; |
| 57 | +[connection server1] |
| 58 | +CREATE TABLE tt2(c1 INT PRIMARY KEY); |
| 59 | +[connection server2] |
| 60 | +SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_certifier_garbage_collection_finished"; |
| 61 | +[connection server1] |
| 62 | +CREATE TABLE tt3(c1 INT PRIMARY KEY); |
| 63 | +[connection server2] |
| 64 | +SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_certifier_garbage_collection_finished"; |
| 65 | +[connection server1] |
| 66 | +CREATE TABLE tt4(c1 INT PRIMARY KEY); |
| 67 | +[connection server2] |
| 68 | +SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_certifier_garbage_collection_finished"; |
| 69 | +[connection server1] |
| 70 | +CREATE TABLE tt5(c1 INT PRIMARY KEY); |
| 71 | +include/rpl_sync.inc |
| 72 | +################################################################# |
| 73 | +# 5. Assert sequence numbers and last_committed are correct. |
| 74 | +# Verify no gaps in sequence number. |
| 75 | +[connection server2] |
| 76 | +include/include/assert_logical_timestamps.inc [0 0;1 2;2 3;3 4;4 5;5 6;6 7;7 8;8 9;9 10;10 11;11 12] |
| 77 | +################################################################# |
| 78 | +# 6. Stop the group. |
| 79 | +[connection server2] |
| 80 | +include/stop_group_replication.inc |
| 81 | +SET @@GLOBAL.DEBUG= '-d,group_replication_certifier_garbage_collection_ran'; |
| 82 | +SET @@GLOBAL.DEBUG= '-d,group_replication_certifier_broadcast_thread_short_period'; |
| 83 | +SET DEBUG_SYNC= 'RESET'; |
| 84 | +[connection server1] |
| 85 | +include/stop_group_replication.inc |
| 86 | +SET @@GLOBAL.DEBUG= '-d,group_replication_certifier_broadcast_thread_short_period'; |
| 87 | +################################################################# |
| 88 | +# 7. Add debug point to disable certification info garbage collection. |
| 89 | +# Bootstrap M1 and join M2. |
| 90 | +[connection server1] |
| 91 | +SET @@GLOBAL.DEBUG= '+d,group_replication_do_not_clear_certification_database'; |
| 92 | +SET @@GLOBAL.DEBUG= '+d,group_replication_certifier_broadcast_thread_big_period'; |
| 93 | +include/start_and_bootstrap_group_replication.inc |
| 94 | +[connection server2] |
| 95 | +SET @@GLOBAL.DEBUG= '+d,group_replication_do_not_clear_certification_database'; |
| 96 | +SET @@GLOBAL.DEBUG= '+d,group_replication_certifier_broadcast_thread_big_period'; |
| 97 | +include/start_group_replication.inc |
| 98 | +################################################################# |
| 99 | +# 8. Insert 10 rows. |
| 100 | +[connection server1] |
| 101 | +[connection server1] |
| 102 | +INSERT INTO test.t1 VALUES (6); |
| 103 | +[connection server1] |
| 104 | +INSERT INTO test.t1 VALUES (7); |
| 105 | +[connection server1] |
| 106 | +INSERT INTO test.t1 VALUES (8); |
| 107 | +[connection server1] |
| 108 | +INSERT INTO test.t1 VALUES (9); |
| 109 | +[connection server1] |
| 110 | +INSERT INTO test.t1 VALUES (10); |
| 111 | +[connection server1] |
| 112 | +INSERT INTO test.t1 VALUES (11); |
| 113 | +[connection server1] |
| 114 | +INSERT INTO test.t1 VALUES (12); |
| 115 | +[connection server1] |
| 116 | +INSERT INTO test.t1 VALUES (13); |
| 117 | +[connection server1] |
| 118 | +INSERT INTO test.t1 VALUES (14); |
| 119 | +[connection server1] |
| 120 | +INSERT INTO test.t1 VALUES (15); |
| 121 | +include/rpl_sync.inc |
| 122 | +[connection server2] |
| 123 | +include/include/assert_logical_timestamps.inc [0 0;1 2;1 3;1 4;1 5;1 6;1 7;1 8;1 9;1 10;1 11] |
| 124 | +################################################################# |
| 125 | +# 9. Run 5 DDLs. |
| 126 | +[connection server1] |
| 127 | +DROP TABLE tt1; |
| 128 | +DROP TABLE tt2; |
| 129 | +DROP TABLE tt3; |
| 130 | +DROP TABLE tt4; |
| 131 | +DROP TABLE tt5; |
| 132 | +include/rpl_sync.inc |
| 133 | +[connection server2] |
| 134 | +include/include/assert_logical_timestamps.inc [0 0;1 2;1 3;1 4;1 5;1 6;1 7;1 8;1 9;1 10;1 11;11 12;12 13;13 14;14 15;15 16] |
| 135 | +################################################################# |
| 136 | +# 10. Cleanup. |
| 137 | +[connection server1] |
| 138 | +DROP TABLE t1; |
| 139 | +include/rpl_sync.inc |
| 140 | +[connection server2] |
| 141 | +include/stop_group_replication.inc |
| 142 | +SET @@GLOBAL.DEBUG= '-d,group_replication_do_not_clear_certification_database'; |
| 143 | +SET @@GLOBAL.DEBUG= '-d,group_replication_certifier_broadcast_thread_big_period'; |
| 144 | +[connection server1] |
| 145 | +include/stop_group_replication.inc |
| 146 | +SET @@GLOBAL.DEBUG= '-d,group_replication_do_not_clear_certification_database'; |
| 147 | +SET @@GLOBAL.DEBUG= '-d,group_replication_certifier_broadcast_thread_big_period'; |
| 148 | +include/group_replication_end.inc |
0 commit comments