MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:ahristov Date:February 16 2006 3:11pm
Subject:bk commit into 5.1 tree (andrey:1.2120) BUG#17543
View as plain text  
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.2120 06/02/16 16:11:02 andrey@lmy004. +3 -0
  fix for bug#17543 Creating Event crash the server
  this problem affects only debug builds

  sql/event_timed.cc
    1.34 06/02/16 16:10:54 andrey@lmy004. +1 -1
    the delimiter between DO and the body could be not only a space
    but any other recognized white space, so use proper macro.

  mysql-test/t/events.test
    1.21 06/02/16 16:10:54 andrey@lmy004. +21 -0
    tests for bug#17543 Creating Event crash the server

  mysql-test/r/events.result
    1.22 06/02/16 16:10:54 andrey@lmy004. +20 -0
    update results

# 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-bug16406

--- 1.21/mysql-test/r/events.result	2006-02-16 13:11:06 +01:00
+++ 1.22/mysql-test/r/events.result	2006-02-16 16:10:54 +01:00
@@ -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;

--- 1.20/mysql-test/t/events.test	2006-02-16 05:20:54 +01:00
+++ 1.21/mysql-test/t/events.test	2006-02-16 16:10:54 +01:00
@@ -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);

--- 1.33/sql/event_timed.cc	2006-02-16 13:11:06 +01:00
+++ 1.34/sql/event_timed.cc	2006-02-16 16:10:54 +01:00
@@ -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);
 
Thread
bk commit into 5.1 tree (andrey:1.2120) BUG#17543ahristov16 Feb