-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ALTER from ENUM to VARCHAR ends with numeric values in VARCHAR #642
Comments
|
|
Yeah I saw on bug when I tried to switch from an enum to a varchar field. The binlog streamer process insert decimal values. It doesn't convert the decimal into litteral values before inserting the values. If I take my example in the issue :
Then I start gh-host with a postpone flag in order to keep binlog streamer running.
Here's what I get while waiting for the cut-over :
Now I insert a new line in the source table :
Here's the issue :
Kinda same thing happens if you change the enum order :
Hope that's clearer |
It's clearer now, thanks! |
Should be obvious, but the same bug with ENUM to CHAR bit me today. |
Also hit something similar here |
We ran into the same issue. Essentially when you postpone flags, the binary logs write to the _gho table the numeric index of the enum. |
|
Correction: tracked in openark#18 |
openark#18 seems to solve the issue. Anyone care to confirm in their environment? |
Binaries from openark#18 can be found here |
Released downstream in https://github.com/openark/gh-ost/releases/tag/v1.1.3 |
The downstream fix is now merged to Thanks @shlomi-noach! |
Closing as resolved. Please open a new issue if this reoccurs on the latest release 🙏 |
Hey Schlomi,
After having issues with the SET field, I tried the same thing with a ENUM.
I'm using latest gh-ost (1.0.46) release on linux Ubuntu trusty.
There is no problem with the copy part but the binlog streamer will insert the decimal value instead of the literal value.
Example :
In the binlog :
Thanks again for your work !
The text was updated successfully, but these errors were encountered: