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.
This commit is contained in:
unknown 2006-07-20 20:14:13 +02:00
parent 9e40aad7e5
commit 9e51a9166b
2 changed files with 15 additions and 2 deletions

View file

@ -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 <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN

View file

@ -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;