1# The include statement below is a temp one for tests that are yet to 2#be ported to run with InnoDB, 3#but needs to be kept for tests that would need MyISAM in future. 4--source include/force_myisam_default.inc 5 6-- source include/have_multi_ndb.inc 7 8--disable_warnings 9connection server2; 10drop table if exists t1, t2, t3, t4; 11flush status; 12connection server1; 13drop table if exists t1, t2, t3, t4; 14flush status; 15--enable_warnings 16 17 18# Create test tables on server1 19create table t1 (a int) engine=ndbcluster; 20create table t2 (a int) engine=ndbcluster; 21insert into t1 value (2); 22insert into t2 value (3); 23select * from t1; 24select * from t2; 25show status like 'handler_discover%'; 26 27# Check dropping and recreating table on same server 28connect (con1,localhost,root,,test); 29connect (con2,localhost,root,,test); 30connection con1; 31select * from t1; 32connection con2; 33drop table t1; 34create table t1 (a int) engine=ndbcluster; 35insert into t1 value (2); 36connection con1; 37select * from t1; 38 39# Check dropping and recreating table on different server 40connection server2; 41show status like 'handler_discover%'; 42drop table t1; 43create table t1 (a int) engine=ndbcluster; 44insert into t1 value (2); 45connection server1; 46## Currently a retry is required remotely 47#--error 1412 48#select * from t1; 49#show warnings; 50#flush table t1; 51# Table definition change should be propagated automatically 52select * from t1; 53 54# Connect to server2 and use the tables from there 55connection server2; 56flush status; 57select * from t1; 58update t1 set a=3 where a=2; 59show status like 'handler_discover%'; 60 61# Create a new table on server2 62create table t3 (a int not null primary key, b varchar(22), 63c int, last_col text) engine=ndb; 64insert into t3 values(1, 'Hi!', 89, 'Longtext column'); 65create table t4 (pk int primary key, b int) engine=ndb; 66 67# Check that the tables are accessible from server1 68connection server1; 69select * from t1; 70select * from t3; 71show tables like 't4'; 72show tables; 73 74drop table t1, t2, t3, t4; 75connection server2; 76drop table if exists t1, t3, t4; 77 78# End of 4.1 tests 79