问题
In MySQL "An index key for a single-column index can be up to 767 bytes. The same length limit applies to any index key prefix."
Reviewing and searching the MariaDB documentation I cannot find a reference to this, or a similar, limit.
What is this limit?
What is the link to the documentation page I didn't find?
回答1:
It is a bit hidden, but e.g.
https://mariadb.com/kb/en/mariadb/documentation/storage-engines/converting-tables-from-myisam-to-innodb/
says:
The maximum length of an INDEX is different between the Engines. [...] MyISAM allows 1000 bytes; InnoDB allows 767 bytes [...]
So the limit is engine specific, but the limits are not different between MySQL and MariaDB.
PS: if in doubt MySQL and MariaDB are still similar enough that anything that is not explicitly documented as being different is still the same
来源:https://stackoverflow.com/questions/22700395/what-is-the-index-key-size-limit-in-mariadb