Description:
See the error msg in 'How to repeat' section.
'The maximum row size 8052' makes the user to think that this is the max limit for user data. Actually, 8052 includes user data + storage overhead.
The error message is returned from Unireg.cc,
static bool pack_header():
/* Save values in forminfo */
if (reclength > (ulong) file->max_record_length())
{
my_error(ER_TOO_BIG_ROWSIZE, MYF(0), (uint) file->max_record_length());
DBUG_RETURN(1);
}
It seems from document (eg. http://dev.mysql.com/doc/refman/5.1/en/storage-requirements.html), that, the overhead calculation used in unireg.cc is applicable for myisam.
And it has nothing to do with the ndb's storage calculation (which is slightly different).
How to repeat:
mysql> create table t_8052B(a integer primary key , b varchar(8046)) engine=ndb;
ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not
counting BLOBs, is 8052. You have to change some columns to TEXT or BLOBs
mysql> create table t_8052B(a integer primary key , b varchar(8044)) engine=ndb;
Query OK, 0 rows affected (0.43 sec)
Hmm.. could only create a record that is 8048B
Suggested fix:
Error message should be like this:
ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not
counting BLOBs, is 8052, INCLUDING STORAGE OVERHEAD, SEE THE MANUAL. You have to change some columns to TEXT or BLOBs.
Even better, it the error msg shows the calculated overhead xxx:
... INCLUDING STORAGE OVERHEAD <xxx>, SEE ...