innodb表最大列数限制

innodb 最大列数限制为1023,其中包含3个内部隐藏列,分别为:DB_ROW_ID(如果没有主键的情况), DB_TRX_ID事务id列,DB_ROLL_PTR回滚指针列。

但是分配给用户自己所能定义的列数目仅为1023-3*2=1017.

这是因为

37 /* Maximum number of user defined fields/columns. The reserved columns
38 are the ones InnoDB adds internally: DB_ROW_ID, DB_TRX_ID, DB_ROLL_PTR.
39 We need "* 2" because mlog_parse_index() creates a dummy table object
40 possibly, with some of the system columns in it, and then adds the 3
41 system columns (again) using dict_table_add_system_columns(). The problem
42 is that mlog_parse_index() cannot recognize the system columns by
43 just having n_fields, n_uniq and the lengths of the columns. */

欢迎加入MySQL 内核交流群:860945825

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值