summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-07-18 14:47:40 +0200
committerSergei Golubchik <serg@mariadb.org>2017-07-18 14:59:33 +0200
commit9b3360ea4417ed653d5c7eed29f4ef7e80618e43 (patch)
treeecd7b7db6547f5ad1e80dda928f79ee176f5efcf /mysql-test
parentf6bcdb9e3c955f0a998a996edd93362deca31edf (diff)
downloadmariadb-git-9b3360ea4417ed653d5c7eed29f4ef7e80618e43.tar.gz
BUG#25250768: WRITING ON A READ_ONLY=ON SERVER WITHOUT SUPER PRIVILEGE
simplify. add a test case.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/read_only.result2
-rw-r--r--mysql-test/t/read_only.test3
2 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/r/read_only.result b/mysql-test/r/read_only.result
index 1ffe2b86f70..807dc426696 100644
--- a/mysql-test/r/read_only.result
+++ b/mysql-test/r/read_only.result
@@ -30,6 +30,8 @@ create temporary table t3 (a int);
create temporary table t4 (a int) select * from t3;
insert into t3 values(1);
insert into t4 select * from t3;
+create table t3 (a int);
+ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
update t1,t3 set t1.a=t3.a+1 where t1.a=t3.a;
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
update t1,t3 set t3.a=t1.a+1 where t1.a=t3.a;
diff --git a/mysql-test/t/read_only.test b/mysql-test/t/read_only.test
index 52349747883..a0bd7b49273 100644
--- a/mysql-test/t/read_only.test
+++ b/mysql-test/t/read_only.test
@@ -80,6 +80,9 @@ insert into t3 values(1);
insert into t4 select * from t3;
+--error ER_OPTION_PREVENTS_STATEMENT
+create table t3 (a int);
+
# a non-temp table updated:
--error ER_OPTION_PREVENTS_STATEMENT
update t1,t3 set t1.a=t3.a+1 where t1.a=t3.a;