MySQL:错误代码:1118行大小太大(> 8126).将某些列更改为TEXT或BLOB [英] MySQL: Error Code: 1118 Row size too large (> 8126). Changing some columns to TEXT or BLOB
问题描述
我要创建一个 325 列的表:
CREATE TABLE NAMESCHEMA.NAMETABLE
(
ROW_ID TEXT NOT NULL , //this is the primary key
324 column of these types:
CHAR(1),
DATE,
DECIMAL(10,0),
DECIMAL(10,7),
TEXT,
LONG,
) ROW_FORMAT=COMPRESSED;
我用TEXT替换了所有VARCHAR,并且在MySQL的my.ini文件中添加了梭子鱼,这是添加的属性:
I replaced all the VARCHAR with the TEXT and i have added Barracuda in the my.ini file of MySQL, this is the attributes added:
innodb_file_per_table=1
innodb_file_format=Barracuda
innodb_file_format_check = ON
但我仍然有此错误:
Error Code: 1118
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.
我无法更改数据库的结构,因为它是旧版应用程序/系统/数据库.创建新表是对旧数据库的导出.
I can't change the structure of the database because it's legacy application/system/database. The create of a new table, it's an export of the legacy database.
我写的这个问题与其他问题类似,但是里面有一些我可以在互联网上找到的解决方案,例如VARCHAR和Barracuda,但是我仍然有这个问题,所以我决定打开一个新问题,里面已经是经典答案了看别人是否还有其他答案
i wrote this question that is similar to others but inside there are some solution that i found on internet like VARCHAR and Barracuda, but i still have that problem so i decided to open a new question with already the classic answer inside for seeing if someone have other answers
推荐答案
由于MySQL Server 5.6.20中的更改,最近我遇到了相同的错误代码. 我可以通过更改my.ini文本文件中的innodb_log_file_size来解决该问题.
I struggled with the same error code recently, due to a change in MySQL Server 5.6.20. I was able to solve the problem by changing the innodb_log_file_size in the my.ini text file.
在发行说明中,解释了innodb_log_file_size太小将触发行大小太大错误".
In the release notes, it is explained that a innodb_log_file_size which is too small will trigger a "Row size too large error."
http://dev.mysql.com/doc /relnotes/mysql/5.6/en/news-5-6-20.html
这篇关于MySQL:错误代码:1118行大小太大(> 8126).将某些列更改为TEXT或BLOB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!