From fd5d7fa76190546c291cc259f3bea866b0b2ba82 Mon Sep 17 00:00:00 2001 From: "mkindahl@dl145h.mysql.com" <> Date: Thu, 14 Feb 2008 10:53:12 +0100 Subject: [PATCH] Fixing test rpl_events to not give false failures. --- mysql-test/suite/rpl/r/rpl_events.result | 4 +++- mysql-test/suite/rpl/t/rpl_events.test | 10 +++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_events.result b/mysql-test/suite/rpl/r/rpl_events.result index 18fe72a9879..273004b0a43 100644 --- a/mysql-test/suite/rpl/r/rpl_events.result +++ b/mysql-test/suite/rpl/r/rpl_events.result @@ -195,9 +195,11 @@ test slave_terminate SLAVESIDE_DISABLED 2 DROP EVENT test.slave_terminate; "Cleanup" DROP TABLE t1; +CREATE TABLE t28953 (a INT); CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR DO BEGIN -select * from t1; +select * from t28953; END;| ALTER EVENT event1 RENAME TO event2; DROP EVENT event2; +DROP TABLE t28953; diff --git a/mysql-test/suite/rpl/t/rpl_events.test b/mysql-test/suite/rpl/t/rpl_events.test index 62ffead7dcb..2a9cf86fe55 100644 --- a/mysql-test/suite/rpl/t/rpl_events.test +++ b/mysql-test/suite/rpl/t/rpl_events.test @@ -28,10 +28,12 @@ set binlog_format=statement; connection master; +CREATE TABLE t28953 (a INT); + DELIMITER |; CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR DO BEGIN - select * from t1; + select * from t28953; END;| DELIMITER ;| @@ -45,3 +47,9 @@ 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; +DROP TABLE t28953; +sync_slave_with_master;