Row size too large
来源:互联网 发布:mac宽带连接鉴定失败 编辑:程序博客网 时间:2024/05/22 03:24
转自:http://www.2cto.com/database/201303/193422.html
更新text字段时出现Row size too large报错
起因:
团购开发报告说更新时出错。
www.2cto.com
更新SQL如下:
UPDATE table_name d SET d.column_name='aaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
WHERE d.ID=100976;
报错信息如下:
Error Code : 1118
Row size too large. The maximum row size for the used table type,
not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
疑惑:
更新字段只涉及 column_name字段,且该字段是TEXT类型。
www.2cto.com
个人之前理解是:
TEXT的内容在 Dynamic的table format下是存在off-page中的,不会
占用row size的计算。
占用row size的计算。
Barracuda 对应row_format ( dynamic, compress) ,其中dynamic下text
的所有内容都是off-page存放的
的所有内容都是off-page存放的
Antelope 对应row_format (compact, redundant),其中compact下的text
是存786B在row中,超过部分存在off-page
是存786B在row中,超过部分存在off-page
而服务器配置是 innodb_file_format = Barracuda
照理说所有table用的都是 dynamic 结构。
但是! 原因如下,摘自文档:
To preserve compatibility with those prior versions, tables created with
the InnoDB Plugin use the prefix format, unless one of ROW_FORMAT
=DYNAMIC or ROW_FORMAT=COMPRESSED is specified (or implied)
on the CREATE TABLE command.
the InnoDB Plugin use the prefix format, unless one of ROW_FORMAT
=DYNAMIC or ROW_FORMAT=COMPRESSED is specified (or implied)
on the CREATE TABLE command.
也就是说,建表时不显示指定 row_format = dynamic ,即使 innodb_file
_format = Barracuda 表的row-format还是 compact
_format = Barracuda 表的row-format还是 compact
所以总结为一句话就是:如果某个表的text字段很多建议建表时加上
row_format = dynamic
row_format = dynamic
0 0
- Row size too large
- Row size too large (> 8126)
- MySql “Row size too large (> 8126)”
- Mysql MySQLSyntaxErrorException Row size too large
- Mysql Row size too large (> 8126)
- [MySQL]Row size too large错误
- mysql 1118 Row size too large 错误
- MySql 5.6异常处理: Row size too large (> 8126)
- MySql “Row size too large (> 8126)” 亲测解决
- Mysql 出现Error 1118 Row size too large. The maximum row size is 65535 的解决办法
- ERROR 1118 : Row size too large. The maximum row size for the used table type
- [MySQL 错误]ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not
- ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting B
- [MySQL 错误]ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not
- ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting B
- ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting B
- 更新text字段时出现 Row size too large 报错
- 更新text字段时出现 Row size too large 报错
- centos7.0 安装初始化
- linux 6.4(64位)系统vsftpd、ftp服务安装操作处理方法
- Appium 并发和主从远程控制
- 台式机插上耳机,声音仍然外放问题解决
- Android 仿网易一元夺宝客户端下拉加载动画实现(一)
- Row size too large
- Swift 算法实战之路
- JS里用来表示时间和日期——Date
- html表单
- 刷新序号公共方法 公司内部用
- 聚媚儿:开心一刻
- 查询数据库中的表建个进度条
- [第二章]shiro身份验证
- maven 整理