| 1 |
-- source include/have_multi_ndb.inc |
| 2 |
|
| 3 |
--disable_warnings |
| 4 |
DROP TABLE IF EXISTS t1; |
| 5 |
--enable_warnings |
| 6 |
|
| 7 |
connect (con1,localhost,root,,test); |
| 8 |
connect (con2,localhost,root,,test); |
| 9 |
connect (con3,localhost,root,,test); |
| 10 |
connect (con4,localhost,root,,test); |
| 11 |
connect (con5,localhost,root,,test); |
| 12 |
connect (con6,localhost,root,,test); |
| 13 |
|
| 14 |
CREATE TABLE t1 ( |
| 15 |
a INT NOT NULL PRIMARY KEY, |
| 16 |
b INT NOT NULL |
| 17 |
) ENGINE=ndbcluster; |
| 18 |
|
| 19 |
connection con1; |
| 20 |
BEGIN; |
| 21 |
INSERT INTO t1 VALUES (9410,9412); |
| 22 |
connection con2; |
| 23 |
BEGIN; |
| 24 |
--send |
| 25 |
INSERT INTO t1 VALUES (9411,9412); |
| 26 |
connection con3; |
| 27 |
BEGIN; |
| 28 |
--send |
| 29 |
INSERT INTO t1 VALUES (9412,9412); |
| 30 |
connection con4; |
| 31 |
BEGIN; |
| 32 |
--send |
| 33 |
INSERT INTO t1 VALUES (9413,9412); |
| 34 |
connection con5; |
| 35 |
BEGIN; |
| 36 |
--send |
| 37 |
INSERT INTO t1 VALUES (9414,9412); |
| 38 |
connection con6; |
| 39 |
BEGIN; |
| 40 |
--send |
| 41 |
INSERT INTO t1 VALUES (9415,9412); |
| 42 |
connection con1; |
| 43 |
sleep 1; |
| 44 |
|
| 45 |
ROLLBACK; |
| 46 |
connection con2; |
| 47 |
reap; |
| 48 |
ROLLBACK; |
| 49 |
connection con3; |
| 50 |
reap; |
| 51 |
ROLLBACK; |
| 52 |
connection con4; |
| 53 |
reap; |
| 54 |
ROLLBACK; |
| 55 |
connection con5; |
| 56 |
reap; |
| 57 |
ROLLBACK; |
| 58 |
connection con6; |
| 59 |
reap; |
| 60 |
ROLLBACK; |
| 61 |
|
| 62 |
connection server2; |
| 63 |
|
| 64 |
drop table t1; |
| 65 |
CREATE TABLE t1 ( |
| 66 |
a INT NOT NULL PRIMARY KEY, |
| 67 |
b INT NOT NULL, |
| 68 |
c INT NOT NULL |
| 69 |
) ENGINE=ndbcluster; |
| 70 |
|
| 71 |
connection server1; |
| 72 |
|
| 73 |
--disable_result_log |
| 74 |
--error 0,1412 |
| 75 |
select * from t1; |
| 76 |
--enable_result_log |
| 77 |
select * from t1; |
| 78 |
select * from t1; |
| 79 |
select * from t1; |
| 80 |
select * from t1; |
| 81 |
select * from t1; |
| 82 |
|
| 83 |
drop table t1; |