mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / suite / ndb / t / ndb_alter_table3.test
blob86e664b23b0cd857ec210d45499c64ff167eff5b
1 -- source include/have_multi_ndb.inc
2 -- source include/not_embedded.inc
4 --disable_warnings
5 DROP TABLE IF EXISTS t1;
6 --enable_warnings
8 connection server1;
9 create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) )
10 engine=ndb;
11 insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three');
12 create index c on t1(c); 
13 connection server2;
14 show indexes from t1;
15 select * from t1 where c = 'two';
16 connection server1;
17 alter table t1 drop index c;
18 connection server2;
19 show indexes from t1;
20 select * from t1 where c = 'two';
21 connection server1;
22 drop table t1;
24 connection server1;
25 create table t3 (a int primary key) engine=ndbcluster;
27 connection server2;
28 begin;
29 insert into t3 values (1);
31 connection server1;
32 alter table t3 rename t4;
34 connection server2;
35 # with rbr the below will not work as the "alter" event
36 # explicitly invalidates the dictionary cache.
37 ## This should work as transaction is ongoing...
38 #delete from t3;
39 #insert into t3 values (1);
40 commit; 
42 # This should fail as its a new transaction
43 --error 1146
44 select * from t3;
45 select * from t4;
46 drop table t4;
47 show tables;
48 connection server1;