Bug #36553 disk table size of MySQL Cluster is strange
Submitted: 7 May 2008 9:15 Modified: 19 May 2008 12:14
Reporter: ws lee Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.1.23 / 5.1.24 OS:Solaris (5.10)
Assigned to: CPU Architecture:Any

[7 May 2008 9:15] ws lee
Description:
create table t1(
...
...
a text,
) engine=ndb default charset=utf8

create table t2(
...
...
a text
) tablespace ts storage disk engine=ndb default charset=utf8

table descriptin of t1 and t2 is same perfectly.
only, t2 has ndb with disk table option.
data record are 400000.

t1 size is 178M
t2 size is 180M
difference of size  is 4M.
disk table use many memory, too.
this result say that I don't neet to disk table.
but, i want to use disk table for memory saving.

i think that text column's memory leak in disk table is not fixed.

How to repeat:
mysql 5.1.23 and new version mysql 5.1.24 is same result.
[12 May 2008 19:34] Sveta Smirnova
Thank you for the report.

According to http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-disk-data-storage-requirements.html "In a Disk Data table, the first 256 bytes of a TEXT or BLOB column are stored in memory; only the remainder is stored on disk."

Please check output of SELECT BIT_LENGTH(a) FROM t2 to check if you hit this case.
[19 May 2008 6:14] ws lee
thanks Sveta Smirnova.

>"In a Disk Data table, the first 256 bytes of a TEXT or BLOB column are
>stored in memory; only the remainder is stored on disk."

Why stored the first 256 bytes of a TEXT in memory although Disk Data table?
Because of this restrictions, if the Table has text column, disk Table func is good-for-nothing.
[19 May 2008 12:14] Sveta Smirnova
Lee, thank you for the feedback.

This is done due to BLOB implementation: there are technical limitations for this data type. So I close report as "Not a Bug" assuming you are experiencing this very problem.