summaryrefslogtreecommitdiff
path: root/mysql-test/t/events_bugs.test
diff options
context:
space:
mode:
authorunknown <andrey@example.com>2006-09-25 16:49:25 +0200
committerunknown <andrey@example.com>2006-09-25 16:49:25 +0200
commit6c9400b93052d0217b0d90ba8e3da60033aeda72 (patch)
treee6833d24ef9b3112250fa2bba6cb67222ab1b1c4 /mysql-test/t/events_bugs.test
parent038fbc273a039ed3cf93d27db84d14d42ffe9b7b (diff)
downloadmariadb-git-6c9400b93052d0217b0d90ba8e3da60033aeda72.tar.gz
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: fix result mysql-test/t/events_bugs.test: add test case for bug 22397 : Events, crash with procedure which alters body sql/event_data_objects.cc: fix copy&paste error in code, which resulted in bug#22397 Events: crash with procedure which alters body
Diffstat (limited to 'mysql-test/t/events_bugs.test')
-rw-r--r--mysql-test/t/events_bugs.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/t/events_bugs.test b/mysql-test/t/events_bugs.test
index c9a8842f8f0..60e8c78d8bb 100644
--- a/mysql-test/t/events_bugs.test
+++ b/mysql-test/t/events_bugs.test
@@ -234,4 +234,23 @@ create event e_53 on schedule every 5 second ends (select s1 from ttx) do drop t
# 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;