Debian Codegraph @

mysql-test/suite/rpl_nogtid/r/rpl_read_only_myisam.result

raw
1 include/master-slave.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 master]
6 call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
7 create user test;
8 include/sync_slave_sql_with_master.inc
9 create table t2(a int) engine=MyISAM;
10 insert into t2 values(2001);
11 set global read_only=1;
12 select @@read_only;
13 @@read_only
14 1
15 select * from t2;
16 a
17 2001
18 include/sync_slave_sql_with_master.inc
19 select @@read_only;
20 @@read_only
21 0
22 select * from t2;
23 a
24 2001
25 set global read_only=0;
26 BEGIN;
27 BEGIN;
28 select @@read_only;
29 @@read_only
30 0
31 set global read_only=1;
32 *** On SUPER USER connection ***
33 insert into t2 values(2002);
34 *** On regular USER connection ***
35 insert into t2 values(2003);
36 ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
37 *** SUPER USER COMMIT (must succeed) ***
38 COMMIT;
39 *** regular USER COMMIT (must succeed - nothing to commit) ***
40 COMMIT;
41 select @@read_only;
42 @@read_only
43 1
44 set global read_only=0;
45 insert into t2 values(2004);
46 select * from t2;
47 a
48 2001
49 2002
50 2004
51 include/sync_slave_sql_with_master.inc
52 select * from t2;
53 a
54 2001
55 2002
56 2004
57 set global read_only=1;
58 select @@read_only;
59 @@read_only
60 1
61 show create table t2;
62 Table Create Table
63 t2 CREATE TABLE `t2` (
64 `a` int DEFAULT NULL
65 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
66 insert into t2 values(2005);
67 select * from t2;
68 a
69 2001
70 2002
71 2004
72 2005
73 include/sync_slave_sql_with_master.inc
74 select * from t2;
75 a
76 2001
77 2002
78 2004
79 2005
80 insert into t2 values(2006);
81 ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
82 drop user test;
83 drop table t2;
84 include/sync_slave_sql_with_master.inc
85 set global read_only=0;
86 include/rpl_end.inc