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/02/07 19:01:00 andrey@lmy004. +4 -0
fix for bug#16410 (Events: CREATE EVENT is legal in a CREATE TRIGGER statement)
WL#1034 (Internal CRON)
(post-review updates)
sql/sql_parse.cc
1.516 06/02/07 19:00:50 andrey@lmy004. +6 -0
really end the active transactions when creating/altering/droping an
event. These are DDLs, so they should end the active TX.
sql/sp_head.cc
1.213 06/02/07 19:00:50 andrey@lmy004. +3 -0
add SQLCOM_CREATE_EVENT,SQLCOM_ALTER_EVENT and
SQLCOM_DROP_EVENT as DDL, thus forbidden in a SFunction and a trigger
body.
mysql-test/t/events.test
1.13 06/02/07 19:00:50 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/02/07 19:00:50 andrey@lmy004. +4 -0
update 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.515/sql/sql_parse.cc 2006-01-30 13:31:20 +01:00
+++ 1.516/sql/sql_parse.cc 2006-02-07 19:00:50 +01:00
@@ -3711,6 +3711,12 @@
is_schema_db(lex->et->dbname.str)))
break;
+ if (end_active_trans(thd))
+ {
+ res= -1;
+ break;
+ }
+
switch (lex->sql_command) {
case SQLCOM_CREATE_EVENT:
res= evex_create_event(thd, lex->et, (uint) lex->create_info.options,
--- 1.11/mysql-test/r/events.result 2006-01-30 17:11:41 +01:00
+++ 1.12/mysql-test/r/events.result 2006-02-07 19:00:50 +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: Explicit or implicit commit is not allowed in stored function or trigger.
+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-02-07 19:00:50 +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 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
+####
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.212/sql/sp_head.cc 2006-01-16 14:26:27 +01:00
+++ 1.213/sql/sp_head.cc 2006-02-07 19:00:50 +01:00
@@ -249,6 +249,9 @@
case SQLCOM_ALTER_FUNCTION:
case SQLCOM_DROP_PROCEDURE:
case SQLCOM_DROP_FUNCTION:
+ case SQLCOM_CREATE_EVENT:
+ case SQLCOM_ALTER_EVENT:
+ case SQLCOM_DROP_EVENT:
flags= sp_head::HAS_COMMIT_OR_ROLLBACK;
break;
default:
| Thread |
|---|
| • bk commit into 5.1 tree (andrey:1.2097) BUG#16410 | ahristov | 7 Feb |