Chinaunix首页 | 论坛 | 博客
  • 博客访问: 163277
  • 博文数量: 34
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 317
  • 用 户 组: 普通用户
  • 注册时间: 2014-04-04 12:49
个人简介

专注于服务器开发技术

文章分类

全部博文(34)

文章存档

2015年(5)

2014年(29)

我的朋友

分类: Mysql/postgreSQL

2014-10-22 18:41:29

更新表添加新字段报错:
Error Code : 1118
Row size too large. The maximum row size for the used table type,
not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
添加语句:
alter table problem add column field81 text default null
疑惑:
file_format Baracudda对应row_format(dynamic,compressed), text列存储在off_page(disk_page 硬盘页面)
file_format Antelope对应row_format(compact,redundant),text列前768字节存储在row,其余部分存储在off-page(disk_page 硬盘页面)
服务器配置是 innodb_file_format = Barracuda,照理说所有table用的都是 dynamic 结构。
解决:
修改表定义,指定row_format=dynamic 或者compressed
原因:
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.
翻译:
为了操持兼容性,以innodb创建的表默认row_format为compact或redundant(除非显式指定ROW_FORMAT为dynamic或compressed).
阅读(3237) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~