1 -- source include/have_multi_ndb.inc
2 -- source include/not_embedded.inc
6 drop table if exists t1, t2, t3, t4;
9 drop table if exists t1, t2, t3, t4;
13 # Create test tables on server1
14 create table t1 (a int) engine=ndbcluster;
15 create table t2 (a int) engine=ndbcluster;
16 insert into t1 value (2);
17 insert into t2 value (3);
20 show status like 'handler_discover%';
22 # Check dropping and recreating table on same server
23 connect (con1,localhost,root,,test);
24 connect (con2,localhost,root,,test);
29 create table t1 (a int) engine=ndbcluster;
30 insert into t1 value (2);
34 # Check dropping and recreating table on different server
36 show status like 'handler_discover%';
38 create table t1 (a int) engine=ndbcluster;
39 insert into t1 value (2);
44 # Connect to server2 and use the tables from there
48 update t1 set a=3 where a=2;
49 show status like 'handler_discover%';
51 # Create a new table on server2
52 create table t3 (a int not null primary key, b varchar(22),
53 c int, last_col text) engine=ndb;
54 insert into t3 values(1, 'Hi!', 89, 'Longtext column');
55 create table t4 (pk int primary key, b int) engine=ndb;
57 # Check that the tables are accessible from server1
61 show tables like 't4';
64 drop table t1, t2, t3, t4;
67 create table t1(c1 int key)ENGINE=MyISAM;
68 insert into t1 values(1),(3),(5);
69 select * from t1 order by c1;
73 create table t1(c1 int key)ENGINE=MyISAM;
74 insert into t1 values(100),(344),(533);
75 select * from t1 order by c1;
78 alter table t1 engine=ndb;
82 select * from t1 order by c1;
86 select * from t1 order by c1;
90 # Check distributed drop of database in 5.1
93 create table t1(x int) engine=ndb;
111 create table t1(x int) engine=ndb;
115 create table t2(x int) engine=myisam;
127 # bug#31470, ndb table with special characters in name
128 # are not discovered correctly
131 create table `test`.`t1$EX`
132 (server_id int unsigned,
133 master_server_id int unsigned,
134 master_epoch bigint unsigned,
136 primary key(server_id, master_server_id,
137 master_epoch, count))
140 # check that table shows up ok on both servers
141 # before bugfix table would not show up on server2
142 --replace_regex /EX/ex/
143 show tables like '%$%';
146 --replace_regex /EX/ex/
147 show tables like '%$%';
150 drop table `test`.`t1$EX`;
151 show tables like '%$%';
154 show tables like '%$%';