summaryrefslogtreecommitdiff
path: root/mysql-test/t/information_schema.test
diff options
context:
space:
mode:
authordlenev@mysql.com <>2005-07-19 20:06:49 +0400
committerdlenev@mysql.com <>2005-07-19 20:06:49 +0400
commit8a3e723b7411826004b45bca14405fe2c18ea719 (patch)
tree2d8dccfe63df5146991d4448c19a59318ba78941 /mysql-test/t/information_schema.test
parentbff3507b1d6ba1c8d0f46f6d19528a0d52e31610 (diff)
downloadmariadb-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.test35
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
#