Loading mysql-test/include/have_multi_ndb.inc 0 → 100644 +28 −0 Original line number Diff line number Diff line # Setup connections to both MySQL Servers connected to the cluster connect (server1,127.0.0.1,root,,test,$MASTER_MYPORT,); connect (server2,127.0.0.1,root,,test,$MASTER_MYPORT1,); # Check that server1 has NDB support connection server1; disable_query_log; --disable_warnings drop table if exists t1, t2; --enable_warnings flush tables; @r/have_ndb.require show variables like "have_ndbcluster"; # @r/server_id.require show variables like "server_id"; enable_query_log; # Check that server2 has NDB support connection server2; disable_query_log; --disable_warnings drop table if exists t1, t2; --enable_warnings flush tables; @r/have_ndb.require show variables like "have_ndbcluster"; # @r/server_id1.require show variables like "server_id"; enable_query_log; # Set the default connection to 'server1' connection server1; mysql-test/r/ndb_alter_table.result +14 −0 Original line number Diff line number Diff line Loading @@ -170,3 +170,17 @@ c 4 5 drop table t1; create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) engine=ndb; insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); create index c on t1(c); select * from t1 where b = 'two'; a b c 2 two two alter table t1 drop index c; select * from t1 where b = 'two'; ERROR 42S02: Table 'test.t1' doesn't exist select * from t1 where b = 'two'; a b c 2 two two drop table t1; mysql-test/r/ndb_multi.result 0 → 100644 +49 −0 Original line number Diff line number Diff line drop table if exists t1, t2, t3, t4; flush status; create table t1 (a int) engine=ndbcluster; create table t2 (a int) engine=ndbcluster; insert into t1 value (2); insert into t2 value (3); select * from t1; a 2 select * from t2; a 3 show status like 'handler_discover%'; Variable_name Value Handler_discover 0 flush status; select * from t1; a 2 update t1 set a=3 where a=2; show status like 'handler_discover%'; Variable_name Value Handler_discover 1 create table t3 (a int not null primary key, b varchar(22), c int, last_col text) engine=ndb; insert into t3 values(1, 'Hi!', 89, 'Longtext column'); create table t4 (pk int primary key, b int) engine=ndb; select * from t1; a 3 select * from t3; a b c last_col 1 Hi! 89 Longtext column show status like 'handler_discover%'; Variable_name Value Handler_discover 1 show tables like 't4'; Tables_in_test (t4) t4 show status like 'handler_discover%'; Variable_name Value Handler_discover 2 show tables; Tables_in_test t1 t2 t3 t4 drop table t1, t2, t3, t4; mysql-test/t/ndb_alter_table.test +16 −0 Original line number Diff line number Diff line -- source include/have_ndb.inc -- source include/have_multi_ndb.inc --disable_warnings DROP TABLE IF EXISTS t1; Loading Loading @@ -133,6 +134,21 @@ INSERT INTO t1 VALUES (1,2,0),(18,19,4),(20,21,0); select c from t1 order by c; drop table t1; create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) engine=ndb; insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); create index c on t1(c); connection server2; select * from t1 where b = 'two'; connection server1; alter table t1 drop index c; connection server2; --error 1146 select * from t1 where b = 'two'; select * from t1 where b = 'two'; connection server1; drop table t1; #--disable_warnings #DROP TABLE IF EXISTS t2; #--enable_warnings Loading mysql-test/t/ndb_multi.test 0 → 100644 +44 −0 Original line number Diff line number Diff line -- source include/have_ndb.inc -- source include/have_multi_ndb.inc --disable_warnings drop table if exists t1, t2, t3, t4; --enable_warnings flush status; # Create test tables on server1 create table t1 (a int) engine=ndbcluster; create table t2 (a int) engine=ndbcluster; insert into t1 value (2); insert into t2 value (3); select * from t1; select * from t2; show status like 'handler_discover%'; # Connect to server2 and use the tables from there connection server2; flush status; select * from t1; update t1 set a=3 where a=2; show status like 'handler_discover%'; # Create a new table on server2 create table t3 (a int not null primary key, b varchar(22), c int, last_col text) engine=ndb; insert into t3 values(1, 'Hi!', 89, 'Longtext column'); create table t4 (pk int primary key, b int) engine=ndb; # Check that the tables are accessible from server1 connection server1; select * from t1; select * from t3; show status like 'handler_discover%'; show tables like 't4'; show status like 'handler_discover%'; show tables; drop table t1, t2, t3, t4; Loading
mysql-test/include/have_multi_ndb.inc 0 → 100644 +28 −0 Original line number Diff line number Diff line # Setup connections to both MySQL Servers connected to the cluster connect (server1,127.0.0.1,root,,test,$MASTER_MYPORT,); connect (server2,127.0.0.1,root,,test,$MASTER_MYPORT1,); # Check that server1 has NDB support connection server1; disable_query_log; --disable_warnings drop table if exists t1, t2; --enable_warnings flush tables; @r/have_ndb.require show variables like "have_ndbcluster"; # @r/server_id.require show variables like "server_id"; enable_query_log; # Check that server2 has NDB support connection server2; disable_query_log; --disable_warnings drop table if exists t1, t2; --enable_warnings flush tables; @r/have_ndb.require show variables like "have_ndbcluster"; # @r/server_id1.require show variables like "server_id"; enable_query_log; # Set the default connection to 'server1' connection server1;
mysql-test/r/ndb_alter_table.result +14 −0 Original line number Diff line number Diff line Loading @@ -170,3 +170,17 @@ c 4 5 drop table t1; create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) engine=ndb; insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); create index c on t1(c); select * from t1 where b = 'two'; a b c 2 two two alter table t1 drop index c; select * from t1 where b = 'two'; ERROR 42S02: Table 'test.t1' doesn't exist select * from t1 where b = 'two'; a b c 2 two two drop table t1;
mysql-test/r/ndb_multi.result 0 → 100644 +49 −0 Original line number Diff line number Diff line drop table if exists t1, t2, t3, t4; flush status; create table t1 (a int) engine=ndbcluster; create table t2 (a int) engine=ndbcluster; insert into t1 value (2); insert into t2 value (3); select * from t1; a 2 select * from t2; a 3 show status like 'handler_discover%'; Variable_name Value Handler_discover 0 flush status; select * from t1; a 2 update t1 set a=3 where a=2; show status like 'handler_discover%'; Variable_name Value Handler_discover 1 create table t3 (a int not null primary key, b varchar(22), c int, last_col text) engine=ndb; insert into t3 values(1, 'Hi!', 89, 'Longtext column'); create table t4 (pk int primary key, b int) engine=ndb; select * from t1; a 3 select * from t3; a b c last_col 1 Hi! 89 Longtext column show status like 'handler_discover%'; Variable_name Value Handler_discover 1 show tables like 't4'; Tables_in_test (t4) t4 show status like 'handler_discover%'; Variable_name Value Handler_discover 2 show tables; Tables_in_test t1 t2 t3 t4 drop table t1, t2, t3, t4;
mysql-test/t/ndb_alter_table.test +16 −0 Original line number Diff line number Diff line -- source include/have_ndb.inc -- source include/have_multi_ndb.inc --disable_warnings DROP TABLE IF EXISTS t1; Loading Loading @@ -133,6 +134,21 @@ INSERT INTO t1 VALUES (1,2,0),(18,19,4),(20,21,0); select c from t1 order by c; drop table t1; create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) engine=ndb; insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); create index c on t1(c); connection server2; select * from t1 where b = 'two'; connection server1; alter table t1 drop index c; connection server2; --error 1146 select * from t1 where b = 'two'; select * from t1 where b = 'two'; connection server1; drop table t1; #--disable_warnings #DROP TABLE IF EXISTS t2; #--enable_warnings Loading
mysql-test/t/ndb_multi.test 0 → 100644 +44 −0 Original line number Diff line number Diff line -- source include/have_ndb.inc -- source include/have_multi_ndb.inc --disable_warnings drop table if exists t1, t2, t3, t4; --enable_warnings flush status; # Create test tables on server1 create table t1 (a int) engine=ndbcluster; create table t2 (a int) engine=ndbcluster; insert into t1 value (2); insert into t2 value (3); select * from t1; select * from t2; show status like 'handler_discover%'; # Connect to server2 and use the tables from there connection server2; flush status; select * from t1; update t1 set a=3 where a=2; show status like 'handler_discover%'; # Create a new table on server2 create table t3 (a int not null primary key, b varchar(22), c int, last_col text) engine=ndb; insert into t3 values(1, 'Hi!', 89, 'Longtext column'); create table t4 (pk int primary key, b int) engine=ndb; # Check that the tables are accessible from server1 connection server1; select * from t1; select * from t3; show status like 'handler_discover%'; show tables like 't4'; show status like 'handler_discover%'; show tables; drop table t1, t2, t3, t4;