Bug #12394 delete from, error 4607 'There may only be one operation in a scan transaction'
Submitted: 5 Aug 2005 9:54 Modified: 11 Aug 2005 13:34
Reporter: Martin Skold Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.0 OS:Linux (Linux RH9)
Assigned to: CPU Architecture:Any

[5 Aug 2005 9:54] Martin Skold
Description:
Get:
'delete from t2' failed: 1296: Got error 4607 'There may only be one operation in a scan transaction' from ndbcluster
A repeated:
delete from t2; works

How to repeat:
CREATE TABLE t1 (
	PK int NOT NULL PRIMARY KEY,
	A int,
	INDEX I1(A)
) engine=ndbcluster;

CREATE TABLE t2 (
	PK int NOT NULL PRIMARY KEY,
	B int,
	INDEX I2(B)
) engine=ndbcluster;

delimiter |;

create procedure populate_t1(x int)
begin
  while x > 0 do
    set x = x-1;
    insert into test.t1 values (x, x);
  end while;
end; |

create procedure populate_t2(x int)
begin
  while x > 0 do
    set x = x-1;
    insert into test.t2 values (x, x);
  end while;
end; |

delimiter ;|

call populate_t1(10);
call populate_t2(5);

select t1.pk from t1 use index (I1), t2 use index (I2) where t1.A = t2.B;

delete from t1;
delete from t2;
[11 Aug 2005 13:34] Martin Skold
Can't reproduce this anymore (could have been bugs in SPs fixed,
since it was not repeatable in 4.1 where tables were not populated
through SPs)