Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aurora (MySQL) Specified key was too long #3911

Closed
Nemo64 opened this issue Mar 19, 2020 · 2 comments
Closed

Aurora (MySQL) Specified key was too long #3911

Nemo64 opened this issue Mar 19, 2020 · 2 comments

Comments

@Nemo64
Copy link

Nemo64 commented Mar 19, 2020

Bug Report

Q A
BC Break no
Version 2.10.1

Summary

I use Amazons Aurora (Serverless) with MySQL compatibility. It doesn't seem to be 100% compatible since indexes aren't automatically truncated. I used the AuditBundle and it creates indexes using dbal. An example is this INDEX object_id_e06395edc291d0719bee26fd39a32e8a_idx (object_id).

Current behaviour

MySQL (5.6) automatically converts an index
like this: INDEX object_id_e06395edc291d0719bee26fd39a32e8a_idx (object_id)
to this INDEX object_id_e06395edc291d0719bee26fd39a32e8a_idx (object_id(191)).

Aurora doesn't. Instead I get an Specified key was too long; max key length is 767 bytes.

Expected behaviour

It should be possible to add the Sub_part to the create schema directly when the encoding is known. This will have no effect to existing schemas but allows to easily use Aurora instead of MySQL.

Current Workaround

I use migrations and one can simply add the Sub_part manually.

@Nemo64 Nemo64 changed the title Aurora Index Specified key was too long Aurora (MySQL) Specified key was too long Mar 19, 2020
@Nemo64
Copy link
Author

Nemo64 commented Mar 24, 2020

I noticed that this isn't an aurora problem but a mysql strict mode problem which is related to #3419 .

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant