File: gr_stop_async_on_stop_gr.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (77 lines) | stat: -rw-r--r-- 3,905 bytes parent folder | download
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
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. Setup Group Replication on server 1.
[connection server1]
include/start_and_bootstrap_group_replication.inc

############################################################
#  2. Setup a asynchronous replication connection from server 2
#     into group (server 1)
[connection server1]
CHANGE REPLICATION SOURCE TO SOURCE_HOST='localhost', SOURCE_USER='root', SOURCE_PORT=SERVER_2_PORT, SOURCE_AUTO_POSITION=1 for channel 'ch2_1';
Warnings:
Note	1759	Sending passwords in plain text without SSL/TLS is extremely insecure.
Note	1760	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.
include/start_slave.inc

############################################################
#  3. Execute some transactions on server 2.
[connection server2]
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (0);

############################################################
#  4. Wait until transactions executed on server 2 are applied
#     on group.
include/sync_slave_sql_with_master.inc [FOR CHANNEL ch2_1]

############################################################
#  5. Activate group_replication_stop_all_channels_failure
#     debug sync point, which will return
#     ER_GROUP_REPLICATION_COMMAND_FAILURE error, when stop
#     group replication calls to stop all replication channels.
[connection server1]
# 5.1. Stop Group Replication
SET @debug_save= @@GLOBAL.DEBUG;
SET @@GLOBAL.DEBUG='d,group_replication_stop_all_channels_failure';
STOP GROUP_REPLICATION;
ERROR HY000: The STOP GROUP_REPLICATION command encountered a failure. Error stopping all replication channels while server was leaving the group. Error stopping channel(s):  '' [error number: 1], 'ch2_1' [error number: 1]. Please check the error log for additional details.
SET @@GLOBAL.DEBUG= @debug_save;
# 5.2. Verify member is OFFLINE
include/gr_wait_for_member_state.inc
# 5.3. Verify occurrence of error message
Occurrences of 'Error stopping channel: ch2_1. Got error: 1, Error_code: MY-000001' in the input file: 1
Occurrences of 'Error stopping channel: . Got error: 1, Error_code: MY-000001' in the input file: 1

############################################################
#  6. Execute data on server 2 and ensure it is not accepted on server 1.
[connection server2]
INSERT INTO t1 VALUES (1);

############################################################
#  7. Verify channel ch2_1 IO and SQL THREADS are OFF
[connection server1]
include/wait_for_slave_to_stop.inc [FOR CHANNEL 'ch2_1']
include/assert.inc [Verify channel ch2_1 IO_THREAD is OFF]
include/assert.inc [Verify channel ch2_1 SQL_THREAD is OFF]

############################################################
#  8. Verify data isn't replicated to group i.e. server1
include/assert.inc ['There is no value 1 in table t1']

############################################################
#  9. Clean Up
[connection server1]
SET GLOBAL read_only= 0;
RESET SLAVE ALL FOR CHANNEL 'ch2_1';
Warnings:
Warning	1287	'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
DROP TABLE test.t1;
[connection server2]
DROP TABLE test.t1;
include/group_replication_end.inc