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

Convering enum to varchar #18

Merged
merged 7 commits into from
May 3, 2021
Merged

Convering enum to varchar #18

merged 7 commits into from
May 3, 2021

Conversation

shlomi-noach
Copy link

Related issue: github#642

Description

Looking into -alter converting an enum into varchar. Per github#642 this copies the numeric value of the enum into the varchar column, where we want the textual value.

Initial commit: test suite to confirm error.

Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
@shlomi-noach
Copy link
Author

As expected, the test fails (https://github.com/openark/gh-ost/pull/18/checks?check_run_id=2486957737):

2021-05-02T15:40:48.8743290Z Testing: enum-to-varchar......ERROR enum-to-varchar: checksum mismatch
2021-05-02T15:40:48.8745797Z ---
2021-05-02T15:40:48.8991055Z 8,22c8,22
2021-05-02T15:40:48.8991705Z < 8	11	red
2021-05-02T15:40:48.8992338Z < 9	13	green
2021-05-02T15:40:48.8992817Z < 10	17	orange
2021-05-02T15:40:48.8993447Z < 11	11	red
2021-05-02T15:40:48.8993963Z < 12	13	green
2021-05-02T15:40:48.8994656Z < 13	17	orange
2021-05-02T15:40:48.8995048Z < 14	11	red
2021-05-02T15:40:48.8995471Z < 15	13	green
2021-05-02T15:40:48.8995827Z < 16	17	orange
2021-05-02T15:40:48.8996188Z < 17	11	red
2021-05-02T15:40:48.8996675Z < 18	13	green
2021-05-02T15:40:48.8997031Z < 19	17	orange
2021-05-02T15:40:48.8997360Z < 20	11	red
2021-05-02T15:40:48.8997701Z < 21	13	green
2021-05-02T15:40:48.8998051Z < 22	17	orange
2021-05-02T15:40:48.8998784Z ---
2021-05-02T15:40:48.8999111Z > 8	11	1
2021-05-02T15:40:48.8999422Z > 9	13	2
2021-05-02T15:40:48.8999734Z > 10	17	4
2021-05-02T15:40:48.9000030Z > 11	11	1
2021-05-02T15:40:48.9000338Z > 12	13	2
2021-05-02T15:40:48.9000629Z > 13	17	4
2021-05-02T15:40:48.9000935Z > 14	11	1
2021-05-02T15:40:48.9001223Z > 15	13	2
2021-05-02T15:40:48.9001525Z > 16	17	4
2021-05-02T15:40:48.9001816Z > 17	11	1
2021-05-02T15:40:48.9002119Z > 18	13	2
2021-05-02T15:40:48.9002407Z > 19	17	4
2021-05-02T15:40:48.9002713Z > 20	11	1
2021-05-02T15:40:48.9003007Z > 21	13	2
2021-05-02T15:40:48.9003316Z > 22	17	4
2021-05-02T15:40:48.9004614Z diff /tmp/gh-ost-test.orig.content.csv /tmp/gh-ost-test.ghost.content.csv
2021-05-02T15:40:48.9099343Z + FAIL
2021-05-02T15:40:48.9136942Z ##[error]Process completed with exit code 1.

This will validate ongoing efforts to fix the issue.

@disser4
Copy link

disser4 commented May 3, 2021

I validated tonight that this code change works.

  • I tested through the replica and inserted records while gh-ost was running and it did not return the integer, rather the enum value!
    Thank you for your work @shlomi-noach !!

@shlomi-noach shlomi-noach merged commit 404ca81 into master May 3, 2021
@shlomi-noach shlomi-noach deleted the enum-to-varchar branch May 3, 2021 05:49
@arthurschreiber
Copy link

❤️

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.

3 participants