Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
tangenta committed Jul 11, 2019
1 parent 73a60a8 commit 96b24b7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ddl/db_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,7 @@ func (s *testIntegrationSuite5) TestModifyingColumnOption(c *C) {
tk.MustExec("create database if not exists test")
tk.MustExec("use test")

errCodeStr1 := "[ddl:210]" // unsupported modify collate from utf8mb4_bin to utf8mb4_general_ci"
errCodeStr2 := "[ddl:203]" // unsupported modify column with references
errMsg := "[ddl:203]" // unsupported modify column with references
assertErrCode := func(sql string, errCodeStr string) {
_, err := tk.Exec(sql)
c.Assert(err, NotNil)
Expand All @@ -785,7 +784,7 @@ func (s *testIntegrationSuite5) TestModifyingColumnOption(c *C) {

tk.MustExec("drop table if exists t1")
tk.MustExec("create table t1 (b char(1) default null) engine=InnoDB default charset=utf8mb4 collate=utf8mb4_general_ci")
assertErrCode("alter table t1 modify column b char(1) character set utf8mb4 collate utf8mb4_general_ci", errCodeStr1)
tk.MustExec("alter table t1 modify column b char(1) character set utf8mb4 collate utf8mb4_general_ci")

tk.MustExec("drop table t1")
tk.MustExec("create table t1 (b char(1) collate utf8mb4_general_ci)")
Expand All @@ -795,7 +794,7 @@ func (s *testIntegrationSuite5) TestModifyingColumnOption(c *C) {
tk.MustExec("drop table if exists t2")
tk.MustExec("create table t1 (a int)")
tk.MustExec("create table t2 (b int, c int)")
assertErrCode("alter table t2 modify column c int references t1(a)", errCodeStr2)
assertErrCode("alter table t2 modify column c int references t1(a)", errMsg)
}

func (s *testIntegrationSuite2) TestCaseInsensitiveCharsetAndCollate(c *C) {
Expand Down

0 comments on commit 96b24b7

Please sign in to comment.