Bug #5682 Return error if in CREATE TABLE INNODB row length is always > 8000 bytes
Submitted: 21 Sep 2004 14:25 Modified: 18 Jun 2010 3:14
Reporter: Heikki Tuuri Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S4 (Feature request)
Version:all OS:Any (all)
Assigned to: Marko Mäkelä CPU Architecture:Any

[21 Sep 2004 14:25] Heikki Tuuri
Description:
Hi!

If one tries to create an InnoDB table where the MINIMUM row length is > 8000 bytes, it would be better to return an error in CREATE TABLE, rather than returning a table handler error 139 (row too long) when we start to insert the first row to the table.

Best regards,

Heikki

How to repeat:
Set the default charset to UTF-8.

mysql> CREATE TABLE address (f1 char(255),f2 char(255),f3 char(255),f4 char(255),f5 char(255),f6 char(255),f7 char(255),f8 char(255),f9 char(255),f10 char(255),f11 char(255)) TYPE=InnoDB;
Query OK, 0 rows affected (0.00 sec)

mysql> INSERT INTO address VALUES ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11");
ERROR 1030 (HY000): Got error 139 from storage engine
[17 Feb 2005 16:12] Marko Mäkelä
This patch makes CREATE TABLE return with error if the combined minimum size of user columns exceeds the maximum size of a record.

The patch also fixes the storage format of UTF-8 CHAR(n) columns in ROW_FORMAT=COMPACT (the new record format in MySQL/InnoDB 5.0.3), so that if CREATE TABLE succeeds on a table containing UTF-8 CHAR columns, you will be able to insert data of them. (Previously, UTF-8 CHAR columns were essentially stored as VARCHAR, but always of length 3*n bytes. Now the length will be n..3*n bytes.)
[17 Feb 2005 22:43] Marko Mäkelä
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

The fix will be included in MySQL/InnoDB 5.0.3.
[5 May 2010 15:11] Bugs System
Pushed into 5.1.47 (revid:joro@sun.com-20100505145753-ivlt4hclbrjy8eye) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[6 May 2010 1:24] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug. Re-closing.
[28 May 2010 6:01] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100524190136-egaq7e8zgkwb9aqi) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (pib:16)
[28 May 2010 6:30] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100524190941-nuudpx60if25wsvx) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[28 May 2010 6:58] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100524185725-c8k5q7v60i5nix3t) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[29 May 2010 23:24] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[15 Jun 2010 8:13] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100615080459-smuswd9ooeywcxuc) (version source revid:mmakela@bk-internal.mysql.com-20100415070122-1nxji8ym4mao13ao) (merge vers: 5.1.47) (pib:16)
[15 Jun 2010 8:29] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100615080558-cw01bzdqr1bdmmec) (version source revid:mmakela@bk-internal.mysql.com-20100415070122-1nxji8ym4mao13ao) (pib:16)
[17 Jun 2010 12:05] Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:martin.skold@mysql.com-20100617114014-bva0dy24yyd67697) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 12:49] Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 13:32] Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:martin.skold@mysql.com-20100617114611-61aqbb52j752y116) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)