Bug #28924 If I drop the user who is the definer of an active event then server cores.
Submitted: 6 Jun 2007 11:16 Modified: 3 Jul 2007 17:44
Reporter: Horst Hunger Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S1 (Critical)
Version:5.1.19 OS:Linux (suse 10.1)
Assigned to: Andrey Hristov CPU Architecture:Any

[6 Jun 2007 11:16] Horst Hunger
Description:
If the user (definer) of an active event is dropped, then the server writes a core. More see in attached test.

the backtrace:

Core was generated by `/data0/mysql/mysql-5.1-build/sql/mysqld --no-defaults --console --basedir=/data'.
Program terminated with signal 11, Segmentation fault.

warning: Can't read pathname for load map: Eingabe-/Ausgabefehler.
Reading symbols from /lib/libz.so.1...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/librt.so.1...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
#0  0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7ee95f6 in pthread_kill () from /lib/libpthread.so.0
#2  0x0842f05b in write_core (sig=11) at stacktrace.c:229
#3  0x08275188 in handle_segfault (sig=11) at mysqld.cc:2237
#4  <signal handler called>
#5  0x0845e1f8 in Event_job_data::execute (this=0xb72893bc, thd=0x89a3868, drop=false)
    at event_data_objects.cc:1989
#6  0x0845d219 in Event_worker_thread::run (this=0xb728945f, thd=0x89a3868,
    event=0x8988980) at event_scheduler.cc:308
#7  0x0845d330 in event_worker_thread (arg=0x8988980) at event_scheduler.cc:258
#8  0xb7ee534b in start_thread () from /lib/libpthread.so.0
#9  0xb7e0665e in clone () from /lib/libc.so.6
(gdb

How to repeat:
copy test program to mysql-test/t, generate the result file and execute
 perl mysql-test-run.pl ev_bug9
[6 Jun 2007 11:37] MySQL Verification Team
Thank you for the bug report.
[6 Jun 2007 13:26] 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/28202

ChangeSet@1.2541, 2007-06-06 16:21:00+03:00, andrey@example.com +3 -0
  Fix for bug#28924
  If I drop the user who is the definer of an active event then server cores
  
  Deinit phase of not executed init code has been called. It triggered an assert.
[6 Jun 2007 17:04] Andrey Hristov
Possible duplicate of this bug is bug#28873 ALTER EVENT let server crash
[6 Jun 2007 17:14] Andrey Hristov
When pushed, check bug#28881 "Adding an INTERVAL to an EVENT let the server crash", because it seems like a duplicate of this one.
[27 Jun 2007 12:39] Andrey Hristov
Fix for bug#29156 fixes the problem
[3 Jul 2007 17:44] 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 bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix in 5.1.21 changelog per Andrey's comments.