MySQL: Error Code: 1118 Row size too large (gt; 8126). Changing some columns to TEXT or 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:MySQL:错误代码:1118 行大小太大(> 8126).将某些列更改为 TEXT 或 BLOB
基础教程推荐
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01