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

ddl: allow enum/set to append values #6941

Closed
wants to merge 2 commits into from

Conversation

lqs
Copy link
Contributor

@lqs lqs commented Jun 29, 2018

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)?

How has this PR been tested (mandatory)?

Added unit test cases in ddl/ddl_db_test.go

@sre-bot
Copy link
Contributor

sre-bot commented Jun 29, 2018

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.

@CLAassistant
Copy link

CLAassistant commented Jun 29, 2018

CLA assistant check
All committers have signed the CLA.

@shenli
Copy link
Member

shenli commented Jun 29, 2018

/ok-to-test

@shenli shenli added component/DDL-need-LGT3 contribution This PR is from a community contributor. type/enhancement The issue or PR belongs to an enhancement. labels Jun 29, 2018
@shenli
Copy link
Member

shenli commented Jun 29, 2018

@lqs Thanks for your PR!

@shenli
Copy link
Member

shenli commented Jul 2, 2018

/run-all-tests

@coocood
Copy link
Member

coocood commented Jul 2, 2018

@lqs
Thank you for your contribution!

Would you please add a test for the Set type as well?

@shenli
Copy link
Member

shenli commented Jul 2, 2018

@zimulala PTAL

}
}
return nil
}
return errUnsupportedModifyColumn.GenByArgs("modify enum column is not supported")
Copy link
Member

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'")
Copy link
Contributor

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?

@zhexuany zhexuany changed the title Allow to append values to enum/set (fixes #6398) ddl: allow enum/set to append values Jul 4, 2018
@mail2fish
Copy link
Contributor

Is anyone still working on this issue?

@coocood
Copy link
Member

coocood commented Sep 20, 2018

@mail2fish
Would you like to help update this PR?

@mail2fish
Copy link
Contributor

Yes, I am working on it.

@mail2fish
Copy link
Contributor

Should I create another PR?

@coocood
Copy link
Member

coocood commented Sep 20, 2018

@mail2fish
Alright

@winkyao
Copy link
Contributor

winkyao commented Feb 26, 2019

Duplicated with #7767.

@winkyao winkyao closed this Feb 26, 2019
@you06 you06 added the sig/sql-infra SIG: SQL Infra label Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution This PR is from a community contributor. sig/sql-infra SIG: SQL Infra type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support modify column to enum types.
10 participants