14.8 InnoDB File-Format Management
14.8.1 Enabling File Formats
14.8.2 Verifying File Format Compatibility
14.8.3 Identifying the File Format in Use
14.8.4 Modifying the File Format
As InnoDB evolves, data file formats that are not compatible with prior versions of InnoDB are
sometimes required to support new features. To help manage compatibility in upgrade and
downgrade situations, and systems that run different versions of MySQL, InnoDB uses named file
formats. InnoDB currently supports two named file formats, Antelope and Barracuda.
InnoDB 的数据文件格式和以前的版本是不兼容的,因为有的时候需要支持新的特性。为了
应对升级时的兼容性问题及回滚的徐哟呵哦,InnoDB 可以使用文件格式在不同版本的
MySQL 里运行。目前 InnoDB 支持两种文件格式,Antelope and Barracuda。
Antelope is the original InnoDB file format, which previously did not have a name. It
supports COMPACT and REDUNDANT row formats for InnoDB tables and is the default file
format in MySQL 5.6 to ensure maximum compatibility with earlier MySQL versions that do
not support the Barracuda file format.
Antelope 是原始的 InnoDB 文件格式,支持 InnoDB 表 COMPACT and REDUNDANT 的行格
式,也是 MySQL5.6 默认的文件格式,用来确保和早期 MySQL 版本的兼容性问题。
Barracuda is the newest file format. It supports all InnoDB row formats including the newer
COMPRESSED and DYNAMIC row formats. The features associated with COMPRESSED and
DYNAMIC row formats include compressed tables, off-page storage for long column data,
and index key prefixes up to 3072 bytes (innodb_large_prefix). See Section 14.9, “InnoDB
Row Storage and Row Formats”.
Barracuda 是最新的文件格式,它支持所有的 InnoDB 行格式,包括新的 COMPRESSED and
DYNAMIC。新的特性有 COMPRESSED and DYNAMIC 行格式的压缩表,用户长列数据的
off-page 存储,还有索引前缀 key 可以达到 3072 bytes(innodb_large_prefix)。详见 Section
14.9, “InnoDB Row Storage and Row Formats”。
This section discusses enabling file formats for new InnoDB tables, verifying compatibility of
different file formats between MySQL releases, identifying the file format in use, and
downgrading the file format.
这部会告诉你如何为新的 InnoDB 表开始文件格式,验证不同 MySQL 版本之间文件格式的兼
容性,确认使用的文件格式,以及回退到原来的文件格式。
14.8.1 Enabling File Formats
The innodb_file_format configuration option defines the file format used when InnoDB tables are
created in file_per_table tablespaces.
innodb_file_format 配置参数定义了 InnoDB 创建 file_per_table 表空间时使用的文件格式。