Bug #31531 event scheduler doesn't generate errors
Submitted: 11 Oct 2007 13:33 Modified: 25 Oct 2007 10:10
Reporter: Patrick Ancillotti Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S2 (Serious)
Version:5.1.22-rc OS:Linux
Assigned to: CPU Architecture:Any
Tags: Event, event scheduler

[11 Oct 2007 13:33] Patrick Ancillotti
Description:
When an event attempts to write to for example a full memory table, it doesn't generate an error, and simply continues to try even if the table is full, or non existant. Surely an error should be generated for debugging?

How to repeat:
create an event to insert into a non-existant table, do a show events, and it'll still be enabled, and when i checked the general log, and the error log, there didn't seem to be errors there.
[25 Oct 2007 10:10] Sveta Smirnova
Thank you for the report.

I can not repeat described behaviour:

=====mysql-5.1.22-rc-linux-i686-glibc23=====
=====events_bug31531=====
set global  event_scheduler='ON';
show variables like '%event%';
Variable_name   Value
event_scheduler ON
USE test;
create table t1(id int not null primary key auto_increment);
DROP EVENT IF EXISTS e;
Warnings:
Note    1305    Event e does not exist
CREATE EVENT e ON SCHEDULE EVERY 5 SECOND DO begin INSERT INTO test.t1 VALUES (); INSERT INTO test.t2 VALUES (); end|
alter event e enable;
show events;
Db      Name    Definer Time zone       Type    Execute at      Interval value  Interval field  Starts  Ends    Status  Originator      character_set_client    collation_connection       Database Collation
test    e       root@localhost  SYSTEM  RECURRING       NULL    5       SECOND  2007-10-25 13:09:20     NULL    ENABLED 1       latin1  latin1_swedish_ci       latin1_swedish_ci
select * from t1;
id
1
2
3

cat $MYSQL_TEST_DIR/var/log/master.err
CURRENT_TEST: main.events_bug31531
071025 13:09:19 [Note] Plugin 'InnoDB' disabled by command line option
071025 13:09:19 [Note] Event Scheduler: Loaded 0 events
071025 13:09:19 [Note] /users/ssmirnova/mysql-5.1.22-rc-linux-i686-glibc23/bin/mysqld: ready for connections.
Version: '5.1.22-rc-log'  socket: '/tmp/WSgyPofebl/master.sock'  port: 9306  MySQL Community Server (GPL)
071025 13:09:20 [Note] Event Scheduler: scheduler thread started with id 2
071025 13:09:20 [Note] Event Scheduler: [root@localhost].[test.e] started in thread 3.
071025 13:09:20 [ERROR] Event Scheduler: [root@localhost][test.e] Table 'test.t2' doesn't exist
071025 13:09:20 [Note] Event Scheduler: [root@localhost].[test.e] event execution failed.
071025 13:09:25 [Note] Event Scheduler: [root@localhost].[test.e] started in thread 4.
071025 13:09:25 [ERROR] Event Scheduler: [root@localhost][test.e] Table 'test.t2' doesn't exist
071025 13:09:25 [Note] Event Scheduler: [root@localhost].[test.e] event execution failed.
071025 13:09:30 [Note] Event Scheduler: [root@localhost].[test.e] started in thread 5.
071025 13:09:30 [ERROR] Event Scheduler: [root@localhost][test.e] Table 'test.t2' doesn't exist
071025 13:09:30 [Note] Event Scheduler: [root@localhost].[test.e] event execution failed.