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的更多相关文章

  1. mysql触发器应用和创建表错误代码: 1118 Row size too large. 解决

    1.针对数据库查询问题的方便,可以建立重要表的log备份记录表,在主表的添加,修改,删除添加触发器,修改触发器增加触发字段的点,限制条件. 数据库log表查问题比从线上多台服务器上下载日志文件相对方便 ...

  2. Mysql [Err] 1118 - Row size too large

    首先声明,对MySQL不懂,很多都不知道原因 设计了一个表,里面很多text字段,然后填进去的东西太多(用的是Python的MySQLdb),报错: _mysql_exceptions.Operati ...

  3. Mysql [Err] 1118 - Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535.

    对于越来越多的数据,数据库的容量越来越大,压缩也就越来越常见了.在我的实际工作中进行过多次压缩工作,也遇到多次问题,在此和大家分享一下. 首先,我们先说说怎么使用innodb的压缩. 第一,mysql ...

  4. [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 ...

  5. 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 ...

  6. mysql 报Row size too large 65535 原因与解决方法

    报错信息:Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535 ...

  7. 【BUG】12小时制和24小时制获取当天零点问题

    [BUG]12小时制和24小时制获取当天零点问题 最近在写定时服务的时候,要获取当天的零点这个时间,但是是这样获取的 DateTime dt = DateTime.Parse(DateTime.Now ...

  8. 【概率论】6-1:大样本介绍(Large Random Samples Introduction)

    title: [概率论]6-1:大样本介绍(Large Random Samples Introduction) categories: - Mathematic - Probability keyw ...

  9. 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 ...

随机推荐

  1. 关于 js中的arguments 对象

    arguments对象包含了函数运行时的所有参数,arguments[0]就是第一个参数,arguments[1]就是第二个参数,以此类推.这个对象只有在函数体内部,才可以使用. var f = fu ...

  2. win10子系统linux编译ffmpeg

    android-ndk-r14b(linux版) ffmpeg-4.0 开启win10子系统(控制面板->程序和功能->启用或关闭Windows功能 然后在 适用与 Linux 的 Win ...

  3. C# 面向对象之继承

    Object是所有类的基类 1.在C#中一个类可以继承另一个类(密封类除外,静态类是密封的不能被继承); 2.被继承的类被成为基类(父类);继承的类被成为派生类(子类); 3.子类将获得父类除构造函数 ...

  4. [HDU1595] find the longest of the shortest

    题目链接: 点我 题意: 给定一个\(n\)个点,\(m\)条边的带权无向图,起点为\(1\),终点为\(n\),现在可以删去其中的一条边,求一种删边方案使得剩下图的最短路值最大,输出这个最短路的长度 ...

  5. Codeforces Round #402 (Div. 2) A

    Description In Berland each high school student is characterized by academic performance — integer v ...

  6. 定时任务-ScheduledExecutorService

    创建定时任务线程池的方式 ScheduledExecutorService executorService = Executors.newScheduledThreadPool(4);// 不推荐// ...

  7. Spring Cloud Gateway VS Zuul 比较,怎么选择?

    Spring Cloud Gateway 是 Spring Cloud Finchley 版推出来的新组件,用来代替服务网关:Zuul. 那 Spring Cloud Gateway 和 Zuul 都 ...

  8. uvm_misc——杂货铺(miscellaneous)

    uvm_misc 是个很有意思的文件夹,本质上就是个UVM的杂货铺,包含一些很重要的class, task, function, 但不知道给归类到哪儿,所以,uvm_misc就很好地承担了这个任务,几 ...

  9. (转)RAM、ROM、SRAM、DRAM、SSRAM、SDRAM、FLASH、EEPROM的区别

    RAM(Random Access Memory) 随机存储器.存储单元的内容可按需随意取出或存入,且存取的速度与存储单元的位置无关的存储器.这种存储器在断电时将丢失其存储内容,故主要用于存储短时间使 ...

  10. 大数据freestyle: 共享单车轨迹数据助力城市合理规划自行车道

    编者按:近年来,异军突起的共享单车极大地解决了人们共同面临的“最后一公里”难题,然而,共享单车发展迅猛,自行车道建设却始终没有能够跟上脚步.幸运的是摩拜单车大量的轨迹数据为我们提供了一种新的思路:利用 ...