mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
Bug#27644 ndb: connecting api node/mysqld may "steal" node_id from running mysqld
- test case workaround to avoid random failures
This commit is contained in:
parent
b651aa038c
commit
e8a0ac29a7
1 changed files with 9 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
-- source include/have_ndb.inc
|
||||
-- source include/have_multi_ndb.inc
|
||||
-- source include/ndb_default_cluster.inc
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
|
||||
|
@ -7,6 +8,11 @@
|
|||
drop table if exists t1, t2;
|
||||
--enable_warnings
|
||||
|
||||
# Workaround for Bug#27644
|
||||
# ndb: connecting api node/mysqld may "steal" node_id from running mysqld
|
||||
# - let ndb_waiter use a fixed node id so "steal" cannot happen
|
||||
--let connect_str = "nodeid=6;$NDB_CONNECTSTRING"
|
||||
|
||||
#
|
||||
# Transaction ongoing while cluster is restarted
|
||||
#
|
||||
|
@ -17,7 +23,7 @@ begin;
|
|||
insert into t1 values (1);
|
||||
|
||||
--exec $NDB_MGM --no-defaults -e "all restart" >> $NDB_TOOLS_OUTPUT
|
||||
--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT
|
||||
--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT
|
||||
|
||||
--error 1297
|
||||
insert into t1 values (2);
|
||||
|
@ -35,7 +41,7 @@ insert into t2 values (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,
|
|||
select * from t2 order by a limit 3;
|
||||
|
||||
--exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT
|
||||
--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT
|
||||
--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT
|
||||
|
||||
--connection server2
|
||||
create table t2 (a int key) engine=ndbcluster;
|
||||
|
@ -49,7 +55,7 @@ select * from t2 order by a limit 3;
|
|||
select * from t2 order by a limit 3;
|
||||
|
||||
--exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT
|
||||
--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT
|
||||
--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT
|
||||
|
||||
--connection server1
|
||||
show tables;
|
||||
|
|
Loading…
Reference in a new issue