Bug #61665 --print-data cannot handle blob/text at all (not truncating to 256 bytes)
Submitted: 28 Jun 2011 1:48
Reporter: Mikiya Okuno Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version: OS:Any
Assigned to:
Triage: Triaged: D4 (Minor) / R2 (Low) / E6 (Needs Assessment)

[28 Jun 2011 1:48] Mikiya Okuno
Description:
When a table contains only a blob/text, then --print-data prints like below:

_____________________________________________________
Processing data in table: test/def/t1(7) fragment 1
3:***error***	1

How to repeat:
1. create a table and populate it.

mysql> create table t1 (a text) engine ndb;
mysql> insert into t1 values('test');

2. take a backup

ndb_mgm> start backup

3. print the data

shell> ndb_restore -n 2 -b 12 --print-data --print-log path/to/backup

Then, it causes the output like below:

Nodeid = 2
Backup Id = 12
backup path = data2/data/BACKUP/BACKUP-12
Including tables: test.t1 
Opening file 'data2/data/BACKUP/BACKUP-12/BACKUP-12.2.ctl'
File size 9968 bytes
Backup version in files: ndb-6.3.11 ndb version: mysql-5.1.51 ndb-7.1.10
Stop GCP of Backup: 50
Opening file 'data2/data/BACKUP/BACKUP-12/BACKUP-12-0.2.Data'
File size 229376 bytes
_____________________________________________________
Processing data in table: sys/def/NDB$EVENTS_0(3) fragment 1
_____________________________________________________
Processing data in table: mysql/def/NDB$BLOB_4_3(5) fragment 1
_____________________________________________________
Processing data in table: sys/def/SYSTAB_0(2) fragment 1
_____________________________________________________
Processing data in table: mysql/def/ndb_schema(4) fragment 1
_____________________________________________________
Processing data in table: mysql/def/ndb_apply_status(6) fragment 1
_____________________________________________________
Processing data in table: test/def/t1(7) fragment 1
3:***error***	1
_____________________________________________________
Processing data in table: test/def/NDB$BLOB_7_0(8) fragment 1
Opening file 'data2/data/BACKUP/BACKUP-12/BACKUP-12.2.log'
File size 52 bytes
Printed 1 tuples and 0 log entries to stdout.

NDBT_ProgramExit: 0 - OK

Suggested fix:
Shouldn't it print the 256 bytes prefixes instead of error?