Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
6d8b74dd
Commit
6d8b74dd
authored
Mar 05, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a test for drop trigger under --read-only
parent
18feb62f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
mysql-test/r/read_only.result
mysql-test/r/read_only.result
+3
-0
mysql-test/t/read_only.test
mysql-test/t/read_only.test
+4
-0
No files found.
mysql-test/r/read_only.result
View file @
6d8b74dd
...
@@ -6,6 +6,7 @@ connection default;
...
@@ -6,6 +6,7 @@ connection default;
set global read_only=0;
set global read_only=0;
connection con1;
connection con1;
create table t1 (a int);
create table t1 (a int);
create trigger trg1 before insert on t1 for each row set @a:=1;
insert into t1 values(1);
insert into t1 values(1);
create table t2 select * from t1;
create table t2 select * from t1;
connection default;
connection default;
...
@@ -20,6 +21,8 @@ create table t3 (a int);
...
@@ -20,6 +21,8 @@ create table t3 (a int);
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
insert into t1 values(1);
insert into t1 values(1);
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
drop trigger trg1;
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
update t1 set a=1 where 1=0;
update t1 set a=1 where 1=0;
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
update t1,t2 set t1.a=t2.a+1 where t1.a=t2.a;
update t1,t2 set t1.a=t2.a+1 where t1.a=t2.a;
...
...
mysql-test/t/read_only.test
View file @
6d8b74dd
...
@@ -30,6 +30,7 @@ set global read_only=0;
...
@@ -30,6 +30,7 @@ set global read_only=0;
connection
con1
;
connection
con1
;
create
table
t1
(
a
int
);
create
table
t1
(
a
int
);
create
trigger
trg1
before
insert
on
t1
for
each
row
set
@
a
:=
1
;
insert
into
t1
values
(
1
);
insert
into
t1
values
(
1
);
...
@@ -56,6 +57,9 @@ create table t3 (a int);
...
@@ -56,6 +57,9 @@ create table t3 (a int);
--
error
ER_OPTION_PREVENTS_STATEMENT
--
error
ER_OPTION_PREVENTS_STATEMENT
insert
into
t1
values
(
1
);
insert
into
t1
values
(
1
);
--
error
ER_OPTION_PREVENTS_STATEMENT
drop
trigger
trg1
;
# if a statement, after parse stage, looks like it will update a
# if a statement, after parse stage, looks like it will update a
# non-temp table, it will be rejected, even if at execution it would
# non-temp table, it will be rejected, even if at execution it would
# have turned out that 0 rows would be updated
# have turned out that 0 rows would be updated
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment