-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
A data-loss case occurs when chunk-key contains decimal-column in MySQL 5.6 #1119 #1120
base: master
Are you sure you want to change the base?
A data-loss case occurs when chunk-key contains decimal-column in MySQL 5.6 #1119 #1120
Conversation
@wangzhanbing thanks for this PR! I think this fix makes sense 👍 Is it possible to add a "localtest" for this scenario under the |
OK, That's what I am doing |
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.
@wangzhanbing LGTM. Thanks for this contribution! 🙏
I see you're still running MySQL 5.6. A heads-up that 5.6 was recently removed from gh-ost
CI jobs as it is now an end-of-life MySQL version. This means future changes to gh-ost
are not tested or guaranteed to work on that version
one extra question: In my company, most of mysql-instances will still be 5.6 in next one or two years. maybe so do other companies. Is there another more elegant solution than abandoning history supports ? |
We have decided to only develop and test against currently supported versions of MySQL as we're unable to support old versions indefinitely. We'll continue to accept contributed fixes for MySQL 5.6 for the time being, but will only test that these fixes work against 5.7 and 8.0. New features will only be tested against 5.7 and 8.0. In a future release, we will be dropping support for MySQL 5.5 entirely (including code specific to 5.5). I will take a look this week 👍 |
@wangzhanbing please could you take a look at the merge conflict? Thank you! 🙇 |
Issue
Related issue: #1119
That's is an issue, describing a data-loss case caused by decimal-type column in chunk-key.
We also describe how to reproduce the case and how to fix it.
Description
This PR solves the bug by adding
cast
to decimal-type-column in values-stmt\set-stmt\where-stmtfor example: If type of column (
InstanceID
) isdecimal(30, 0)
, the corresponding set-stmt and where-stmt as follows:script/cibuild
returns with no formatting errors, build errors or unit test errors.