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
0ae54976
Commit
0ae54976
authored
Sep 09, 2004
by
dlenev@brandersnatch.localdomain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
After merge fixes for WL#1218 "Triggers"
parent
c46e6400
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
13 deletions
+12
-13
mysql-test/t/trigger.test
mysql-test/t/trigger.test
+10
-10
sql/sp_head.cc
sql/sp_head.cc
+1
-2
sql/sql_trigger.cc
sql/sql_trigger.cc
+1
-1
No files found.
mysql-test/t/trigger.test
View file @
0ae54976
...
...
@@ -151,15 +151,15 @@ drop table t1;
#
create
table
t1
(
i
int
);
--
error
136
2
--
error
136
3
create
trigger
trg
before
insert
on
t1
for
each
row
set
@
a
:=
old
.
i
;
--
error
136
2
--
error
136
3
create
trigger
trg
before
delete
on
t1
for
each
row
set
@
a
:=
new
.
i
;
--
error
1361
create
trigger
trg
before
update
on
t1
for
each
row
set
old
.
i
:=
1
;
--
error
1362
create
trigger
trg
before
update
on
t1
for
each
row
set
old
.
i
:=
1
;
--
error
1363
create
trigger
trg
before
delete
on
t1
for
each
row
set
new
.
i
:=
1
;
--
error
136
1
--
error
136
2
create
trigger
trg
after
update
on
t1
for
each
row
set
new
.
i
:=
1
;
# TODO: We should also test wrong field names here, we don't do it now
# because proper error handling is not in place yet.
...
...
@@ -173,23 +173,23 @@ create trigger trg after update on t1 for each row set new.i:=1;
create
trigger
trg
before
insert
on
t2
for
each
row
set
@
a
:=
1
;
create
trigger
trg
before
insert
on
t1
for
each
row
set
@
a
:=
1
;
--
error
135
8
--
error
135
9
create
trigger
trg
after
insert
on
t1
for
each
row
set
@
a
:=
1
;
--
error
135
8
--
error
135
9
create
trigger
trg2
before
insert
on
t1
for
each
row
set
@
a
:=
1
;
drop
trigger
t1
.
trg
;
--
error
13
59
--
error
13
60
drop
trigger
t1
.
trg
;
create
view
v1
as
select
*
from
t1
;
--
error
136
0
--
error
136
1
create
trigger
trg
before
insert
on
v1
for
each
row
set
@
a
:=
1
;
drop
view
v1
;
drop
table
t1
;
create
temporary
table
t1
(
i
int
);
--
error
136
0
--
error
136
1
create
trigger
trg
before
insert
on
t1
for
each
row
set
@
a
:=
1
;
drop
table
t1
;
sql/sp_head.cc
View file @
0ae54976
...
...
@@ -311,9 +311,8 @@ sp_head::init_strings(THD *thd, LEX *lex, sp_name *name)
}
else
if
(
thd
->
db
)
{
m_db
.
length
=
thd
->
db_length
m_db
.
length
=
thd
->
db_length
;
m_db
.
str
=
strmake_root
(
root
,
thd
->
db
,
m_db
.
length
);
}
if
(
m_param_begin
&&
m_param_end
)
...
...
sql/sql_trigger.cc
View file @
0ae54976
...
...
@@ -88,7 +88,7 @@ int mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
again until we are done. (Acquiring LOCK_open is not enough because
global read lock is held without helding LOCK_open).
*/
if
(
wait_if_global_read_lock
(
thd
,
0
))
if
(
wait_if_global_read_lock
(
thd
,
0
,
0
))
DBUG_RETURN
(
-
1
);
VOID
(
pthread_mutex_lock
(
&
LOCK_open
));
...
...
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