Sign up |
I am receiving the following in one section when I try to change the column order
Error: MySQL Error: Specified key was too long; max key length is 1000 bytes
- in editTable_functions.php on line 381 by _saveFieldOrder_updateColumnOrder()
Ok, glad you got it working. If that comes up again or you'd like us to investigate it further just let me know.
I think you will find this error coming up more frequently now that the database matches the ini column order.
There might be two solutions.
Change the table engine to innodb
split the alter table command so its total length is less than 1000 characters.
I think it's related to the key length of the columns, or maybe any indexes used on the table. I don't think it's related to the length of the query itself. We recently changed the default charset from utf8 to utfmb4 which supports more characters such as emojis and other languages. CMSB should automatically update your database to resolve that issue. If you run into it again on another server feel free to email me details to email@example.com and I can debug it. (Don't post login details to the forum).
There's probably no harm in changing the table type but I wouldn't suggest it as a default because it's not addressing the underlying issue.
The max key length for myisam is 1000. The InnoDB internal maximum key length is 3500 bytes, but MySQL itself restricts this to 3072 bytes.
Since innodb is now the default and is better for overall performance with record locking instead of table locking, it might be worth moving in that direction.