mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
WL#3629 - Replication of Invocation and Invoked Features
This patch removes the SLAVESIDE_DISABLED token from the event status clause and adds the ability to mark an event as status = SLAVESIDE_DISABLED by using the syntax DISABLE ON SLAVE instead. The patch also adds tests to rpl_events to check the new syntax.
This commit is contained in:
@ -15,8 +15,7 @@ drop table if exists t1,t2;
|
||||
eval CREATE TABLE `t1` (
|
||||
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`c` VARCHAR(50) NOT NULL,
|
||||
`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
|
||||
CURRENT_TIMESTAMP,
|
||||
`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=$engine_type DEFAULT CHARSET=utf8;
|
||||
|
||||
@ -99,6 +98,21 @@ sync_slave_with_master;
|
||||
--echo "in the slave"
|
||||
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test';
|
||||
|
||||
# test the DISABLE ON SLAVE for setting event SLAVESIDE_DISABLED as status
|
||||
# on CREATE EVENT
|
||||
|
||||
CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND
|
||||
DO INSERT INTO t1(c) VALUES ('from slave_terminate');
|
||||
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate';
|
||||
|
||||
DROP EVENT test.slave_terminate;
|
||||
|
||||
CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND
|
||||
DISABLE ON SLAVE DO INSERT INTO t1(c) VALUES ('from slave_terminate');
|
||||
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate';
|
||||
|
||||
DROP EVENT test.slave_terminate;
|
||||
|
||||
--echo "in the master"
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user