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

Merged

Conversation

acarapetis
Copy link
Contributor

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.
@acarapetis acarapetis force-pushed the ignore-indices-with-sub-parts branch from 6db01f3 to 1dfdba6 Compare September 30, 2024 02:07
@the4thdoctor
Copy link
Owner

thanks for your PR.
can you please revert the changes in setup.py?
I'll check the issues with it asap and do the changes by myself.

@acarapetis
Copy link
Contributor Author

can you please revert the changes in setup.py?

Will do - didn't remember this branch was linked to this PR when I pushed those changes, my bad!

@acarapetis acarapetis force-pushed the ignore-indices-with-sub-parts branch from 86eabbc to 1dfdba6 Compare December 27, 2024 07:59
@the4thdoctor the4thdoctor merged commit 1b80472 into the4thdoctor:main Dec 29, 2024
@the4thdoctor
Copy link
Owner

Thank you :)

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.

2 participants