summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/r/rpl_read_only.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/rpl/r/rpl_read_only.result')
-rw-r--r--mysql-test/suite/rpl/r/rpl_read_only.result32
1 files changed, 18 insertions, 14 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_read_only.result b/mysql-test/suite/rpl/r/rpl_read_only.result
index 971b20fcf3a..2f1f8cc1efb 100644
--- a/mysql-test/suite/rpl/r/rpl_read_only.result
+++ b/mysql-test/suite/rpl/r/rpl_read_only.result
@@ -1,10 +1,6 @@
-stop slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-reset master;
-reset slave;
-drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
-start slave;
-call mtr.add_suppression("Unsafe statement written to the binary log in statement format since BINLOG_FORMAT = STATEMENT");
+include/master-slave.inc
+[connection master]
+call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
create user test;
create table t1(a int) engine=InnoDB;
create table t2(a int) engine=MyISAM;
@@ -31,15 +27,26 @@ a
2001
set global read_only=0;
BEGIN;
+BEGIN;
+select @@read_only;
+@@read_only
+0
+set global read_only=1;
+*** On SUPER USER connection ***
insert into t1 values(1002);
insert into t2 values(2002);
-BEGIN;
+*** On regular USER connection ***
insert into t1 values(1003);
+ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
insert into t2 values(2003);
-set global read_only=1;
+ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
+*** SUPER USER COMMIT (must succeed) ***
COMMIT;
+*** regular USER COMMIT (must succeed - nothing to commit) ***
COMMIT;
-ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
+select @@read_only;
+@@read_only
+1
set global read_only=0;
insert into t1 values(1004);
insert into t2 values(2004);
@@ -52,7 +59,6 @@ select * from t2;
a
2001
2002
-2003
2004
select * from t1;
a
@@ -63,7 +69,6 @@ select * from t2;
a
2001
2002
-2003
2004
set global read_only=1;
select @@read_only;
@@ -91,7 +96,6 @@ select * from t2;
a
2001
2002
-2003
2004
2005
select * from t1;
@@ -104,7 +108,6 @@ select * from t2;
a
2001
2002
-2003
2004
2005
insert into t1 values(1006);
@@ -115,3 +118,4 @@ drop user test;
drop table t1;
drop table t2;
set global read_only=0;
+include/rpl_end.inc