mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / suite / ndb / t / ndb_multi_row.test
blob26953093ed0cc8d97abf924a4f66ae49ee1df568
1 -- source include/have_multi_ndb.inc
2 -- source include/not_embedded.inc
3 -- source include/have_binlog_format_mixed_or_row.inc
6 --disable_warnings
7 connection server2;
8 drop table if exists t1, t2, t3, t4;
9 flush status;
10 connection server1;
11 drop table if exists t1, t2, t3, t4;
12 flush status;
13 --enable_warnings
16 # Create test tables on server1
17 create table t1 (a int) engine=ndbcluster;
18 create table t2 (a int) engine=ndbcluster;
19 insert into t1 value (2);
20 insert into t2 value (3);
21 select * from t1;
22 select * from t2;
23 show status like 'handler_discover%';
25 # Check dropping and recreating table on same server
26 connect (con1,localhost,root,,test);
27 connect (con2,localhost,root,,test);
28 connection con1;
29 select * from t1;
30 connection con2;
31 drop table t1;
32 create table t1 (a int) engine=ndbcluster;
33 insert into t1 value (2);
34 connection con1;
35 select * from t1;
37 # Check dropping and recreating table on different server
38 connection server2;
39 show status like 'handler_discover%';
40 drop table t1;
41 create table t1 (a int) engine=ndbcluster;
42 insert into t1 value (2);
43 connection server1;
44 ## Currently a retry is required remotely
45 #--error 1412
46 #select * from t1;
47 #show warnings;
48 #flush table t1;
49 # Table definition change should be propagated automatically
50 select * from t1;
52 # Connect to server2 and use the tables from there
53 connection server2;
54 flush status;
55 select * from t1;
56 update t1 set a=3 where a=2;
57 show status like 'handler_discover%';
59 # Create a new table on server2
60 create table t3 (a int not null primary key, b varchar(22),
61 c int, last_col text) engine=ndb;
62 insert into t3 values(1, 'Hi!', 89, 'Longtext column');
63 create table t4 (pk int primary key, b int) engine=ndb;
65 # Check that the tables are accessible from server1
66 connection server1;
67 select * from t1;
68 select * from t3;
69 show tables like 't4';
70 show tables;
72 drop table t1, t2, t3, t4;
73 connection server2;
74 drop table if exists t1, t3, t4;
76 # End of 4.1 tests