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
334b9c7a
Commit
334b9c7a
authored
Feb 21, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge neptunus.(none):/home/msvensson/mysql/bug16878/my50-bug16878
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
parents
a699a2ea
e50d43b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
0 deletions
+85
-0
mysql-test/r/mysqldump.result
mysql-test/r/mysqldump.result
+36
-0
mysql-test/t/mysqldump.test
mysql-test/t/mysqldump.test
+47
-0
sql/sp_head.cc
sql/sp_head.cc
+2
-0
No files found.
mysql-test/r/mysqldump.result
View file @
334b9c7a
...
...
@@ -2657,3 +2657,39 @@ a
789
drop table t1;
drop view v1, v2, v3, v4, v5;
create table t1 (a int, created datetime);
create table t2 (b int, created datetime);
create trigger tr1 before insert on t1 for each row set
new.created=now();
create trigger tr2 after insert on t1
for each row
begin
insert into t2 set b=new.a and created=new.created;
end|
drop trigger tr1;
drop trigger tr2;
drop table t1, t2;
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
tr1 INSERT t1 set
new.created=now() BEFORE # root@localhost
tr2 INSERT t1 begin
insert into t2 set b=new.a and created=new.created;
end AFTER # root@localhost
drop trigger tr1;
drop trigger tr2;
drop table t1, t2;
/*!50003 CREATE FUNCTION `f`() RETURNS bigint(20)
return 42 */|
/*!50003 CREATE PROCEDURE `p`()
select 42 */|
show create function f;
Function sql_mode Create Function
f CREATE FUNCTION `f`() RETURNS bigint(20)
return 42
show create procedure p;
Procedure sql_mode Create Procedure
p CREATE PROCEDURE `p`()
select 42
drop function f;
drop procedure p;
mysql-test/t/mysqldump.test
View file @
334b9c7a
...
...
@@ -1066,3 +1066,50 @@ select * from v3 order by a;
drop
table
t1
;
drop
view
v1
,
v2
,
v3
,
v4
,
v5
;
#
# Bug #16878 dump of trigger
#
create
table
t1
(
a
int
,
created
datetime
);
create
table
t2
(
b
int
,
created
datetime
);
create
trigger
tr1
before
insert
on
t1
for
each
row
set
new
.
created
=
now
();
delimiter
|
;
create
trigger
tr2
after
insert
on
t1
for
each
row
begin
insert
into
t2
set
b
=
new
.
a
and
created
=
new
.
created
;
end
|
delimiter
;
|
# dump table and trigger
--
exec
$MYSQL_DUMP
test
>
var
/
tmp
/
bug16878
.
sql
drop
trigger
tr1
;
drop
trigger
tr2
;
drop
table
t1
,
t2
;
# reload dump
--
exec
$MYSQL
test
<
var
/
tmp
/
bug16878
.
sql
--
replace_column
6
#
show
triggers
;
drop
trigger
tr1
;
drop
trigger
tr2
;
drop
table
t1
,
t2
;
#
# Bug#14857 Reading dump files with single statement stored routines fails.
# fixed by patch for bug#16878
#
#
DELIMITER
|
;
/*!50003 CREATE FUNCTION `f`() RETURNS bigint(20)
return 42 */
|
/*!50003 CREATE PROCEDURE `p`()
select 42 */
|
DELIMITER
;
|
show
create
function
f
;
show
create
procedure
p
;
drop
function
f
;
drop
procedure
p
;
sql/sp_head.cc
View file @
334b9c7a
...
...
@@ -1603,6 +1603,8 @@ sp_head::reset_lex(THD *thd)
sublex
->
trg_table_fields
.
empty
();
sublex
->
sp_lex_in_use
=
FALSE
;
sublex
->
in_comment
=
oldlex
->
in_comment
;
/* Reset type info. */
sublex
->
charset
=
NULL
;
...
...
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