【bug】 1118 Row size too large
1118 Row size too large
Every table (regardless of storage engine) has a maximum row size of 65,535 bytes.
Storage engines may place additional constraints on this limit, reducing the effective maximum row size.
innodb_version : 5.5.56
Like other InnoDB tables it has all the InnoDB limitations, i.e.,
InnoDB row or column limits. If it exceeds these, it will return “Row size too large” or “Too many columns” errors.
The workaround is to set internal_tmp_disk_storage_engine to MYISAM.
提供3种解决途径 (根据需要选其一即可),我采用的是第3种方法
1.innodb_log_file_size innodb_log_file_size = 500M innodb_strict_mode = 0
2.storage_engine = MyISAM
3.innodb_file_per_table=ON innodb_file_format = Barracuda internal_tmp_disk_storage_engine=MyISAM
- 按照第3种方法修改配置文件
- 修改全局变量 set global innodb_file_format = 'Barracuda'
- 修改表文件存储方式 alter table table_name ENgine = 'innodb' ROW_FORMAT = COMPRESSED KEY_BLOCK_SIZE=8 ;
- 完成
下面是一些调试语句,可以选择性使用
innodb_log_file_size = 5120M (5242880)
innodb_strict_mode = off
innodb_file_per_table = ON
show variables like "%format%";
innodb_file_format Barracuda
innodb_file_format_max Barracuda
show table status like '%table_name%';
row_format compact
alter table table_name ENgine = 'innodb' ROW_FORMAT = COMPRESSED KEY_BLOCK_SIZE=8 ;
show table status like '%table_name%';
row_format compressed
fixed-length dynamic-length compress
InnoDB Plugin引入了新的文件格式(file format,可以理解为新的页格式),
对于以前支持的Compact和Redundant格式将其称为Antelope文件格式,
新的文件格式称为Barracuda。Barracuda文件格式下拥有两种新的行记录格式Compressed和Dynamic两种。
新的两种格式对于存放BLOB的数据采用了完全的行溢出的方式,在数据页中只存放20个字节的指针,实际的数据都存放在BLOB Page中,
而之前的Compact和Redundant两种格式会存放768个前缀字节。
Compressed行记录格式的另一个功能就是,存储在其中的行数据会以zlib的算法进行压缩,
因此对于BLOB、TEXT、VARCHAR这类大长度类型的数据能进行非常有效的存储。
提供另外2中思路
- 分表,把复杂的字段提取出来单独存放
- 能否从代码层面规避这种问题,通过代码优化实现
【bug】 1118 Row size too large的更多相关文章
- mysql触发器应用和创建表错误代码: 1118 Row size too large. 解决
1.针对数据库查询问题的方便,可以建立重要表的log备份记录表,在主表的添加,修改,删除添加触发器,修改触发器增加触发字段的点,限制条件. 数据库log表查问题比从线上多台服务器上下载日志文件相对方便 ...
- Mysql [Err] 1118 - Row size too large
首先声明,对MySQL不懂,很多都不知道原因 设计了一个表,里面很多text字段,然后填进去的东西太多(用的是Python的MySQLdb),报错: _mysql_exceptions.Operati ...
- Mysql [Err] 1118 - Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535.
对于越来越多的数据,数据库的容量越来越大,压缩也就越来越常见了.在我的实际工作中进行过多次压缩工作,也遇到多次问题,在此和大家分享一下. 首先,我们先说说怎么使用innodb的压缩. 第一,mysql ...
- [ERR] 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.
昨天,在测试新的数据库时,迁移表遇到了这个问题.现在记录一下解决方案. 1.在配置文件中添加关闭严格模式的配置:sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS ...
- Mysql_大字段问题Row size too large.....not counting BLOBs, is 8126.
[问题描述] 1.从myslq(5.7.19-0ubuntu0.16.04.1)中导出sql脚本,导入到mysql(5.5.27)中,报如下错误:Row size too large. The max ...
- mysql 报Row size too large 65535 原因与解决方法
报错信息:Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535 ...
- 【BUG】12小时制和24小时制获取当天零点问题
[BUG]12小时制和24小时制获取当天零点问题 最近在写定时服务的时候,要获取当天的零点这个时间,但是是这样获取的 DateTime dt = DateTime.Parse(DateTime.Now ...
- 【概率论】6-1:大样本介绍(Large Random Samples Introduction)
title: [概率论]6-1:大样本介绍(Large Random Samples Introduction) categories: - Mathematic - Probability keyw ...
- MySQLSyntaxErrorException: Row size too large 转摘自:https://confluence.atlassian.com/display/CONFKB/MySQLSyntaxErrorException%3A+Row+size+too+large
Symptoms The following appears in the atlassian-confluence.log: Caused by: com.mysql.jdbc.exceptions ...
随机推荐
- mvn从下载安装到纯命令行创建第一个mvn程序(编码,编译,测试,安装,打包)全过程细致分解
1.maven的下载和安装: a.maven的下载注意事项:如果你是windows,请选择①号,如果你是linux,请选择②号,下载地址:http://maven.apache.org/downloa ...
- linux安装odbc for mysql
1 安装驱动包 yum install unixODBC-devel -y yum install -y mysql-connector-odbc 2 配置数据源 [root@omserver-11 ...
- TYVJ 2032 搜索
P2032 「Poetize9」升降梯上 描述 开启了升降梯的动力之后,探险队员们进入了升降梯运行的那条竖直的隧道,映入眼帘的是一条直通塔顶的轨道.一辆停在轨道底部的电梯.和电梯内一杆控制电梯升降的巨 ...
- JSDOM获取子节点的一些方法
一般情况获取子节点,通过找到查找父节点的ID或者class类名,来获取父节点,再通过children属性,得到子节点的数组: 之前在另外一篇随笔中说过,如果使用另一个属性childNode,会把注释. ...
- awk一些简单命令
最简单地说, AWK 是一种用于处理文本的编程语言工具.AWK 在很多方面类似于 shell 编程语言,尽管 AWK 具有完全属于其本身的语法. 尽管操作可能会很复杂,但命令的语法始终是: awk ' ...
- ReactiveCocoa 响应式函数编程
简介 ReactiveCocoa(简称为RAC),RAC具有函数响应式编程特性,由Matt Diephouse开源的一个应用于iOS和OS X的新框架. 为什么使用RAC? 因为RAC具有高聚合低耦合 ...
- Android Studio项目上传到GitHub
首先,在github上创建仓库:选择Repositories,点击右边的“New”,输入仓库名称,点击“create repositories”. studio的git配置: 安装好git后启动And ...
- [翻译] API测试的最佳实践 - 介绍
API测试的最佳实践 - 介绍 在上一篇“是什么让API测试很叼”一文中,我们讨论API与其他形式的软件测试的差异.部分是因为API之间的通信压根就没考虑让你能读懂,纯粹是为了方便计算机之间的交互而设 ...
- React学习实例总结,包含yeoman安装、webpack构建
1.安装yeoman 在安装nodeJs的基础上,输入命令:npm install -g yo grunt-cli bower,安装yeoman,grunt,bowerify 安装完成后,输入命令:y ...
- debug1: expecting SSH2_MSG_KEX_ECDH_REPLY解决
设置mtu ifconfig en1 mtu 1200 代理工具 退出lantern,退出shadowsocks