Bug #16408 Events: crash for an event in a procedure
Submitted: 12 Jan 2006 3:54 Modified: 17 Mar 2006 8:20
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.1.6-alpha-debug OS:Linux (SUSE 10.0)
Assigned to: Andrey Hristov CPU Architecture:Any

[12 Jan 2006 3:54] Peter Gulutzan
Description:
I can say CREATE EVENT in a procedure. But if
I call the procedure a few times, crash.

How to repeat:
mysql> set global event_scheduler = 0;
Query OK, 0 rows affected (0.00 sec)

mysql> create procedure p_16 () create event e_16 on schedule every @a second do set @a=5;
ERROR 1516 (HY000): INTERVAL must be positive
mysql> set @a=5;
Query OK, 0 rows affected (0.00 sec)

mysql> create procedure p_16 () create event e_16 on schedule every @a second do set @a=5;
Query OK, 0 rows affected (0.00 sec)

mysql> call p16();
ERROR 1305 (42000): PROCEDURE db1.p16 does not exist
mysql> call p_16();
Query OK, 0 rows affected (0.00 sec)

mysql> call p_16();
ERROR 2013 (HY000): Lost connection to MySQL server during query
[12 Jan 2006 14:29] MySQL Verification Team
miguel@hegel:~/dbs/5.1> libexec/mysqld
030412 12:27:11  InnoDB: Started; log sequence number 0 48203
030412 12:27:12 [Note] libexec/mysqld: ready for connections.
Version: '5.1.6-alpha-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
mysqld: sql_parse.cc:3694: bool mysql_execute_command(THD*): Assertion `lex->et' failed.
mysqld got signal 6;
[8 Mar 2006 1:46] Bugs System
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/3567
[15 Mar 2006 16:45] Bugs System
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/3863
[16 Mar 2006 9:33] Bugs System
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/3880
[16 Mar 2006 18:07] Andrey Hristov
Fixed in 5.1.8
Calling create/alter event in a stored procedure and doing that 2 times in a row crashed the server.
[17 Mar 2006 8:20] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented bugfix in 5.1.8 changelog. Closed.