Skip to content

Instantly share code, notes, and snippets.

@tonykwon
Created February 10, 2014 04:13
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save tonykwon/8910261 to your computer and use it in GitHub Desktop.
Save tonykwon/8910261 to your computer and use it in GitHub Desktop.
MySQL - Row size too large - BLOB prefix of 768 bytes is stored inline
-- Error Message: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
--
-- our table name that has this issue is XYZ
--
SET GLOBAL innodb_file_format=Barracuda;
SET GLOBAL innodb_file_per_table=ON;
ALTER TABLE XYZ ROW_FORMAT=COMPRESSED;
@anbwar
Copy link

anbwar commented Oct 24, 2016

Thank you man for your help

@ProjectCV
Copy link

Thank you man, you saved my day. You are awsome

@nithinbasavarajappa
Copy link

thanks ...it works fine.....

@cutyk5kg
Copy link

cutyk5kg commented Dec 2, 2022

If mysql version is below 5.7, you can only fix the error from the above method
The above problem will be fixed automatically by mysql version 5.7 and above
I hope this helps someone

@sumonst21
Copy link

I recently tried similar, 62 columns with Varchar 255 in InnoDB, I resolved it by using reasionable length for each column instead of the 255.

I used the largest value from all rows and 2x the size and compared if that exceeds the 255 so I would use TEXT, rether than varchar 255. the trick did it. :)

hope it will help someone, rather then altering default settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment