summaryrefslogtreecommitdiff
path: root/mysql-test/suite/ndb/t/ndb_alter_table2.test
blob: f078ed6b47981bb9ff69c67d3ec2563d5243a150 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
-- source include/have_multi_ndb.inc
-- source include/not_embedded.inc

--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

connect (con1,localhost,root,,test);
connect (con2,localhost,root,,test);
connect (con3,localhost,root,,test);
connect (con4,localhost,root,,test);
connect (con5,localhost,root,,test);
connect (con6,localhost,root,,test);

CREATE TABLE t1 (
  a INT NOT NULL PRIMARY KEY,
  b INT NOT NULL
) ENGINE=ndbcluster;

connection con1;
BEGIN;
INSERT INTO t1 VALUES (9410,9412);
connection con2;
BEGIN;
--send
INSERT INTO t1 VALUES (9411,9412);
connection con3;
BEGIN;
--send
INSERT INTO t1 VALUES (9412,9412);
connection con4;
BEGIN;
--send
INSERT INTO t1 VALUES (9413,9412);
connection con5;
BEGIN;
--send
INSERT INTO t1 VALUES (9414,9412);
connection con6;
BEGIN;
--send
INSERT INTO t1 VALUES (9415,9412);
connection con1;
sleep 1;

ROLLBACK;
connection con2;
reap;
ROLLBACK;
connection con3;
reap;
ROLLBACK;
connection con4;
reap;
ROLLBACK;
connection con5;
reap;
ROLLBACK;
connection con6;
reap;
ROLLBACK;

connection server2;

drop table t1;
CREATE TABLE t1 (
  a INT NOT NULL PRIMARY KEY,
  b INT NOT NULL,
  c INT NOT NULL
) ENGINE=ndbcluster;

connection server1;

--disable_result_log
--error 0,1412
select * from t1;
--enable_result_log
select * from t1;
select * from t1;
select * from t1;
select * from t1;
select * from t1;

drop table t1;