From acd7132e0ada961d4b47d10f23151b4178f3e80c Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 25 Jun 2006 08:59:44 +0200 Subject: [PATCH] BUG#20677: Sporadic failure of test case 'ndb_binlog_multi'. Start test case with a dummy table create and drop. This ensures that NDB event subscription is properly set up before the real test starts, which otherwise could sometimes cause INSERT events to be lost. mysql-test/r/ndb_binlog_multi.result: Start test with dummy table create/drop to avoid a race. mysql-test/t/ndb_binlog_multi.test: Start test with dummy table create/drop to avoid a race. --- mysql-test/r/ndb_binlog_multi.result | 6 ++++-- mysql-test/t/ndb_binlog_multi.test | 11 +++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/ndb_binlog_multi.result b/mysql-test/r/ndb_binlog_multi.result index be5dc695d24..119174039f9 100644 --- a/mysql-test/r/ndb_binlog_multi.result +++ b/mysql-test/r/ndb_binlog_multi.result @@ -1,5 +1,7 @@ -drop table if exists t1,t2; -drop table if exists t1,t2; +drop table if exists t1,t2,t3; +drop table if exists t1,t2,t3; +CREATE TABLE t3 (dummy INT PRIMARY KEY) ENGINE = NDB; +DROP TABLE t3; reset master; reset master; CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB; diff --git a/mysql-test/t/ndb_binlog_multi.test b/mysql-test/t/ndb_binlog_multi.test index 6adacf73208..e023a54b61c 100644 --- a/mysql-test/t/ndb_binlog_multi.test +++ b/mysql-test/t/ndb_binlog_multi.test @@ -4,11 +4,18 @@ --disable_warnings connection server2; -drop table if exists t1,t2; +drop table if exists t1,t2,t3; connection server1; -drop table if exists t1,t2; +drop table if exists t1,t2,t3; --enable_warnings +# Dummy table create/drop to avoid a race where table is created +# before event subscription is set up, causing test failure (BUG#20677). +connection server2; +CREATE TABLE t3 (dummy INT PRIMARY KEY) ENGINE = NDB; +connection server1; +DROP TABLE t3; + # reset for test connection server1; reset master;