Debian Codegraph @

mysql-test/suite/group_replication/r/gr_start_timeout_set_super_read_only.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
7 ############################################################
8 # 1. Deploy a single-primary group, where server1 is the primary.
9 [connection server1]
10 include/start_and_bootstrap_group_replication.inc
11 CREATE TABLE t1 (c1 INT PRIMARY KEY);
12 [connection server2]
13 include/start_group_replication.inc
14
15 ############################################################
16 # 2. Stop GR on server2.
17 # Lock table t1 for writes on server2, that will make
18 # START GROUP_REPLICATION to timeout to enable super_read_only.
19 [connection server2]
20 include/stop_group_replication.inc
21 [connection server_2]
22 LOCK TABLE t1 WRITE;
23 [connection server2]
24 START GROUP_REPLICATION;
25 ERROR HY000: The server is not configured properly to be an active member of the group. Please see more details on error log.
26 include/assert_grep.inc [The error to enable super_read_only was logged]
27 SET SESSION sql_log_bin = 0;
28 call mtr.add_suppression("Could not enable the server read only mode and guarantee a safe recovery execution");
29 SET SESSION sql_log_bin = 1;
30
31 ############################################################
32 # 3. Unlock table t1 for writes on server2, START GROUP_REPLICATION
33 # will succeed, since server2 is a secondary we can assert that
34 # super_read_only is enabled after join the group.
35 [connection server_2]
36 UNLOCK TABLES;
37 [connection server2]
38 include/start_group_replication.inc
39 include/assert.inc [The super_read_only mode must be enabled]
40 include/assert.inc [The read_only mode must be enabled]
41
42 ############################################################
43 # 4. Clean up.
44 [connection server1]
45 DROP TABLE t1;
46 include/group_replication_end.inc