Commit 44fac8ea authored by Luis Soares's avatar Luis Soares

BUG#11754075: BUG#45621: A FEW TEST FILES ARE DISABLED DUE TO WL#4284

  
Backporting the patch from BUG#11753506 into mysql-5.5 
as it is already in mysql-trunk but not in mysql-5.5.
parent 0d82c585
...@@ -27,15 +27,26 @@ a ...@@ -27,15 +27,26 @@ a
2001 2001
set global read_only=0; set global read_only=0;
BEGIN; BEGIN;
BEGIN;
select @@read_only;
@@read_only
0
set global read_only=1;
*** On SUPER USER connection ***
insert into t1 values(1002); insert into t1 values(1002);
insert into t2 values(2002); insert into t2 values(2002);
BEGIN; *** On regular USER connection ***
insert into t1 values(1003); 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); 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; COMMIT;
*** regular USER COMMIT (must succeed - nothing to commit) ***
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; set global read_only=0;
insert into t1 values(1004); insert into t1 values(1004);
insert into t2 values(2004); insert into t2 values(2004);
...@@ -48,7 +59,6 @@ select * from t2; ...@@ -48,7 +59,6 @@ select * from t2;
a a
2001 2001
2002 2002
2003
2004 2004
select * from t1; select * from t1;
a a
...@@ -59,7 +69,6 @@ select * from t2; ...@@ -59,7 +69,6 @@ select * from t2;
a a
2001 2001
2002 2002
2003
2004 2004
set global read_only=1; set global read_only=1;
select @@read_only; select @@read_only;
...@@ -87,7 +96,6 @@ select * from t2; ...@@ -87,7 +96,6 @@ select * from t2;
a a
2001 2001
2002 2002
2003
2004 2004
2005 2005
select * from t1; select * from t1;
...@@ -100,7 +108,6 @@ select * from t2; ...@@ -100,7 +108,6 @@ select * from t2;
a a
2001 2001
2002 2002
2003
2004 2004
2005 2005
insert into t1 values(1006); insert into t1 values(1006);
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
# #
############################################################################## ##############################################################################
rpl_read_only : WL#4284: Setting Read only won't succeed until all metadata locks are released.
rpl_row_create_table : Bug#51574 2010-02-27 andrei failed different way than earlier with bug#45576 rpl_row_create_table : Bug#51574 2010-02-27 andrei failed different way than earlier with bug#45576
rpl_spec_variables : BUG#47661 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux rpl_spec_variables : BUG#47661 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux
rpl_get_master_version_and_clock : Bug#59178 Jan 05 2011 joro Valgrind warnings rpl_get_master_version_and_clock rpl_get_master_version_and_clock : Bug#59178 Jan 05 2011 joro Valgrind warnings rpl_get_master_version_and_clock
......
...@@ -41,30 +41,39 @@ set global read_only=0; ...@@ -41,30 +41,39 @@ set global read_only=0;
connection master1; connection master1;
BEGIN; BEGIN;
connection master2;
BEGIN;
connection master;
select @@read_only;
set global read_only=1;
connection master1;
-- echo *** On SUPER USER connection ***
insert into t1 values(1002); insert into t1 values(1002);
--disable_warnings --disable_warnings
insert into t2 values(2002); insert into t2 values(2002);
--enable_warnings --enable_warnings
connection master2; connection master2;
BEGIN; -- echo *** On regular USER connection ***
--error ER_OPTION_PREVENTS_STATEMENT
insert into t1 values(1003); insert into t1 values(1003);
--disable_warnings --error ER_OPTION_PREVENTS_STATEMENT
insert into t2 values(2003); insert into t2 values(2003);
--enable_warnings
connection master;
set global read_only=1;
connection master1; connection master1;
## works even with read_only=1, because master1 is root ## works even with read_only=1, because master1 is root
-- echo *** SUPER USER COMMIT (must succeed) ***
COMMIT; COMMIT;
connection master2; connection master2;
--error ER_OPTION_PREVENTS_STATEMENT -- echo *** regular USER COMMIT (must succeed - nothing to commit) ***
COMMIT; COMMIT;
connection master; connection master;
select @@read_only;
set global read_only=0; set global read_only=0;
connection master1; connection master1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment