无法添加字段...行大小...大于最大允许大小 [英] Cannot add field...row size...greater than maximum allowed size
问题描述
我在MySQL日志中看到以下错误:
I'm seeing the following error in my MySQL logs:
[Warning] InnoDB: Cannot add field `wd_field_ft_95_240` in table `tmp`.`#sql_1_0` because after adding it, the row size is 8155 which is greater than maximum allowed size (8126) for a record on index leaf page.
此tmp
数据库是某种内部MySQL结构吗?这是我需要关心的吗?
Is this tmp
database some kind of internal MySQL structure? Is this something I need to care about?
推荐答案
Some MySQL queries create internal temporary tables to hold partial results.
从MySQL 5.7.6开始,内部临时表的默认存储引擎是InnoDB,如您所见,它对行大小的限制非常小(尽管BLOB/TEXT列可以超过该限制).
As of MySQL 5.7.6, the default storage engine for internal temporary tables is InnoDB, which has a pretty small limit on row size, as you can see (though BLOB/TEXT columns can go beyond that limit).
对于内部临时表,您可以返回旧的5.7之前的默认存储引擎:
You can go back to the old pre-5.7 default storage engine for internal temporary tables:
internal_tmp_disk_storage_engine=MyISAM
这是此错误中提到的解决方法:"错误#77398行大小太大mysql 5.7查询"
This is the workaround mentioned in this bug: "Bug #77398 row size too large in mysql 5.7 query"
这篇关于无法添加字段...行大小...大于最大允许大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!