List:Commits« Previous MessageNext Message »
From:ahristov Date:September 22 2006 4:24pm
Subject:bk commit into 5.1 tree (andrey:1.2316) BUG#22397
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@stripped, 2006-09-22 18:23:53+02:00, andrey@stripped +3 -0
  Fix for bug#22397 Events: crash with procedure which alters events
  
  ALTER EVENT in stored procedure body led to a crash during the
  procedure call. Affected was only ALTER EVENT which changed the
  interval of the event. No problems with AT, STARTS, ENDS and so on.

  mysql-test/r/events_bugs.result@stripped, 2006-09-22 18:23:47+02:00, andrey@stripped +13 -0
    update result

  mysql-test/t/events_bugs.test@stripped, 2006-09-22 18:23:47+02:00, andrey@stripped +19 -0
    add test case for bug 22397 : Events, crash with procedure which alters body

  sql/event_data_objects.cc@stripped, 2006-09-22 18:23:47+02:00, andrey@stripped +1 -1
    fix copy&paste error in code, which resulted in bug#22397
    Events: crash with procedure which alters body

# 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:	example.com
# Root:	/work/mysql-5.1-runtime-wl3337-tree4

--- 1.21/mysql-test/r/events_bugs.result	2006-09-22 18:24:07 +02:00
+++ 1.22/mysql-test/r/events_bugs.result	2006-09-22 18:24:07 +02:00
@@ -213,4 +213,17 @@ create event e_53 on schedule every 5 se
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select s1 from ttx) do drop table t' at line 1
 create event e_53 on schedule every 5 second ends (select s1 from ttx) do drop table t;
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select s1 from ttx) do drop table t' at line 1
+drop event if exists e_16;
+drop procedure if exists p_16;
+create event e_16 on schedule every 1 second do set @a=5;
+create procedure p_16 () alter event e_16 on schedule every @a second;
+set @a = null;
+call p_16();
+ERROR HY000: Incorrect INTERVAL value: 'NULL'
+call p_16();
+ERROR HY000: Incorrect INTERVAL value: 'NULL'
+set @a= 6;
+call p_16();
+drop procedure p_16;
+drop event e_16;
 drop database events_test;

--- 1.17/mysql-test/t/events_bugs.test	2006-09-22 18:24:07 +02:00
+++ 1.18/mysql-test/t/events_bugs.test	2006-09-22 18:24:07 +02:00
@@ -234,4 +234,23 @@ create event e_53 on schedule every 5 se
 # END   - BUG#16394: Events: Crash if schedule contains SELECT
 #
 
+#
+# START - BUG#22397: Events: crash with procedure which alters events
+#
+--disable_warnings
+drop event if exists e_16;
+drop procedure if exists p_16;
+--enable_warnings
+create event e_16 on schedule every 1 second do set @a=5;
+create procedure p_16 () alter event e_16 on schedule every @a second;
+set @a = null;
+--error ER_WRONG_VALUE
+call p_16();
+--error ER_WRONG_VALUE
+call p_16();
+set @a= 6;
+call p_16();
+
+drop procedure p_16;
+drop event e_16;
 drop database events_test;

--- 1.76/sql/event_data_objects.cc	2006-09-22 18:24:07 +02:00
+++ 1.77/sql/event_data_objects.cc	2006-09-22 18:24:07 +02:00
@@ -353,7 +353,7 @@ Event_parse_data::init_interval(THD *thd
   DBUG_RETURN(0);
 
 wrong_value:
-  report_bad_value("INTERVAL", item_execute_at);
+  report_bad_value("INTERVAL", item_expression);
   DBUG_RETURN(ER_WRONG_VALUE);
 }
 
Thread
bk commit into 5.1 tree (andrey:1.2316) BUG#22397ahristov22 Sep