| 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 |
# 2. Prepare server1, creating some transactions for recovery. |
| 8 |
|
| 9 |
[connection server1] |
| 10 |
SET SESSION sql_log_bin=0; |
| 11 |
CREATE TABLE test.t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; |
| 12 |
SET SESSION sql_log_bin=1; |
| 13 |
include/start_and_bootstrap_group_replication.inc |
| 14 |
INSERT INTO test.t1 VALUES (1); |
| 15 |
|
| 16 |
3. Prepare server2, block server2 on recovery. |
| 17 |
|
| 18 |
[connection server2] |
| 19 |
SET @debug_group_replication_recovery_complete_at= @@GLOBAL.group_replication_recovery_complete_at; |
| 20 |
SET SESSION sql_log_bin=0; |
| 21 |
CREATE TABLE test.t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; |
| 22 |
SET SESSION sql_log_bin=1; |
| 23 |
SET @@global.group_replication_recovery_complete_at= "transactions_certified"; |
| 24 |
Warnings: |
| 25 |
Warning 1681 'group_replication_recovery_complete_at' is deprecated and will be removed in a future release. |
| 26 |
LOCK TABLE test.t1 READ; |
| 27 |
[connection server_2] |
| 28 |
include/start_group_replication.inc |
| 29 |
Warnings: |
| 30 |
Warning 1681 'group_replication_recovery_complete_at' is deprecated and will be removed in a future release. |
| 31 |
|
| 32 |
# 4. Create some transactions on server1 while server2 is in recovery. |
| 33 |
# This transactions will be applied by server2 when out of recovery. |
| 34 |
|
| 35 |
[connection server1] |
| 36 |
insert into test.t1 values(100); |
| 37 |
insert into test.t1 values(102); |
| 38 |
|
| 39 |
# 5. Unlock all server2 tables and let recovery finish. |
| 40 |
|
| 41 |
[connection server2] |
| 42 |
unlock tables; |
| 43 |
|
| 44 |
# 6. Transactions received during recovery, when |
| 45 |
# group_replication_recovery_complete_at was set to |
| 46 |
# "transactions_certified", do not make counter go negative. |
| 47 |
|
| 48 |
[connection server1] |
| 49 |
[connection server2] |
| 50 |
|
| 51 |
# 7. Cleanup. |
| 52 |
|
| 53 |
[connection server2] |
| 54 |
SET @@GLOBAL.group_replication_recovery_complete_at= @debug_group_replication_recovery_complete_at; |
| 55 |
Warnings: |
| 56 |
Warning 1681 'group_replication_recovery_complete_at' is deprecated and will be removed in a future release. |
| 57 |
[connection server1] |
| 58 |
DROP TABLE test.t1; |
| 59 |
include/group_replication_end.inc |