zoukankan      html  css  js  c++  java
  • mysql之Row size too large (> 8126)问题解决方案

    mysql之Row size too large (> 8126)问题解决方案

    问题描述:

    项目中涉及文本存储(mysql数据库中设置为text),如果要存储的数据过大,项目中报错如下:

    ### Error updating database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
    ### The error may exist in file [E:fjt2020workspaceSWAP_background_service	argetclassesmybatismapperequipment_manageHistoryMapping.xml]
    ### The error may involve com.liansheng.swap.mapper.equipment_manage.HistoryMapper.update-Inline
    ### The error occurred while setting parameters
    ### SQL: update swap_variable_history          SET hour01 = ?          WHERE deptid = ?  and variableid = ? and collectorid = ?
    ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.

    解决方案:

    1.设置mysql全局变量
    设置命令:SET GLOBAL innodb_file_format='Barracuda';
    检查命令:show GLOBAL VARIABLES LIKE '%file_format%';
    2.设置对应表的属性(行格式) alter table 表名 ROW_FORMAT=COMPRESSED

    参考文章:https://blog.csdn.net/fallcreek/article/details/49495915

           http://blog.sina.com.cn/s/blog_8e9cceee0101k65j.html

  • 相关阅读:
    TensorFlow object detection API
    bounding box的简单理解
    OverFeat学习
    tensorflow调试tfdbg
    2018.7-2019.4记录
    人工智能未来读后感 ----by RayKurzweil
    matlab exe
    神经网络的基础
    研究生的论文
    卷积神经网络经验
  • 原文地址:https://www.cnblogs.com/fujingtao5470/p/12671198.html
Copyright © 2011-2022 走看看