summaryrefslogtreecommitdiff
path: root/mysql-test/include/rpl_events.inc
diff options
context:
space:
mode:
authorunknown <cbell/Chuck@mysql_cab_desk.>2007-03-29 08:17:19 -0400
committerunknown <cbell/Chuck@mysql_cab_desk.>2007-03-29 08:17:19 -0400
commit75686dc73f0e2d5af85a9cd77fccbf2896189a42 (patch)
tree157f613c7aa4768e5233e69907a9c1b9d8a61441 /mysql-test/include/rpl_events.inc
parentff1d6b2252b8502596e2f7365b9935a4c3b59112 (diff)
downloadmariadb-git-75686dc73f0e2d5af85a9cd77fccbf2896189a42.tar.gz
WL#3629 - Replication of Invocation and Invoked Features
This patch corrects errors that occurred in a local manual merge as a result of updating the local repository and includes changes necessary to correct problems found during the recalculation of next execution of events in RBR. mysql-test/include/rpl_events.inc: WL#3629 - Replication of Invocation and Invoked Features This patch changes the rpl_events test to be more comprehensive in catching errors as a result of RBR. Changes include clarification of SELECTs with WHERE clauses and synchronization with master and slave. mysql-test/r/rpl_events.result: WL#3629 - Replication of Invocation and Invoked Features This patch changes the results for the rpl_events test to accomodate the changes in the test. scripts/mysql_system_tables.sql: WL#3629 - Replication of Invocation and Invoked Features This patch adds the originator column and a new enum value to the mysql.event table. This change was necessary to accomodate changes as a result of other patches. sql/event_data_objects.cc: WL#3629 - Replication of Invocation and Invoked Features This patch corrects an error in merging that occurred during manual merge. The status check was changed to include either ENABLED or DISABLED in the gate to change the status to SLAVESIDE_DISABLED for events replicated to the slave. This patch also includes an update to correct a problem encountered during testing after the local merge. The update_timing_fields method is replicating the timing changes in RBR to the slave thereby over writing the change to the status column in the process. This code includes a check to turn off the next binlog event if in RBR. sql/event_queue.cc: WL#3629 - Replication of Invocation and Invoked Features This patch corrects an error in merging that occurred during manual merge. The code was corrected to include both types of disabled status enums (DISABLED, SLAVESIDE_DISABLED) in the create_event and update_event methods. sql/sql_show.cc: WL#3629 - Replication of Invocation and Invoked Features This patch corrects an error in merging that occurred during manual merge. It corrects the order in which the originator column appears in the show structures. The error caused incorrect output on SHOW EVENTS commands.
Diffstat (limited to 'mysql-test/include/rpl_events.inc')
-rw-r--r--mysql-test/include/rpl_events.inc34
1 files changed, 19 insertions, 15 deletions
diff --git a/mysql-test/include/rpl_events.inc b/mysql-test/include/rpl_events.inc
index 5f4cc3c6985..b8fac61c383 100644
--- a/mysql-test/include/rpl_events.inc
+++ b/mysql-test/include/rpl_events.inc
@@ -6,7 +6,7 @@
##################################################################
--disable_warnings
-DROP EVENT IF EXISTS justonce;
+DROP EVENT IF EXISTS test.justonce;
drop table if exists t1,t2;
--enable_warnings
@@ -23,9 +23,11 @@ CURRENT_TIMESTAMP,
INSERT INTO t1 (c) VALUES ('manually');
# then, we create the event
-CREATE EVENT justonce ON SCHEDULE AT NOW() + INTERVAL 2 SECOND DO INSERT INTo t1
+CREATE EVENT test.justonce ON SCHEDULE AT NOW() + INTERVAL 2 SECOND DO INSERT INTO t1
(c) VALUES ('from justonce');
+SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce';
+
# wait 3 seconds, so the event can trigger
--real_sleep 3
@@ -37,7 +39,6 @@ SELECT * FROM t1;
--disable_info
sync_slave_with_master;
-connection slave;
--echo "in the slave"
--enable_info
@@ -45,6 +46,8 @@ connection slave;
SELECT * FROM t1;
--disable_info
+SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce';
+
# Create an event on the slave and check to see what the originator is.
--disable_warnings
DROP EVENT IF EXISTS test.slave_once;
@@ -52,7 +55,7 @@ DROP EVENT IF EXISTS test.slave_once;
CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE DO
INSERT INTO t1(c) VALUES ('from slave_once');
-SELECT db, name, status, originator FROM mysql.event;
+SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_once';
--disable_warnings
DROP EVENT IF EXISTS test.slave_once;
@@ -61,39 +64,40 @@ DROP EVENT IF EXISTS test.slave_once;
connection master;
# BUG#20384 - disable events on slave
+--disable_warnings
DROP EVENT IF EXISTS test.justonce;
+--enable_warnings
+
CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND DO
INSERT INTO t1(c) VALUES ('from er');
-SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'er';
+SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
sync_slave_with_master;
-connection slave;
+
--echo "in the slave"
-SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'er';
+SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
connection master;
--echo "in the master"
ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND DO INSERT into t1(c) VALUES ('from alter er');
-SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'er';
+SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
sync_slave_with_master;
-connection slave;
+
--echo "in the slave"
-SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'er';
+SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
connection master;
--echo "in the master"
DROP EVENT test.er;
---replace column 8 DATETIME
-SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'er';
+SELECT db, name, status, originator FROM mysql.event WHERE db = 'test';
--disable_info
sync_slave_with_master;
-connection slave;
+
--echo "in the slave"
---replace column 8 DATETIME
-SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'er';
+SELECT db, name, status, originator FROM mysql.event WHERE db = 'test';
--echo "in the master"
connection master;