【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 ...
随机推荐
- log4j和log4j2怎么动态加载配置文件
应用场景与问题 当项目在运行时,我们如果需要修改log4j 1.X或者log4j2的配置文件,一般来说我们是不能直接将项目停止运行再来修改文件重新部署的.于是就有这样一个问题:如何在不停止当前项目的运 ...
- JAVA 7新特性——在单个catch代码块中捕获多个异常,以及用升级版的类型检查重新抛出异常
在Java 7中,catch代码块得到了升级,用以在单个catch块中处理多个异常.如果你要捕获多个异常并且它们包含相似的代码,使用这一特性将会减少代码重复度.下面用一个例子来理解. Java 7之前 ...
- 基于http的软件仓库
这是企业中常用的方法 比如一台服务器准备好了,公司必然要安装一些应用 这时可以用这种方法批量安装应用 运行一条命令,服务器就会自己去连接软件仓库,去下载来安装. [root@webmaster htm ...
- 牛客练习赛42B(异或的性质)
传送门 b^ c >= b - c,这个结论应该记住,我还在这里证过…… 这个题就用到了这个结论,假如当前答案集合为S,和为a,异或和为b,当前答案为a+b了.这时又读入个c,该不该加进来?a ...
- 软件管理命令-- rpm
RPM(红帽软件包管理器) 安装软件 rpm -ivh filename.rpm 升级软件 rpm -Uvh filename.rpm 卸载软件 rpm -e filename.rpm -i 安装一个 ...
- Xenu使用随记
经试验发现,如果配置了host进行网站检测时,Xenu和浏览器一样,都需要配置了host之后,重新打开Xenu程序(浏览器),host的配置才能生效.
- 安卓新的联网方式 Volley的使用(2)
如果使用volley 获取 网络图片 最好还是用 Volley 提供的NetworkImageView类, 可以很轻松的 完成工作, 而且他可以设置缓存, lru 和 sd卡的缓存.一些都封装好了. ...
- php中socket的使用(重点参考)
一.开启socket phpinfo();查看是否开启了socket扩展,否则在php.ini中开启. 二.服务器端代码的写法 <?php error_reporting(E_ALL); set ...
- eureka集群环境搭建
一:集群环境搭建 第一步:我们新建两个注册中心工程一个叫eureka_register_service_master.另外一个叫eureka_register_service_backup eurek ...
- hdoj薛猫猫杯程序设计网络赛1003 球球大作战
思路: 二分,check函数不是很好写. 实现: 1. #include <bits/stdc++.h> using namespace std; typedef long long ll ...