Forums

MySQL: Row size too large (> 8126) - Innodb Barracuda

Can Barracuda Compression be enabled for MySQL?

need to change the my.cnf.

innodb_file_per_table
innodb_file_format = Barracuda

ALTER the table to use ROW_FORMAT=COMPRESSED.

ALTER TABLE nombre_tabla
    ENGINE=InnoDB
    ROW_FORMAT=COMPRESSED 
    KEY_BLOCK_SIZE=8;

Unfortunately to do that we'd need to change the file format for the whole database instance (which you share with other people) to Barracuda. That might break things for other people, so it's not something we can easily do without some pretty serious testing.

Perhaps there's another way to achieve what you want? The subject you chose for this topic ("MySQL: Row size too large (> 8126)") suggests that you're hitting some kind of row size limit -- what are you trying to do, and what's the error you're getting?

After the insert I get this error:

ERROR 1118 (42000): 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.

The table has the id, the relational index to the main table, and 20 TEXT fields.
But the record size is < 12K I thought InnoDB files would support 64K and more with LONGTEXT and BLOB.

According to the documentation, this should have no impact re:security or data. Unless the Table has ROW_FORMAT and KEY_BLOCK_SIZE defined, they will be treated as normal.

innodb_file_per_table=1; innodb_file_format=Barracuda;

I'm going to try changing the fields to VARCHAR is see what happens...

The problem, as I understand it, is that we'd need to move over to Barracuda. Which would probably be OK but we'd really need to test it thoroughly.

What kind of fields are you currently using?

I first used LONGTEXT, and then switched to TEXT same problem. I also tried changing them to VARCHAR(1000) same issue.

If I combine the data from the last 4 or 5 fields into one and leave them blank it saves. which is just weird...because 20 fields shouldn't be close to the limit.

wait- so you are getting an error because you are trying to insert a single db row that is >8kb?

If you are trying to store files into your db- isn't this usually a bad idea? much longer access time etc.

Not that I've noticed.

That's really weird, a TEXT column should easily be able to store 8KB of data.

Yes I know...it appeasrs that it the number of text fields combined with the length....that why I was hoping to load barracuda.

Hello, Is there any news on enabling Barracuda compression for MySQL?

We do not have any plans to move over to Barracuda at the moment.