Debian Codegraph @

mysql-test/suite/group_replication/r/gr_operation_ignore_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 # Setup a new group
8 #
9 [connection server1]
10 include/start_and_bootstrap_group_replication.inc
11 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
12 INSERT INTO t1 VALUES (1);
13 #
14 # Set the super_read_only mode to 1 and check it works as expected
15 #
16 [connection server2]
17 SET @saved_value_super= @@GLOBAL.super_read_only;
18 SET @saved_value= @@GLOBAL.read_only;
19 SET GLOBAL super_read_only= 1;
20 INSERT INTO t1 VALUES (2);
21 ERROR HY000: The MySQL server is running with the --super-read-only option so it cannot execute this statement
22 #
23 # Start group replication. Check all is fine
24 #
25 include/start_group_replication.inc
26 include/assert.inc [On the recovered member, the table should contain 1 element]
27 #
28 # Stop group replication. Check all is fine
29 #
30 include/stop_group_replication.inc
31 include/assert.inc [The read mode should still be on]
32 [connection server1]
33 include/rpl_gr_wait_for_number_of_members.inc
34 #
35 # Cleaning up
36 #
37 [connection server2]
38 SET GLOBAL super_read_only= @saved_value_super;
39 SET GLOBAL read_only= @saved_value;
40 include/start_group_replication.inc
41 [connection server1]
42 DROP TABLE t1;
43 include/group_replication_end.inc