https://blog.csdn.net/sun_ashe/article/details/52433812
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. */