From 8cc540767d298af0e6fae6e8047e8cd4547e407a Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Apr 2008 21:41:50 +0300 Subject: [PATCH] Bug #36435 rpl_events uses non-deterministic check Select of the test could not perform deterministically, because the table remains to be updatable by the running event handler. Fixed with changing verification to use a logical values instead of comparison with a pre-recorded results. mysql-test/include/rpl_events.inc: changing verification to use a logical values instead of comparison with a pre-recorded results mysql-test/suite/rpl/r/rpl_events.result: resutls updated. --- mysql-test/include/rpl_events.inc | 15 ++++++------- mysql-test/suite/rpl/r/rpl_events.result | 28 +++++++----------------- 2 files changed, 15 insertions(+), 28 deletions(-) diff --git a/mysql-test/include/rpl_events.inc b/mysql-test/include/rpl_events.inc index e1bf5500923..34ceba81a38 100644 --- a/mysql-test/include/rpl_events.inc +++ b/mysql-test/include/rpl_events.inc @@ -41,18 +41,17 @@ let $wait_condition= # check that table t1 contains something --echo "Checking event data on the master" ---enable_info ---replace_column 3 TIMESTAMP -SELECT * FROM t1 ORDER BY id; ---disable_info +let $events_done=`SELECT count(*) FROM t1 id`; +--disable_query_log +eval SELECT $events_done > 0 as ONE; +--enable_query_log sync_slave_with_master; --echo "Checking event data on the slave" ---enable_info ---replace_column 3 TIMESTAMP -SELECT * FROM t1 ORDER BY id; ---disable_info +--disable_query_log +eval SELECT count(*) - $events_done as ZERO FROM t1 id; +--enable_query_log --echo "Checking event is inactive on slave" SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; diff --git a/mysql-test/suite/rpl/r/rpl_events.result b/mysql-test/suite/rpl/r/rpl_events.result index 273004b0a43..e4a412cb1d5 100644 --- a/mysql-test/suite/rpl/r/rpl_events.result +++ b/mysql-test/suite/rpl/r/rpl_events.result @@ -23,17 +23,11 @@ SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name db name status originator test justonce ENABLED 1 "Checking event data on the master" -SELECT * FROM t1 ORDER BY id; -id c ts -1 manually TIMESTAMP -2 from justonce TIMESTAMP -affected rows: 2 +ONE +1 "Checking event data on the slave" -SELECT * FROM t1 ORDER BY id; -id c ts -1 manually TIMESTAMP -2 from justonce TIMESTAMP -affected rows: 2 +ZERO +0 "Checking event is inactive on slave" SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; db name status originator @@ -118,17 +112,11 @@ SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name db name status originator test justonce ENABLED 1 "Checking event data on the master" -SELECT * FROM t1 ORDER BY id; -id c ts -1 manually TIMESTAMP -2 from justonce TIMESTAMP -affected rows: 2 +ONE +1 "Checking event data on the slave" -SELECT * FROM t1 ORDER BY id; -id c ts -1 manually TIMESTAMP -2 from justonce TIMESTAMP -affected rows: 2 +ZERO +0 "Checking event is inactive on slave" SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; db name status originator