Commit ffba5243 authored by tomas@whalegate.ndb.mysql.com's avatar tomas@whalegate.ndb.mysql.com

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb

into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
parents c7da27b5 ee57ca9d
-- source include/have_ndb.inc -- source include/have_ndb.inc
-- source include/have_multi_ndb.inc -- source include/have_multi_ndb.inc
-- source include/ndb_default_cluster.inc
-- source include/not_embedded.inc -- source include/not_embedded.inc
...@@ -7,6 +8,11 @@ ...@@ -7,6 +8,11 @@
drop table if exists t1, t2; drop table if exists t1, t2;
--enable_warnings --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 # Transaction ongoing while cluster is restarted
# #
...@@ -17,7 +23,7 @@ begin; ...@@ -17,7 +23,7 @@ begin;
insert into t1 values (1); insert into t1 values (1);
--exec $NDB_MGM --no-defaults -e "all restart" >> $NDB_TOOLS_OUTPUT --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 --error 1297
insert into t1 values (2); 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, ...@@ -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; select * from t2 order by a limit 3;
--exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT --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 --connection server2
create table t2 (a int key) engine=ndbcluster; create table t2 (a int key) engine=ndbcluster;
...@@ -49,7 +55,7 @@ select * from t2 order by a limit 3; ...@@ -49,7 +55,7 @@ select * from t2 order by a limit 3;
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_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 --connection server1
show tables; show tables;
......
...@@ -67,6 +67,7 @@ int main(int argc, char** argv){ ...@@ -67,6 +67,7 @@ int main(int argc, char** argv){
return NDBT_ProgramExit(NDBT_WRONGARGS); return NDBT_ProgramExit(NDBT_WRONGARGS);
Ndb_cluster_connection con(opt_connect_str); Ndb_cluster_connection con(opt_connect_str);
con.set_name("ndb_delete_all");
if(con.connect(12, 5, 1) != 0) if(con.connect(12, 5, 1) != 0)
{ {
ndbout << "Unable to connect to management server." << endl; ndbout << "Unable to connect to management server." << endl;
......
...@@ -69,6 +69,7 @@ int main(int argc, char** argv){ ...@@ -69,6 +69,7 @@ int main(int argc, char** argv){
return NDBT_ProgramExit(NDBT_WRONGARGS); return NDBT_ProgramExit(NDBT_WRONGARGS);
Ndb_cluster_connection con(opt_connect_str); Ndb_cluster_connection con(opt_connect_str);
con.set_name("ndb_desc");
if(con.connect(12, 5, 1) != 0) if(con.connect(12, 5, 1) != 0)
{ {
ndbout << "Unable to connect to management server." << endl; ndbout << "Unable to connect to management server." << endl;
......
...@@ -61,6 +61,7 @@ int main(int argc, char** argv){ ...@@ -61,6 +61,7 @@ int main(int argc, char** argv){
} }
Ndb_cluster_connection con(opt_connect_str); Ndb_cluster_connection con(opt_connect_str);
con.set_name("ndb_drop_index");
if(con.connect(12, 5, 1) != 0) if(con.connect(12, 5, 1) != 0)
{ {
return NDBT_ProgramExit(NDBT_FAILED); return NDBT_ProgramExit(NDBT_FAILED);
......
...@@ -61,6 +61,7 @@ int main(int argc, char** argv){ ...@@ -61,6 +61,7 @@ int main(int argc, char** argv){
} }
Ndb_cluster_connection con(opt_connect_str); Ndb_cluster_connection con(opt_connect_str);
con.set_name("ndb_drop_table");
if(con.connect(12, 5, 1) != 0) if(con.connect(12, 5, 1) != 0)
{ {
ndbout << "Unable to connect to management server." << endl; ndbout << "Unable to connect to management server." << endl;
......
...@@ -219,6 +219,7 @@ int main(int argc, char** argv){ ...@@ -219,6 +219,7 @@ int main(int argc, char** argv){
_tabname = argv[0]; _tabname = argv[0];
ndb_cluster_connection = new Ndb_cluster_connection(opt_connect_str); ndb_cluster_connection = new Ndb_cluster_connection(opt_connect_str);
ndb_cluster_connection->set_name("ndb_show_tables");
if (ndb_cluster_connection->connect(12,5,1)) if (ndb_cluster_connection->connect(12,5,1))
fatal("Unable to connect to management server."); fatal("Unable to connect to management server.");
if (ndb_cluster_connection->wait_until_ready(30,0) < 0) if (ndb_cluster_connection->wait_until_ready(30,0) < 0)
......
...@@ -108,6 +108,7 @@ int main(int argc, char** argv){ ...@@ -108,6 +108,7 @@ int main(int argc, char** argv){
} }
Ndb_cluster_connection con(opt_connect_str); Ndb_cluster_connection con(opt_connect_str);
con.set_name("ndb_select_all");
if(con.connect(12, 5, 1) != 0) if(con.connect(12, 5, 1) != 0)
{ {
ndbout << "Unable to connect to management server." << endl; ndbout << "Unable to connect to management server." << endl;
......
...@@ -83,6 +83,7 @@ int main(int argc, char** argv){ ...@@ -83,6 +83,7 @@ int main(int argc, char** argv){
} }
Ndb_cluster_connection con(opt_connect_str); Ndb_cluster_connection con(opt_connect_str);
con.set_name("ndb_select_count");
if(con.connect(12, 5, 1) != 0) if(con.connect(12, 5, 1) != 0)
{ {
ndbout << "Unable to connect to management server." << endl; ndbout << "Unable to connect to management server." << endl;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment