Since UTF-8 uses 3 bytes per characters, you may not have allocated enough for character fields.
By default, an index key for a single-column index can be up to 767
bytes. The same length limit applies to any index key prefix. See
Section 13.1.13, “CREATE INDEX Syntax”. For example, you might hit
this limit with a column prefix index of more than 255 characters on a
TEXT or VARCHAR column, assuming a UTF-8 character set and the maximum
of 3 bytes for each character. When the innodb_large_prefix
configuration option is enabled, this length limit is raised to 3072
bytes, for InnoDB tables that use the DYNAMIC and COMPRESSED row
formats.
When you attempt to specify an index prefix length longer than
allowed, the length is silently reduced to the maximum length. This
configuration option changes the error handling for some combinations
of row format and prefix length longer than the maximum allowed. See
innodb_large_prefix for details.
The InnoDB internal maximum key length is 3500 bytes, but MySQL itself
restricts this to 3072 bytes. This limit applies to the length of the
combined index key in a multi-column index.
The maximum row length, except for variable-length columns (VARBINARY,
VARCHAR, BLOB and TEXT), is slightly less than half of a database
page. That is, the maximum row length is about 8000 bytes. LONGBLOB
and LONGTEXT columns must be less than 4GB, and the total row length,
including BLOB and TEXT columns, must be less than 4GB.
If a row is less than half a page long, all of it is stored locally
within the page. If it exceeds half a page, variable-length columns
are chosen for external off-page storage until the row fits within
half a page, as described in Section 14.3.12.2, “File Space
Management”.
Although InnoDB supports row sizes larger than 65,535 bytes
internally, MySQL itself imposes a row-size limit of 65,535 for the
combined size of all columns:
mysql> CREATE TABLE t (a VARCHAR(8000), b VARCHAR(10000),
-> c VARCHAR(10000), d VARCHAR(10000), e VARCHAR(10000),
-> f VARCHAR(10000), g VARCHAR(10000)) ENGINE=InnoDB; ERROR 1118 (42000): Row size too large. The maximum row size for the used table
type, not counting BLOBs, is 65535. You have to change some columns to
TEXT or BLOBs See Section E.10.4, “Table Column-Count and Row-Size
Limits”.
Best Answer
It is also stored the length of the data, that is why it is 9 - 12 , if you want it exactly.
https://github.com/jeremycole/mysql/blob/master/storage/innobase/include/btr0cur.h#L762