Innodb_large_prefix

mysql> alter table jlp.hibernate_sequences modify sequence_name varchar(255) CHARACTER SET  utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL ;

ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes


refman-5.6-en.pdf  page 1608

innodb_large_prefix

Prefixes, defined by the length attribute, can be up to 767 bytes long for InnoDB tables or 3072
bytes if the innodb_large_prefix option is enabled.


mysql> show variables like 'innodb_large_prefix'
+---------------------+-------+
| Variable_name       | Value |
+---------------------+-------+
| innodb_large_prefix | OFF   |
+---------------------+-------+
1 row in set (0.00 sec)

3. 修改innodb_large_prefix = 1 ,innodb_file_format= BARRACUDA参数  ,
对row_format为dynamic格式 ,可以指定索引列长度大于767 bytes。但是索引列总长度的不能大于3072 bytes的限制仍然存在 
 



你可能感兴趣的:(mysql体系结构)