summaryrefslogtreecommitdiff
path: root/mysql-test/t/events.test
diff options
context:
space:
mode:
authorunknown <andrey@lmy004.>2006-02-15 17:12:27 +0100
committerunknown <andrey@lmy004.>2006-02-15 17:12:27 +0100
commit2557f80fd1091c55873e1223638671b92d4274fb (patch)
tree9ed6fc16ec4ffe63119d291e56559b89f9210473 /mysql-test/t/events.test
parent098ae02afa1d42024475e05442e8e530c0fbcf58 (diff)
downloadmariadb-git-2557f80fd1091c55873e1223638671b92d4274fb.tar.gz
fix for bug#16410 (Events: CREATE EVENT is legal in a CREATE TRIGGER statement)
WL#1034 (Internal CRON) (post-post-review updates) mysql-test/r/events.result: update results file mysql-test/t/events.test: add test for Bug #16410 Events: CREATE EVENT is legal in a CREATE TRIGGER statement sql/sp_head.cc: CREATE/ALTER/DROP event mean explicit commit, so they are not allowed in a FUNCTION/TRIGGER. Fixes bug#16410 sql/sql_parse.cc: - end active transaction for CREATE/ALTER/DROP EVENT because they are DDL statements.
Diffstat (limited to 'mysql-test/t/events.test')
-rw-r--r--mysql-test/t/events.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/events.test b/mysql-test/t/events.test
index 87b578dff9e..d2a4e877672 100644
--- a/mysql-test/t/events.test
+++ b/mysql-test/t/events.test
@@ -323,6 +323,17 @@ select release_lock("test_lock2_1");
show processlist;
drop event закачка21;
+####
+# Bug #16410 Events: CREATE EVENT is legal in a CREATE TRIGGER statement
+#
+create table t_16 (s1 int);
+--error 1422
+create trigger t_16_bi before insert on t_16 for each row create event e_16 on schedule every 1 second do set @a=5;
+drop table t_16;
+#
+# end of test case
+####
+
##set global event_scheduler=1;
##select get_lock("test_lock3", 20);
##create event закачка on schedule every 10 hour do select get_lock("test_lock3", 20);