-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
ddl: allow enum/set to append values #6941
Conversation
Hi contributor, thanks for your PR. This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically. |
/ok-to-test |
@lqs Thanks for your PR! |
/run-all-tests |
@lqs Would you please add a test for the |
@zimulala PTAL |
} | ||
} | ||
return nil | ||
} | ||
return errUnsupportedModifyColumn.GenByArgs("modify enum column is not supported") |
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.
I think this error msg is not clear enough for the new code.
@@ -1244,6 +1244,7 @@ func (s *testDBSuite) TestChangeColumn(c *C) { | |||
c.Assert(hasNotNull, IsFalse) | |||
// for enum | |||
s.mustExec(c, "alter table t3 add column en enum('a', 'b', 'c') not null default 'a'") | |||
s.mustExec(c, "alter table t3 modify column en enum('a', 'b', 'c', 'd') not null default 'a'") |
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.
Could you add some tests about insert or update statements after this test?
Is anyone still working on this issue? |
@mail2fish |
Yes, I am working on it. |
Should I create another PR? |
@mail2fish |
Duplicated with #7767. |
What have you changed? (mandatory)
Allow to append new values to existing ENUM/SET fields.
Removing values or changing existing values is still unsupported.
What are the type of the changes (mandatory)?
Fix Support modify column to enum types. #6398
How has this PR been tested (mandatory)?
Added unit test cases in ddl/ddl_db_test.go