summaryrefslogtreecommitdiff
path: root/mysql-test/r/read_only.result
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.local>2006-12-12 13:57:28 +0300
committerunknown <kostja@bodhi.local>2006-12-12 13:57:28 +0300
commitfabf58c6cc475e0d3837f94b5e345d8be059d248 (patch)
treee2983d5a19c729d791bd229e0032731aec15c933 /mysql-test/r/read_only.result
parente54bbaa3fb8793905d37af808b9bee6a49df358a (diff)
parent62273f8e661c760fbb672ccb0eba80fba34f2c11 (diff)
downloadmariadb-git-fabf58c6cc475e0d3837f94b5e345d8be059d248.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into bodhi.local:/opt/local/work/mysql-5.1-runtime mysql-test/r/log_tables.result: Auto merged sql/handler.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_yacc.yy: Auto merged mysql-test/r/read_only.result: Manual merge. mysql-test/t/read_only.test: Manual merge. server-tools/instance-manager/guardian.cc: Manual merge.
Diffstat (limited to 'mysql-test/r/read_only.result')
-rw-r--r--mysql-test/r/read_only.result52
1 files changed, 51 insertions, 1 deletions
diff --git a/mysql-test/r/read_only.result b/mysql-test/r/read_only.result
index 69d25fbef6f..d479fdb4c3c 100644
--- a/mysql-test/r/read_only.result
+++ b/mysql-test/r/read_only.result
@@ -39,6 +39,57 @@ delete t1 from t1,t3 where t1.a=t3.a;
drop table t1;
insert into t1 values(1);
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
+set global read_only=0;
+lock table t1 write;
+lock table t2 write;
+set global read_only=1;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+unlock tables ;
+set global read_only=1;
+select @@global.read_only;
+@@global.read_only
+0
+unlock tables ;
+select @@global.read_only;
+@@global.read_only
+1
+set global read_only=0;
+lock table t1 read;
+lock table t2 read;
+set global read_only=1;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+unlock tables ;
+set global read_only=1;
+select @@global.read_only;
+@@global.read_only
+0
+unlock tables ;
+select @@global.read_only;
+@@global.read_only
+1
+set global read_only=0;
+BEGIN;
+BEGIN;
+set global read_only=1;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+ROLLBACK;
+set global read_only=1;
+select @@global.read_only;
+@@global.read_only
+1
+ROLLBACK;
+set global read_only=0;
+flush tables with read lock;
+set global read_only=1;
+unlock tables;
+set global read_only=0;
+flush tables with read lock;
+set global read_only=1;
+select @@global.read_only;
+@@global.read_only
+1
+unlock tables;
+set global read_only=0;
drop temporary table ttt;
ERROR 42S02: Unknown table 'ttt'
drop temporary table if exists ttt;
@@ -46,4 +97,3 @@ Warnings:
Note 1051 Unknown table 'ttt'
drop table t1,t2;
drop user test@localhost;
-set global read_only=0;