You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Again: MySQL error: Specified key was too long; max key length is 767 bytes #597
#455 is back in 3.6.0 (or earlier?) affecting mysql <= 4.6..
mysql <= 4.6 has a max key length of 767 bytes (whereas >= 4.7 has a limit of 3072 bytes)
Caused by: org.polyjdbc.core.exception.SchemaManagerException: [DDL_ERROR] Failed to run DDL:
CREATE INDEX jv_commit_property_property_name_property_value_idx ON jv_commit_property(property_name,property_value(200))
at org.polyjdbc.core.schema.SchemaManagerImpl.ddl(SchemaManagerImpl.java:91)
at org.polyjdbc.core.schema.SchemaManagerImpl.create(SchemaManagerImpl.java:52)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes
The property value index has a length of 200 here. Should it be 191 instead?
Activity
bartoszwalacik commentedon Nov 10, 2017
effective DDL is:
So
0means no prefix for this col.The bug is not back but have never been fixed.
Fix done in #455 was the move in the right direction but we forgot about indexes.
I will change JaVers code to generate the following DDL:
#597 fix for mysql index keys
bartoszwalacik commentedon Nov 10, 2017
@Ramblurr do you think it's ok now? https://github.com/javers/javers/pull/598/files
Merge pull request #598 from javers/fix_597
bartoszwalacik commentedon Nov 17, 2017
fixed in 3.6.3