Bug #54963 Enhance the error message to reduce user confusion
Submitted: 2 Jul 2010 15:57 Modified: 22 Mar 2012 18:34
Reporter: Maitrayi Sabaratnam Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.1, all OS:Any
Assigned to: CPU Architecture:Any

[2 Jul 2010 15:57] Maitrayi Sabaratnam
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 ...
[5 Jul 2010 5:20] Sveta Smirnova
Thank you for the report.

Verified as described.
[22 Mar 2012 18:34] Paul DuBois
Noted in 5.6.5 changelog.

A confusing CREATE TABLE error message was improved.