diff options
author | dlenev@mysql.com <> | 2005-07-19 20:06:49 +0400 |
---|---|---|
committer | dlenev@mysql.com <> | 2005-07-19 20:06:49 +0400 |
commit | 8a3e723b7411826004b45bca14405fe2c18ea719 (patch) | |
tree | 2d8dccfe63df5146991d4448c19a59318ba78941 /mysql-test/t/information_schema.test | |
parent | bff3507b1d6ba1c8d0f46f6d19528a0d52e31610 (diff) | |
download | mariadb-git-8a3e723b7411826004b45bca14405fe2c18ea719.tar.gz |
Fix for bugs #5892/6182/8751/8758/10994 (based on Antony's patch)
"Triggers have the wrong namespace"
"Triggers: duplicate names allowed"
"Triggers: CREATE TRIGGER does not accept fully qualified names"
"SHOW TRIGGERS"
Diffstat (limited to 'mysql-test/t/information_schema.test')
-rw-r--r-- | mysql-test/t/information_schema.test | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 7c0624b67fd..08f572a593a 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -505,6 +505,41 @@ flush privileges; # SELECT table_schema, count(*) FROM information_schema.TABLES GROUP BY TABLE_SCHEMA; + +# +# TRIGGERS table test +# +create table t1 (i int, j int); + +delimiter |; +create trigger trg1 before insert on t1 for each row +begin + if new.j > 10 then + set new.j := 10; + end if; +end| +create trigger trg2 before update on t1 for each row +begin + if old.i % 2 = 0 then + set new.j := -1; + end if; +end| +create trigger trg3 after update on t1 for each row +begin + if new.j = -1 then + set @fired:= "Yes"; + end if; +end| +delimiter ;| +show triggers; +select * from information_schema.triggers; + +drop trigger trg1; +drop trigger trg2; +drop trigger trg3; +drop table t1; + + # # Bug #10964 Information Schema:Authorization check on privilege tables is improper # |