Bug #17453 Creating Event crash the server
Submitted: 16 Feb 2006 13:19 Modified: 23 Feb 2006 3:31
Reporter: Miguel Solorzano Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.1.7 BK OS:Linux (Suse Linux)
Assigned to: Andrey Hristov CPU Architecture:Any

[16 Feb 2006 13:19] Miguel Solorzano
Description:
When trying to repeat the bug http://bugs.mysql.com/bug.php?id=17354
the server crash when creating the event:

mysql> use test;
Database changed
mysql> drop table if exists t1;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> create table t1
    -> (
    ->     id int not null auto_increment primary key,
    ->     descr varchar(50),
    ->     TS timestamp
    -> );
Query OK, 0 rows affected (0.01 sec)

mysql> 
mysql> drop event if exists justonce;
Query OK, 1 row affected, 1 warning (0.01 sec)

mysql> 
mysql> create event justonce
    ->     on schedule at now() + interval 10 second
    ->     on completion preserve
    ->     do
    ->     insert into test.t1
    ->     set descr = 'from event justonce';

[New Thread 1099586480 (LWP 5370)]
060216 11:16:28 [Note] /home/miguel/dbs/5.1/libexec/mysqld: ready for connections.
Version: '5.1.7-beta-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
[New Thread 1119861680 (LWP 5372)]
mysqld: event_timed.cc:120: void event_timed::init_body(THD*): Assertion `*body_begin == ' '' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 1119861680 (LWP 5372)]
0xffffe410 in __kernel_vsyscall ()
(gdb) 

How to repeat:
See description.
[16 Feb 2006 15:33] Andrey Hristov
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

http://lists.mysql.com/commits/2737
[20 Feb 2006 23:23] Andrey Hristov
Fixed in 5.1.7, existing in 5.1.6 . Crashes only in debug builds when the separator between DO and the body is not a space :
CREATE EVENT some ON SCHEDULE AT NOW() DO   <--here we have a new line
begin select 1; end|
[23 Feb 2006 3:31] Paul DuBois
Noted in 5.1.7 changelog.

          Creating an event and using a whitespace character other than
          space following the <literal>DO</literal> keyword caused a
          server crash. (Bug #17453)