Bug #27018 Partial blob write inside blob clobbers data after the write
Submitted: 9 Mar 2007 22:27 Modified: 10 Apr 2007 13:01
Reporter: Kristian Nielsen Email Updates:
Status: Closed Impact on me:
Category:MySQL Cluster: NDB API Severity:S3 (Non-critical)
Version:5.0.38, 5.1.17 OS:Any
Assigned to: Kristian Nielsen CPU Architecture:Any

[9 Mar 2007 22:27] Kristian Nielsen
Using NdbBlob::writeData() to write data in the middle of an existing blob
value (update) may overwrite some data after the end of the writeData().

The problem is that the code wrongly zero-pads the blob (or space-pads the
text field) up to the end of the part, overwriting existing data.

How to repeat:
I will commit a patch with attached test case added for testBlobs.

Suggested fix:
Will commit patch.
[9 Mar 2007 22:42] 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:


ChangeSet@1.2447, 2007-03-09 23:37:33+01:00, knielsen@ymer.(none) +2 -0
  BUG#27018: Partial blob write inside blob clobbers data after the write.
  When doing partial blob update with NdbBlob::writeData(), zero-padding
  after the write was wrongly done, causing part of the old blob value
  to be overwritten with zeros (or spaces for text field).
  Fixed by only padding when needed (when writing at end of the blob).
[12 Mar 2007 9:21] Kristian Nielsen
Pushed to mysql-5.0-ndb and mysql-5.1-new-ndb.
[7 Apr 2007 8:25] Tomas Ulin
5.0.40, 5.1.18, telco 6.2.1
[10 Apr 2007 13:01] 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 bug fix. More information about accessing the source trees is available at


Documented bugfix in 5.0.40, 5.1.18, and telco-6.2.1 changelogs.