| 1 |
-- source include/have_ndb.inc |
| 2 |
-- source include/have_ndb_debug.inc |
| 3 |
|
| 4 |
use test; |
| 5 |
create table test.t1 (a int primary key, b int) engine=ndb; |
| 6 |
insert into test.t1 values (1,1), (2,2), (3,3), (4,4); |
| 7 |
|
| 8 |
--echo Set TC Transaction Inactive Timeout to 5s |
| 9 |
--disable_result_log |
| 10 |
--exec $NDB_MGM -e "ALL DUMP 2508 5000" |
| 11 |
--enable_result_log |
| 12 |
|
| 13 |
begin; |
| 14 |
# Insert conflicting key, ignoring error |
| 15 |
insert ignore into test.t1 values (5,5), (3,6), (7,7); |
| 16 |
|
| 17 |
--echo Waiting for a while so that TC rolls back |
| 18 |
--echo the transaction |
| 19 |
--sleep 10 |
| 20 |
|
| 21 |
--echo Committing the transaction, expect already rolled back error |
| 22 |
--error 1205 |
| 23 |
commit; |
| 24 |
|
| 25 |
--disable_result_log |
| 26 |
--exec $NDB_MGM -e "ALL DUMP 2508 0" |
| 27 |
--enable_result_log |
| 28 |
|
| 29 |
drop table test.t1; |
| 30 |
|