Bug #16693 ndb_delete_all runs out of memory on tables containing a BLOB field
Submitted: 21 Jan 2006 3:15 Modified: 23 Feb 2006 10:44
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.0 OS:Linux (linux)
Assigned to: Pekka Nousiainen CPU Architecture:Any

[21 Jan 2006 3:15] Hartmut Holzgraefe
ndb_delete_all runs out of memory on tables containing a BLOB field
if there are more than just a few rows in the table. 

How to repeat:
ulimit -v 500000 # limit memory usage to prevent swapping
mysql -u root -e "CREATE TABLE n_delete(i INT PRIMARY KEY, b BLOB) ENGINE=ndb;" test
for a in `seq 1000` 
  mysql -u root -e "INSERT INTO n_delete SET i=$a, b=md5(rand());" test
ndb_delete_all -d test n_delete # this runs out of memory and crashes
mysql -u root -e "ALTER TABLE n_delete MODIFY b CHAR(100);" test # use CHAR insteat of BLOB
ndb_delete_all -d test n_delete # now this works like a charm
[21 Jan 2006 12:17] Hartmut Holzgraefe
with MySQL 4.1 ndb_delete_all runs into a loop emittng

  ERROR: 266 Time-out in NDB, probably caused by deadlock
             Status: Temporary error, Classification: Timeout expired
             File: delete_all.cpp (Line: 163)

when trying to truncate a cluster table containing a BLOB instead
of running out of memory
[5 Feb 2006 21:13] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

[14 Feb 2006 8:48] Jon Stephens
Need 3-part version number so I know in which changelog the bugfix should be reported, please. Thanks!
[20 Feb 2006 14:28] Pekka Nousiainen
[23 Feb 2006 10:44] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at

Additional info:

Documented fix in 4.1.9, 5.0.19, and 5.1.6 changelogs. Closed.