# We are using some debug-only features in this test
# bulk delete with timeout error 4012
create table t4(id int primary key, val int) engine=ndb;
insert into t4 values (1,1), (2,2), (3,3), (4,4), (5,5);
set @save_debug = @@session.debug;
# Error injection in Ndb::waitCompletedTransactions so that transaction times out quickly
SET SESSION debug="+d,early_trans_timeout";
delete from t4 where id > 0;
ERROR HY000: Got error 4012 'Request ndbd time-out, maybe due to high load or communication problems' from NDBCLUSTER
SET SESSION debug=@save_debug;
drop table t4;
# bulk delete ignore with timeout error 4012
create table t4(id int primary key, val int) engine=ndb;
insert into t4 values (1,1), (2,2), (3,3), (4,4), (5,5);
set @save_debug = @@session.debug;
# Error injection in Ndb::waitCompletedTransactions so that transaction times out quickly
SET SESSION debug="+d,early_trans_timeout";
delete ignore from t4 where id > 0;
ERROR HY000: Got error 4012 'Request ndbd time-out, maybe due to high load or communication problems' from NDBCLUSTER
SET SESSION debug=@save_debug;
drop table t4;
# bulk update with timeout error 4012
create table t4(id int primary key, val int) engine=ndb;
insert into t4 values (1,1), (2,2), (3,3), (4,4), (5,5);
set @save_debug = @@session.debug;
# Error injection in Ndb::waitCompletedTransactions so that transaction times out quickly
SET SESSION debug="+d,early_trans_timeout";
update t4 set val = 0 where id > 0;
ERROR HY000: Got error 4012 'Request ndbd time-out, maybe due to high load or communication problems' from NDBCLUSTER
SET SESSION debug=@save_debug;
drop table t4;
# bulk update ignore is not possible because 'ignore' disables bulk updates
# mysqld gets timeout error 4008 on CREATE TABLE
set @save_debug = @@session.debug;
SET SESSION debug="+d,ndb_timeout_gettabinforeq";
create table t4(id int primary key, val int)engine=ndb;
ERROR HY000: Got error 1625 'Unknown error code' from NDBCLUSTER
show warnings;
Level	Code	Message
Warning	1296	Got error 4008 'Receive from NDB failed' from NDB
Warning	1625	Bad schema for mysql.ndb_replication table. Message: Unable to retrieve mysql.ndb_replication, logging and conflict r
Error	1296	Got error 1625 'Unknown error code' from NDBCLUSTER
SET SESSION debug=@save_debug;
