| 1 |
--source include/have_ndb.inc |
| 2 |
|
| 3 |
# See Bug#89892: Error object: DBTC (Line: 4821) 0x00000002 Check trigPtr.p->refCount failed |
| 4 |
|
| 5 |
create table t ( |
| 6 |
x int not null, |
| 7 |
y int not null, |
| 8 |
primary key (x), |
| 9 |
unique key (y) |
| 10 |
) engine=ndb; |
| 11 |
|
| 12 |
let $i = 16; |
| 13 |
while ($i) |
| 14 |
{ |
| 15 |
eval insert into t values ($i, $i); |
| 16 |
dec $i; |
| 17 |
} |
| 18 |
|
| 19 |
start transaction; |
| 20 |
insert into t values (1000, 1000); |
| 21 |
insert into t select 1000+x, 1000+y from t; |
| 22 |
# Should fail already for insert above but does not due to bug#16021097 |
| 23 |
--error ER_ERROR_DURING_COMMIT |
| 24 |
commit; |
| 25 |
|
| 26 |
drop table t; |
| 27 |
|
| 28 |
# Check that, if the operation that crosses the MaxDMLOperationsPerTransaction |
| 29 |
# threshold is a delete the transaction should softly fail with error 261 |
| 30 |
# See Bug#32491105 DATA NODE CRASH WHEN MAXDMLOPERATIONSPERTRANSACTION VIOLATED |
| 31 |
# BY DELETE STMT |
| 32 |
create table t2 ( |
| 33 |
x int not null, |
| 34 |
y int not null, |
| 35 |
primary key (x), |
| 36 |
unique key (y) |
| 37 |
) engine=ndb; |
| 38 |
|
| 39 |
start transaction; |
| 40 |
insert into t2 values (1001, 1001); |
| 41 |
insert into t2 values (1002, 1002); |
| 42 |
insert into t2 values (1003, 1003); |
| 43 |
insert into t2 values (1004, 1004); |
| 44 |
insert into t2 values (1005, 1005); |
| 45 |
insert into t2 values (1006, 1006); |
| 46 |
insert into t2 values (1007, 1007); |
| 47 |
insert into t2 values (1008, 1008); |
| 48 |
insert into t2 values (1009, 1009); |
| 49 |
insert into t2 values (1010, 1010); |
| 50 |
insert into t2 values (1011, 1011); |
| 51 |
insert into t2 values (1012, 1012); |
| 52 |
insert into t2 values (1013, 1013); |
| 53 |
insert into t2 values (1014, 1014); |
| 54 |
insert into t2 values (1015, 1015); |
| 55 |
insert into t2 values (1016, 1016); |
| 56 |
--error 0,1296 |
| 57 |
delete from t2 order by x limit 5; |
| 58 |
show warnings; |
| 59 |
rollback; |
| 60 |
show warnings; |
| 61 |
drop table t2; |