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

Ignore MySQL indices with prefix key parts #173

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

acarapetis
Copy link

Btree indices on prefix keys (e.g. col_name(5) meaning the first 5 characters of "col_name") were previously being replicated as indices on the full column. This can cause errors in the case of columns with values too wide to fit in indices; and regardless produces a non-equivalent schema on the target.

PostgreSQL doesn't seem to have a direct equivalent for this type of index, so my fix is just to ignore these indices, as is done for non-BTREE indices.

Btree indices on prefix keys (e.g. col_name(5) meaning the first 5
characters of "col_name") were previously being replicated as indices on
the full column. This can cause errors in the case of columns with
values too wide to fit in indices; and regardless produces a
non-equivalent schema on the target.

PostgreSQL doesn't seem to have a direct equivalent for this type of
index, so my fix is just to ignore these indices, as is done for
non-BTREE indices.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant