Commit 4e4520b7 authored by andrey@lmy004's avatar andrey@lmy004

fix for bug#17543 Creating Event crash the server

this problem affects only debug builds
parent d8957fbf
......@@ -397,4 +397,24 @@ 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 white_space
on schedule every 10 hour
disable
do
select 1;
select event_schema, event_name, definer, event_body from information_schema.events where event_name='white_space';
event_schema event_name definer event_body
events_test white_space root@localhost select 1
drop event white_space;
create event white_space on schedule every 10 hour disable do
select 2;
select event_schema, event_name, definer, event_body from information_schema.events where event_name='white_space';
event_schema event_name definer event_body
events_test white_space root@localhost select 2
drop event white_space;
create event white_space on schedule every 10 hour disable do select 3;
select event_schema, event_name, definer, event_body from information_schema.events where event_name='white_space';
event_schema event_name definer event_body
events_test white_space root@localhost select 3
drop event white_space;
drop database events_test;
......@@ -374,6 +374,27 @@ drop table t_16;
# end of test case
####
#
# START: BUG #17453: Creating Event crash the server
#
create event white_space
on schedule every 10 hour
disable
do
select 1;
select event_schema, event_name, definer, event_body from information_schema.events where event_name='white_space';
drop event white_space;
create event white_space on schedule every 10 hour disable do
select 2;
select event_schema, event_name, definer, event_body from information_schema.events where event_name='white_space';
drop event white_space;
create event white_space on schedule every 10 hour disable do select 3;
select event_schema, event_name, definer, event_body from information_schema.events where event_name='white_space';
drop event white_space;
#
# END: BUG #17453: Creating Event crash the server
#
##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);
......
......@@ -117,7 +117,7 @@ event_timed::init_body(THD *thd)
body.length--;
//the first is always space which I cannot skip in the parser
DBUG_ASSERT(*body_begin == ' ');
DBUG_ASSERT(my_isspace(thd->variables.character_set_client, *body_begin));
body.length--;
body.str= strmake_root(root, (char *)body_begin + 1, body.length);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment