| 1 |
Create table with non standard partitioning |
| 2 |
allowing colocation of operations in a single LDM |
| 3 |
create table t1 (a int, b int, c int, primary key(a,b)) engine=ndb partition by key(a); |
| 4 |
Insert some rows |
| 5 |
All will be on the same partition, LDM instance, nodes |
| 6 |
insert into t1 values (1,1,1); |
| 7 |
insert into t1 select 1, b+1, 1 from t1; |
| 8 |
insert into t1 select 1, b+2, 1 from t1; |
| 9 |
insert into t1 select 1, b+4, 1 from t1; |
| 10 |
insert into t1 select 1, b+8, 1 from t1; |
| 11 |
insert into t1 select 1, b+16, 1 from t1; |
| 12 |
insert into t1 select 1, b+32, 1 from t1; |
| 13 |
insert into t1 select 1, b+64, 1 from t1; |
| 14 |
insert into t1 select 1, b+128, 1 from t1; |
| 15 |
insert into t1 select 1, b+256, 1 from t1; |
| 16 |
Check LQH operation entry size and records per page. |
| 17 |
Usable words on page are 32768 - 128 |
| 18 |
Extra pages is 0 |
| 19 |
Start a transaction with a number of operations |
| 20 |
100 ops makes it easier to identify in case of noise |
| 21 |
begin; |
| 22 |
update t1 set c=c+1 limit 100; |
| 23 |
Determine TC |
| 24 |
Determine other node |
| 25 |
Determine target number of ops |
| 26 |
as multiple of records per page |
| 27 |
With optional extra pages to test dynamic sub pool limit |
| 28 |
Check targetops not too small |
| 29 |
enoughTargetOps |
| 30 |
1 |
| 31 |
Subtract 200 ops |
| 32 |
100 for those already created |
| 33 |
100 reserved for DBUTIL usage |
| 34 |
Consume ops up to target |
| 35 |
Restart TC node |
| 36 |
Wait for not started state |
| 37 |
Check no operations from failed TC remain (must be none) |
| 38 |
node_id block_instance transid operation_type state tableid fragmentid client_node_id client_block_ref tc_node_id tc_block_no tc_block_instance |
| 39 |
Start TC node |
| 40 |
Wait for all started |
| 41 |
OK |
| 42 |
rollback; |
| 43 |
ERROR HY000: Got temporary error 4025 'Node failure caused abort of transaction' from NDBCLUSTER |
| 44 |
Extra pages is 1 |
| 45 |
Start a transaction with a number of operations |
| 46 |
100 ops makes it easier to identify in case of noise |
| 47 |
begin; |
| 48 |
update t1 set c=c+1 limit 100; |
| 49 |
Determine TC |
| 50 |
Determine other node |
| 51 |
Determine target number of ops |
| 52 |
as multiple of records per page |
| 53 |
With optional extra pages to test dynamic sub pool limit |
| 54 |
Check targetops not too small |
| 55 |
enoughTargetOps |
| 56 |
1 |
| 57 |
Subtract 200 ops |
| 58 |
100 for those already created |
| 59 |
100 reserved for DBUTIL usage |
| 60 |
Consume ops up to target |
| 61 |
Restart TC node |
| 62 |
Wait for not started state |
| 63 |
Check no operations from failed TC remain (must be none) |
| 64 |
node_id block_instance transid operation_type state tableid fragmentid client_node_id client_block_ref tc_node_id tc_block_no tc_block_instance |
| 65 |
Start TC node |
| 66 |
Wait for all started |
| 67 |
OK |
| 68 |
rollback; |
| 69 |
ERROR HY000: Got temporary error 4025 'Node failure caused abort of transaction' from NDBCLUSTER |
| 70 |
drop table t1; |