更新表添加新字段报错:
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).
阅读(3265) | 评论(0) | 转发(0) |