From 9e51a9166bdd5cc05c246b4820f4ae31f8c359fe Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 20 Jul 2006 20:14:13 +0200 Subject: [PATCH] After ndbd nodes has been restarted the mysqld's will enter "read only" mode until they are fully connected again. Wait in a loop until mysqld's has exited from that. --- mysql-test/r/ndb_binlog_discover.result | 1 - mysql-test/t/ndb_binlog_discover.test | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/ndb_binlog_discover.result b/mysql-test/r/ndb_binlog_discover.result index 2a1bf6efa84..01e15dc1c39 100644 --- a/mysql-test/r/ndb_binlog_discover.result +++ b/mysql-test/r/ndb_binlog_discover.result @@ -1,7 +1,6 @@ drop table if exists t1; create table t1 (a int key) engine=ndb; reset master; -insert into t1 values(1); show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN diff --git a/mysql-test/t/ndb_binlog_discover.test b/mysql-test/t/ndb_binlog_discover.test index e74bd3380bd..9c86922b82f 100644 --- a/mysql-test/t/ndb_binlog_discover.test +++ b/mysql-test/t/ndb_binlog_discover.test @@ -14,6 +14,20 @@ reset master; --exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --not-started > /dev/null --exec $NDB_MGM --no-defaults -e "all start" > /dev/null --exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults > /dev/null -insert into t1 values(1); + +--disable_query_log +let $mysql_errno= 1; +while ($mysql_errno) +{ + # Table t1 is readonly until the mysqld has reconnected properly + --error 0,1036 + insert into t1 values(1); + if ($mysql_errno) + { + --sleep 0.1 + } +} +--enable_query_log + --source include/show_binlog_events.inc drop table t1;