Loading mysql-test/include/have_multi_ndb.inc +23 −9 Original line number Diff line number Diff line Loading @@ -5,10 +5,6 @@ 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; --require r/true.require select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'ndbcluster'; --source include/ndb_not_readonly.inc Loading @@ -17,14 +13,32 @@ 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; --require r/true.require select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'ndbcluster'; --source include/ndb_not_readonly.inc enable_query_log; # Set the default connection to 'server1' # cleanup connection server1; disable_query_log; disable_warnings; --error 0,1051 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; flush tables; flush status; enable_warnings; enable_query_log; connection server2; disable_query_log; disable_warnings; --error 0,1051 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; flush tables; flush status; enable_warnings; enable_query_log; # Set the default connection connection server1; mysql-test/suite/ndb/r/ndb_multi.result +3 −2 Original line number Diff line number Diff line drop table if exists t1, t2, t3, t4; flush status; drop table if exists t1, t2, t3, t4; flush status; create table t1 (a int) engine=ndbcluster; Loading Loading @@ -132,11 +133,11 @@ master_epoch, count)) engine ndb; show tables like '%$%'; Tables_in_test (%$%) t1$EX t1$ex use test; show tables like '%$%'; Tables_in_test (%$%) t1$EX t1$ex drop table `test`.`t1$EX`; show tables like '%$%'; Tables_in_test (%$%) Loading mysql-test/suite/ndb/r/ndb_multi_row.result +1 −0 Original line number Diff line number Diff line drop table if exists t1, t2, t3, t4; flush status; drop table if exists t1, t2, t3, t4; flush status; create table t1 (a int) engine=ndbcluster; Loading mysql-test/suite/ndb/r/ndb_update_no_read.result 0 → 100644 +75 −0 Original line number Diff line number Diff line DROP TABLE IF EXISTS t1; create table t1 (a int not null primary key, b int not null, c int, unique index_b (b) using hash) engine ndb; insert into t1 values (1,10,1),(2,9,1),(3,8,1),(4,7,1),(5,6,1),(6,5,2),(7,4,2),(8,3,2), (9,2,2),(10,1,2); update t1 set c = 111, b = 20 where a = 1; select * from t1 where a = 1 order by a; a b c 1 20 111 delete from t1 where a = 1; select * from t1 where a = 1 order by a; a b c update t1 set c = 12, b = 19 where b = 2; select * from t1 where b = 2 order by a; a b c delete from t1 where b = 19; select * from t1 where b = 19 order by a; a b c update t1 set c = 22 where a = 10 or a >= 10; select * from t1 order by a; a b c 2 9 1 3 8 1 4 7 1 5 6 1 6 5 2 7 4 2 8 3 2 10 1 22 update t1 set c = 23 where a in (8,10); select * from t1 order by a; a b c 2 9 1 3 8 1 4 7 1 5 6 1 6 5 2 7 4 2 8 3 23 10 1 23 update t1 set c = 23 where a in (7,8) or a >= 10; select * from t1 order by a; a b c 2 9 1 3 8 1 4 7 1 5 6 1 6 5 2 7 4 23 8 3 23 10 1 23 update t1 set c = 11 where a = 3 or b = 7; select * from t1 where a = 3 or b = 7 order by a; a b c 3 8 11 4 7 11 update t1 set a = 13, b = 20 where a = 3; select * from t1 where a = 13 order by a; a b c 13 20 11 update t1 set a = 12, b = 19 where b = 7; select * from t1 where b = 19 order by a; a b c 12 19 11 select * from t1 where b = 7 order by a; a b c update t1 set c = 12, b = 29 where a = 5 and b = 6; select * from t1 where b = 19 order by a; a b c 12 19 11 delete from t1 where b = 6 and c = 12; select * from t1 where b = 6 order by a; a b c drop table t1; mysql-test/suite/ndb/t/ndb_multi.test +4 −2 Original line number Diff line number Diff line Loading @@ -4,11 +4,11 @@ --disable_warnings connection server2; drop table if exists t1, t2, t3, t4; flush status; connection server1; drop table if exists t1, t2, t3, t4; --enable_warnings flush status; --enable_warnings # Create test tables on server1 create table t1 (a int) engine=ndbcluster; Loading Loading @@ -139,9 +139,11 @@ create table `test`.`t1$EX` # check that table shows up ok on both servers # before bugfix table would not show up on server2 --replace_regex /EX/ex/ show tables like '%$%'; connection server2; use test; --replace_regex /EX/ex/ show tables like '%$%'; # check cleanup Loading Loading
mysql-test/include/have_multi_ndb.inc +23 −9 Original line number Diff line number Diff line Loading @@ -5,10 +5,6 @@ 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; --require r/true.require select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'ndbcluster'; --source include/ndb_not_readonly.inc Loading @@ -17,14 +13,32 @@ 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; --require r/true.require select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'ndbcluster'; --source include/ndb_not_readonly.inc enable_query_log; # Set the default connection to 'server1' # cleanup connection server1; disable_query_log; disable_warnings; --error 0,1051 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; flush tables; flush status; enable_warnings; enable_query_log; connection server2; disable_query_log; disable_warnings; --error 0,1051 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; flush tables; flush status; enable_warnings; enable_query_log; # Set the default connection connection server1;
mysql-test/suite/ndb/r/ndb_multi.result +3 −2 Original line number Diff line number Diff line drop table if exists t1, t2, t3, t4; flush status; drop table if exists t1, t2, t3, t4; flush status; create table t1 (a int) engine=ndbcluster; Loading Loading @@ -132,11 +133,11 @@ master_epoch, count)) engine ndb; show tables like '%$%'; Tables_in_test (%$%) t1$EX t1$ex use test; show tables like '%$%'; Tables_in_test (%$%) t1$EX t1$ex drop table `test`.`t1$EX`; show tables like '%$%'; Tables_in_test (%$%) Loading
mysql-test/suite/ndb/r/ndb_multi_row.result +1 −0 Original line number Diff line number Diff line drop table if exists t1, t2, t3, t4; flush status; drop table if exists t1, t2, t3, t4; flush status; create table t1 (a int) engine=ndbcluster; Loading
mysql-test/suite/ndb/r/ndb_update_no_read.result 0 → 100644 +75 −0 Original line number Diff line number Diff line DROP TABLE IF EXISTS t1; create table t1 (a int not null primary key, b int not null, c int, unique index_b (b) using hash) engine ndb; insert into t1 values (1,10,1),(2,9,1),(3,8,1),(4,7,1),(5,6,1),(6,5,2),(7,4,2),(8,3,2), (9,2,2),(10,1,2); update t1 set c = 111, b = 20 where a = 1; select * from t1 where a = 1 order by a; a b c 1 20 111 delete from t1 where a = 1; select * from t1 where a = 1 order by a; a b c update t1 set c = 12, b = 19 where b = 2; select * from t1 where b = 2 order by a; a b c delete from t1 where b = 19; select * from t1 where b = 19 order by a; a b c update t1 set c = 22 where a = 10 or a >= 10; select * from t1 order by a; a b c 2 9 1 3 8 1 4 7 1 5 6 1 6 5 2 7 4 2 8 3 2 10 1 22 update t1 set c = 23 where a in (8,10); select * from t1 order by a; a b c 2 9 1 3 8 1 4 7 1 5 6 1 6 5 2 7 4 2 8 3 23 10 1 23 update t1 set c = 23 where a in (7,8) or a >= 10; select * from t1 order by a; a b c 2 9 1 3 8 1 4 7 1 5 6 1 6 5 2 7 4 23 8 3 23 10 1 23 update t1 set c = 11 where a = 3 or b = 7; select * from t1 where a = 3 or b = 7 order by a; a b c 3 8 11 4 7 11 update t1 set a = 13, b = 20 where a = 3; select * from t1 where a = 13 order by a; a b c 13 20 11 update t1 set a = 12, b = 19 where b = 7; select * from t1 where b = 19 order by a; a b c 12 19 11 select * from t1 where b = 7 order by a; a b c update t1 set c = 12, b = 29 where a = 5 and b = 6; select * from t1 where b = 19 order by a; a b c 12 19 11 delete from t1 where b = 6 and c = 12; select * from t1 where b = 6 order by a; a b c drop table t1;
mysql-test/suite/ndb/t/ndb_multi.test +4 −2 Original line number Diff line number Diff line Loading @@ -4,11 +4,11 @@ --disable_warnings connection server2; drop table if exists t1, t2, t3, t4; flush status; connection server1; drop table if exists t1, t2, t3, t4; --enable_warnings flush status; --enable_warnings # Create test tables on server1 create table t1 (a int) engine=ndbcluster; Loading Loading @@ -139,9 +139,11 @@ create table `test`.`t1$EX` # check that table shows up ok on both servers # before bugfix table would not show up on server2 --replace_regex /EX/ex/ show tables like '%$%'; connection server2; use test; --replace_regex /EX/ex/ show tables like '%$%'; # check cleanup Loading