Bug #54963 Enhance the error message to reduce user confusion
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 ...
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.052 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
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 ...