1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

5.1-specific changes for bug #26215 after merging the patch from 5.0:

- Added trigger tests back.
- Fixed test cases to match the extended output format of SHOW CREATE ...
- Replaced 'gptr' with 'uchar *'.
This commit is contained in:
kaa@polly.(none)
2007-11-02 16:40:08 +03:00
parent 4b12f94394
commit 794274ab10
3 changed files with 76 additions and 23 deletions

View File

@@ -167,8 +167,49 @@ delimiter ;
show create procedure nicesp;
drop procedure nicesp;
# Triggers can be tested only in 5.1, since 5.0 does not have
# SHOW CREATE TRIGGER
##============================================================================
## Comments inside triggers
##============================================================================
drop trigger if exists t1_empty;
create trigger t1_empty after delete on t1
for each row
begin
end;
show create trigger t1_empty;
drop trigger if exists t1_bi;
delimiter |
create trigger t1_bi before insert on t1
for each row
begin
# comment 1a
-- comment 1b
/*
comment 1c
*/
-- declare some variables here
declare b int;
declare c float;
-- do more stuff here
-- commented nicely and so on
-- famous last words ...
set NEW.data := 12;
end|
delimiter ;
show create trigger t1_bi;
# also make sure the trigger still works
insert into t1(id) value ("trig");
select * from t1;
##============================================================================
## Cleanup