mariadb/mysql-test/suite/rpl/t/rpl_events.test
Serge Kozlov abbc922b65 Bug#30128: The reason that sometimes events were executed because without STARTS
clause server fires immediately after creating event and time between create and delete
event sometimes is enough for firing. So adding STARTS clause moves first execution in
future after drop of event
1. Added STARTS clause for CREATE EVENT.
2. Updated result file.
2009-01-21 18:48:12 +03:00

57 lines
1.4 KiB
Text

##################################################################
# Author: Giuseppe #
# Date: 2006-12-20 #
# Purpose: To test that event effects are replicated #
# in both row based and statement based format #
##################################################################
--source include/not_embedded.inc
--source include/master-slave.inc
SET @old_event_scheduler = @@global.event_scheduler;
set global event_scheduler=1;
let $engine_type= MyISAM;
set binlog_format=row;
# Embedded server doesn't support binlogging
--source include/rpl_events.inc
set binlog_format=statement;
# Embedded server doesn't support binlogging
--source include/rpl_events.inc
#
# Bug #28953 Using events in a replication let the slave crash.
#
connection master;
CREATE TABLE t28953 (a INT);
DELIMITER |;
CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR
DO BEGIN
select * from t28953;
END;|
DELIMITER ;|
ALTER EVENT event1 RENAME TO event2;
sync_slave_with_master;
connection master;
DROP EVENT event2;
sync_slave_with_master;
# Doing cleanup of the table referred to in the event to guarantee
# that there is no bad timing cauing it to try to access the table.
connection master;
SET @@global.event_scheduler= @old_event_scheduler;
DROP TABLE t28953;
sync_slave_with_master;