-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Ensure collation is set to database default when changing column to binary #45792
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, the fix looks good to me. However please squash your commits.
6b48798
to
abcc9ee
Compare
I see the |
A recent change made it so that when you perform a change column it will preserve collation on the column rather than nil it out· which would select the database default. This works fine except in the case of a binary type. In this case the collation should be set to nil in the options so that the database default collation type can be used on the column.
abcc9ee
to
be0a58b
Compare
Restarted the failing build. |
I'm running into this while upgrading from 7.0.3.1 to 7.0.4 and running db:migrate. The migrations fail when trying to create a varbinary column on an older mysql 5.7 database. It looks like this fix did not make it into the 7.0.4 release. Is there any plans to backport it? At the moment the only way I can seem to get around it is to load a previous schema dump that was generated after that migration was run. Edit: Setting |
Ensure collation is set to database default when changing column to binary
This should be fixed on |
Binary types are not being set to an incompatible collation type when the column is changed. See this comment for details: #45744 (comment)
This PR adds a failing test which demonstrates a problem introduced in #45742, and a fix to the implementation to pass the test.