Debian Codegraph @

mysql-test/suite/group_replication/r/gr_set_gtid_mode.result

raw
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 SET SESSION sql_log_bin= 0;
7 include/gtid_utils.inc
8 SET SESSION sql_log_bin= 1;
9 SET SESSION sql_log_bin= 0;
10 include/gtid_utils.inc
11 SET SESSION sql_log_bin= 1;
12
13 ############################################################
14 # 1. Validate that it is not possible to change GTID_MODE to
15 # others modes except ON when Group Replication is running.
16 SET @@GLOBAL.GTID_MODE= OFF;
17 ERROR HY000: The value of @@GLOBAL.GTID_MODE can only be changed one step at a time: OFF <-> OFF_PERMISSIVE <-> ON_PERMISSIVE <-> ON. Also note that this value must be stepped up or down simultaneously on all servers. See the Manual for instructions.
18 include/assert.inc [GTID_MODE must be ON]
19 SET @@GLOBAL.GTID_MODE= OFF_PERMISSIVE;
20 ERROR HY000: The value of @@GLOBAL.GTID_MODE can only be changed one step at a time: OFF <-> OFF_PERMISSIVE <-> ON_PERMISSIVE <-> ON. Also note that this value must be stepped up or down simultaneously on all servers. See the Manual for instructions.
21 include/assert.inc [GTID_MODE must be ON]
22 SET @@GLOBAL.GTID_MODE= ON_PERMISSIVE;
23 ERROR HY000: SET @@GLOBAL.GTID_MODE = ON_PERMISSIVE is not allowed because group replication requires @@GLOBAL.GTID_MODE=ON.
24 include/assert.inc [GTID_MODE must be ON]
25 SET @@GLOBAL.GTID_MODE= ON;
26 include/assert.inc [GTID_MODE must be ON]
27
28 ############################################################
29 # 2. Validate that it is possible to change GTID_MODE to other
30 # modes than ON when Group Replication is not running.
31 # But start group replication will fail after that.
32 include/stop_group_replication.inc
33 SET @@GLOBAL.GTID_MODE= ON_PERMISSIVE;
34 include/assert.inc [GTID_MODE must be ON_PERMISSIVE]
35 START GROUP_REPLICATION;
36 ERROR HY000: The server is not configured properly to be an active member of the group. Please see more details on error log.
37 SET @@GLOBAL.GTID_MODE= OFF_PERMISSIVE;
38 include/assert.inc [GTID_MODE must be OFF_PERMISSIVE]
39 START GROUP_REPLICATION;
40 ERROR HY000: The server is not configured properly to be an active member of the group. Please see more details on error log.
41 SET @@GLOBAL.GTID_MODE= OFF;
42 include/assert.inc [GTID_MODE must be OFF]
43 START GROUP_REPLICATION;
44 ERROR HY000: The server is not configured properly to be an active member of the group. Please see more details on error log.
45 SET SESSION sql_log_bin= 0;
46 call mtr.add_suppression("Gtid mode should be ON for Group Replication");
47 SET SESSION sql_log_bin= 1;
48
49 ############################################################
50 # 3. Change GTID_MODE back to ON and check that Group
51 # Replication will work properly.
52 SET @@GLOBAL.GTID_MODE= OFF_PERMISSIVE;
53 SET @@GLOBAL.GTID_MODE= ON_PERMISSIVE;
54 SET @@GLOBAL.GTID_MODE= ON;
55 include/start_group_replication.inc
56 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
57 INSERT INTO t1 VALUES (1);
58 include/rpl_sync.inc
59
60 ############################################################
61 # 4. Check that GTID_EXECUTED on server 1 contains all
62 # transactions.
63 # Also check that data is on tables.
64 include/assert.inc [GTID_EXECUTED must contain all committed GTIDs]
65 include/assert.inc ['There is a value 1 in table t1']
66 include/assert.inc [GTID_EXECUTED must contain all committed GTIDs]
67 include/assert.inc ['There is a value 1 in table t1']
68
69 ############################################################
70 # 5. Clean up.
71 DROP TABLE t1;
72 SET SESSION sql_log_bin= 0;
73 include/gtid_utils_end.inc
74 SET SESSION sql_log_bin= 1;
75 SET SESSION sql_log_bin= 0;
76 include/gtid_utils_end.inc
77 SET SESSION sql_log_bin= 1;
78 include/group_replication_end.inc