MySQL:错误代码:1118 行大小太大(> 8126).将某些列更改为 TEXT 或 BLOB

MySQL: Error Code: 1118 Row size too large (gt; 8126). Changing some columns to TEXT or BLOB(MySQL:错误代码:1118 行大小太大( 8126).将某些列更改为 TEXT 或 BLOB)
本文介绍了MySQL:错误代码:1118 行大小太大(> 8126).将某些列更改为 TEXT 或 BLOB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个325列的表格:

I want to create a table of 325 column:

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文件中添加了Barracuda,这是添加的属性:

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 会触发Row size too large 错误".

In the release notes, it is explained that an innodb_log_file_size that 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Execute complex raw SQL query in EF6(在EF6中执行复杂的原始SQL查询)
Hibernate reactive No Vert.x context active in aws rds(AWS RDS中的休眠反应性非Vert.x上下文处于活动状态)
Bulk insert with mysql2 and NodeJs throws 500(使用mysql2和NodeJS的大容量插入抛出500)
Flask + PyMySQL giving error no attribute #39;settimeout#39;(FlASK+PyMySQL给出错误,没有属性#39;setTimeout#39;)
auto_increment column for a group of rows?(一组行的AUTO_INCREMENT列?)
Sort by ID DESC(按ID代码排序)