本节描述 InnoDB 存储引擎的限制和约束。This section describes restrictions and limitations of the
InnoDB storage engine.
您不能创建一个列名与内部
InnoDB列名相同的表(包括DB_ROW_ID、DB_TRX_ID和DB_ROLL_PTR)。这个限制适用于任何字母大小写的名称使用。You cannot create a table with a column name that matches the name of an internalInnoDBcolumn (includingDB_ROW_ID,DB_TRX_ID, andDB_ROLL_PTR. This restriction applies to use of the names in any lettercase.mysql>
CREATE TABLE t1 (c1 INT, db_row_id INT) ENGINE=INNODB;ERROR 1166 (42000): Incorrect column name 'db_row_id'SHOW TABLE STATUS不会提供InnoDB表的准确统计信息,除非是表预留的物理大小。行数只是用于 SQL 优化的粗略估算。SHOW TABLE STATUSdoes not provide accurate statistics forInnoDBtables except for the physical size reserved by the table. The row count is only a rough estimate used in SQL optimization.InnoDBdoes not keep an internal count of rows in a table because concurrent transactions might “第 13.4.4 节,“几何体的正确性和有效性”” different numbers of rows at the same time. Consequently,SELECT COUNT(*)statements only count rows visible to the current transaction.InnoDBdoes not keep an internal count of rows in a table because concurrent transactions might “see” different numbers of rows at the same time. Consequently,SELECT COUNT(*)statements only count rows visible to the current transaction.有关
InnoDB如何处理SELECT COUNT(*)语句的信息,请参阅COUNT()在 第 14.19.1 节,“聚合函数描述” 中的描述。For information about howInnoDBprocessesSELECT COUNT(*)statements, refer to theCOUNT()description in Section 14.19.1, “Aggregate Function Descriptions”.ROW_FORMAT=COMPRESSED在页面大小大于 16KB 时不受支持。ROW_FORMAT=COMPRESSEDis unsupported for page sizes greater than 16KB.使用特定
InnoDB页面大小的 MySQL 实例(innodb_page_size)不能使用来自使用不同页面大小的实例的数据文件或日志文件。A MySQL instance using a particularInnoDBpage size (innodb_page_size) cannot use data files or log files from an instance that uses a different page size.有关使用可传输表空间功能导入表的限制,请参见表导入限制。For limitations associated with importing tables using the Transportable Tablespaces feature, see Table Import Limitations.
有关在线 DDL 的限制,请参见第 17.12.8 节,“在线 DDL 限制”。For limitations associated with online DDL, see Section 17.12.8, “Online DDL Limitations”.
有关通用表空间的限制,请参见通用表空间限制。For limitations associated with general tablespaces, see General Tablespace Limitations.
有关静态数据加密的限制,请参见加密限制。For limitations associated with data-at-rest encryption, see Encryption Limitations.