Bug #9045 Lock wait timeout when using table with TEXT column
Submitted: 8 Mar 2005 10:09 Modified: 8 Mar 2005 10:37
Reporter: Magnus Blåudd Email Updates:
Status: Won't fix Impact on me:
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[8 Mar 2005 10:09] Magnus Blåudd
When performing an updating transaction on a table with TEXT column and selecting on the same table from another thread the error "Lock wait timeout exceeded is returned"(ndb error: 274  message: Time-out in NDB, probably caused by deadlock)

This can seem normal, but if the TEXT column is changed to a varchar(20), the same test works without this problem.

How to repeat:
Run the below test uing mysql-test-run:

-- source include/have_ndb.inc

drop table if exists t1, t5;

  pk int not null primary key,
  a1 int,
  b1 int not null,
  c1 varchar(20)
) ENGINE=ndb;
  pk int not null primary key,
  a5 int,
  b5 int not null,
  c5 TEXT 
) ENGINE=ndbcluster;

## NOTE! If the TEXT column is changed to varchar(20), test passes

insert into t1 value (1, 2, 3, 'First row');
insert into t5 value (1, 2, 3, '5 - First row');

connect (con1,localhost,root,,);
connection con1;
update t1 set a1=9 where pk=1;
update t5 set a5=9 where pk=1;
connect (con2,localhost,root,,);
connection con2;
use test;
select * from t1 order by pk desc;
# This is the failing query
select * from t5;
connection con1;
select * from t1 order by pk desc;
select * from t5;

drop table t1, t5;
[8 Mar 2005 10:37] Jonas Oreland
Hi magnus!

This bug is due to the impl. of blobs as "separate" rows.
(Text are impl. as blobs)

Since it's multiple rows, one can not read committed (i.e wo/ lock)

This can be fixed using sequence no's, but that's quite a big job.
[13 Mar 2014 13:33] Omer Barnir
This bug is not scheduled to be fixed at this time.