Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.3.31
-
None
Description
some coloums‘ length of varchar is reduced from 200 to 20,run create table sql raises exception like 'ERROR 1118 (42000): Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.'.
while on the same instance and the same ddl sql, the difference is some coloums‘ length of varchar is 200 not reduced ,run create table sql success.
I except that the reduced varchar sql runs sucess as well as the not reduced.
I am trapped with the sitiuation
This comes about because of https://mariadb.com/kb/en/innodb-dynamic-row-format/#overflow-pages-with-the-dynamic-row-format
When the column was 200 (assuming to be at least utf8mb3 to exceed 255 bytes), it was in an overflow page and only consuming the 20 bytes pointer.
The 20 character, 60/80 bytes + length, won't go in the overflow page, but attempts to go inplace on the main page that exceeds the length.
Comes as odd that a smaller size needs more room, but that's just the way it was implemented sorry.
So options are:
You can experiment on an empty table to determine a right structure that fits the limit: