Bug #19170 Creating an event leads to 100% CPU usage.
Submitted: 18 Apr 2006 19:04 Modified: 6 May 2006 14:07
Reporter: Andrey Hristov
Status: Closed
Category:Server: SP Severity:S2 (Serious)
Version:5.1.9 OS:Any (All)
Assigned to: Andrey Hristov Target Version:

[18 Apr 2006 19:04] Andrey Hristov
Description:
Creating an event leads to 100% CPU usage. The code that leads to this is existing the
cloned 5.1.9 which is being built and not in any released code. I think the problem is
quite serious. The fix is straightforward.

How to repeat:
mysql> use db1;
Database changed
mysql> create event xyz on schedule every 1 second do select 123;
Query OK, 1 row affected (0.05 sec)

mysql> set global event_scheduler = 1;
Query OK, 0 rows affected (0.05 sec)

mysql> set global event_scheduler = 0;
Query OK, 0 rows affected (0.00 sec)
[18 Apr 2006 19:14] Miguel Solorzano
Thank you for the bug report. I was able to repeat:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                     
                                                    
11360 miguel    16   0 64864  31m 5408 S 97.4  6.7   0:42.71 mysqld
[18 Apr 2006 21:24] 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/5102
[26 Apr 2006 17:22] Andrey Hristov
The patch was pushed but on Solaris10/AMD and PowerPC-G5 the test cases fails, on all
other platforms passes. Leaving this open.
[26 Apr 2006 17:23] Andrey Hristov
..
[5 May 2006 13:31] Andrey Hristov
Fixed in 5.1.10
[6 May 2006 14:07] 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.10 changelog. Closed.