Below is the list of changes that have just been committed into a local
5.1 repository of andrey. When andrey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2097 06/01/30 20:44:06 andrey@lmy004. +4 -0
fix for bug#16410 (Events: CREATE EVENT is legal in a CREATE TRIGGER statement)
WL#1034 (Internal CRON)
(last time added a drop but forgot to update the result :( )
sql/sql_yacc.yy
1.448 06/01/30 20:43:45 andrey@lmy004. +5 -0
inspect lex->sphead and abort if the user tries to create an
event in a trigger body (fixes bug #16410)
sql/share/errmsg.txt
1.78 06/01/30 20:43:44 andrey@lmy004. +2 -0
new error message for forbidding create event in trigger body
mysql-test/t/events.test
1.13 06/01/30 20:43:44 andrey@lmy004. +10 -1
add test for bug #16410 (Events: CREATE EVENT is legal in a CREATE TRIGGER statement)
mysql-test/r/events.result
1.12 06/01/30 20:43:44 andrey@lmy004. +4 -0
result of test case
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: andrey
# Host: lmy004.
# Root: /work/mysql-5.1-new
--- 1.447/sql/sql_yacc.yy 2006-01-30 13:31:21 +01:00
+++ 1.448/sql/sql_yacc.yy 2006-01-30 20:43:45 +01:00
@@ -1331,6 +1331,11 @@
{
LEX *lex=Lex;
+ if (lex->sphead && lex->sphead->m_type == TYPE_ENUM_TRIGGER)
+ {
+ my_error(ER_EVENT_IN_TRIGGER, MYF(0), "EVENT");
+ YYABORT;
+ }
if (lex->et)
{
/*
--- 1.11/mysql-test/r/events.result 2006-01-30 17:11:41 +01:00
+++ 1.12/mysql-test/r/events.result 2006-01-30 20:43:44 +01:00
@@ -121,6 +121,10 @@
drop event three_event;
drop user ev_test@localhost;
drop event one_event;
+create table t_16 (s1 int);
+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;
+ERROR HY000: CREATE EVENT forbidden in trigger body
+drop table t_16;
create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5;
select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event;
db name body definer convert_tz(execute_at, 'UTC', 'SYSTEM') on_completion
--- 1.12/mysql-test/t/events.test 2006-01-30 17:11:42 +01:00
+++ 1.13/mysql-test/t/events.test 2006-01-30 20:43:44 +01:00
@@ -108,7 +108,16 @@
#
-
+####
+# Bug #16410 Events: CREATE EVENT is legal in a CREATE TRIGGER statement
+#
+create table t_16 (s1 int);
+--error 1531
+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
+####
create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5;
select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event;
--- 1.77/sql/share/errmsg.txt 2006-01-27 01:07:29 +01:00
+++ 1.78/sql/share/errmsg.txt 2006-01-30 20:43:44 +01:00
@@ -5791,6 +5791,8 @@
eng "Same old and new event name"
ER_EVENT_DATA_TOO_LONG
eng "Data for column '%s' too long"
+ER_EVENT_IN_TRIGGER
+ eng "CREATE EVENT forbidden in trigger body"
ER_DROP_INDEX_FK
eng "Cannot drop index '%-.64s': needed in a foreign key constraint"
| Thread |
|---|
| • bk commit into 5.1 tree (andrey:1.2097) BUG#16410 | ahristov | 30 Jan |