Skip to content

Conversation

@bbernays
Copy link
Collaborator

@bbernays bbernays commented Jul 5, 2023

Summary

Closes #11962
BEGIN_COMMIT_OVERRIDE
fix!: This changes the prefix size for text and blob primary keys. Previous to this PR only the first 64 characters were included in the primary key, but now it will use maximum supported number of characters (191) in the primary key. Warning logs will be printed if there is any possible truncation. If you are using a source plugin that has a primary key on a text or blob column you will have to use migrate_mode: forced to upgrade.
END_COMMIT_OVERRIDE

@cq-bot cq-bot added the mysql label Jul 5, 2023
@cq-bot cq-bot added the ci label Jul 6, 2023
@bbernays bbernays marked this pull request as ready for review July 6, 2023 15:53
@bbernays bbernays requested a review from a team July 6, 2023 15:53
@bbernays bbernays changed the title fix(mysql): Limit Truncation of Text/Blob Primary Keys fix(mysql)!: Limit Truncation of Text/Blob Primary Keys Jul 6, 2023
@bbernays bbernays changed the title fix(mysql)!: Limit Truncation of Text/Blob Primary Keys fix(mysql)!: Limit truncation of text and blob columns used as primary Keys by setting the prefix to the largest value Jul 6, 2023
@bbernays bbernays requested a review from hermanschaaf July 11, 2023 05:39
)
// This is necessary because tables are named based on the current time
// As we iterate through the tests, if we don't sleep here then tables can be created with the same name
time.Sleep(1 * time.Second)
Copy link
Member

@hermanschaaf hermanschaaf Jul 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been a problem for me too, I'm opening a PR to add a random suffix to the table name cloudquery/plugin-sdk#1086

@bbernays bbernays requested a review from hermanschaaf July 11, 2023 08:35
@bbernays bbernays added the automerge Automatically merge once required checks pass label Jul 11, 2023
@kodiakhq kodiakhq bot merged commit c67fe97 into cloudquery:main Jul 11, 2023
@bbernays bbernays deleted the mysql-pks-truncation branch July 12, 2023 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Automatically merge once required checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug (mysql): missing records for several tables

4 participants