Skip to content

ddl : fix column collate should use table's if it has when create table or alter table. (#13119 & #12327)#13190

Merged
bb7133 merged 3 commits intopingcap:release-2.1from
AilinKid:dbcollate-2.1
Nov 6, 2019
Merged

ddl : fix column collate should use table's if it has when create table or alter table. (#13119 & #12327)#13190
bb7133 merged 3 commits intopingcap:release-2.1from
AilinKid:dbcollate-2.1

Conversation

@AilinKid
Copy link
Contributor

@AilinKid AilinKid commented Nov 6, 2019

What problem does this PR solve?

cherry-pick #13119 and #12327 to release-2.1

What is changed and how it works?

conflict file & code change
show.go
db_integration_test.go
db_test.go
mock.go
column_test.go
show_test.go

Check List

Tests

  • Unit test
  • Integration test

Release note

  • fix column collate should use table's if it has when create table or alter table.

AilinKid and others added 2 commits November 6, 2019 12:46
…le or alter table. (pingcap#13119)

fix column's collation should use table's collation
@AilinKid AilinKid added type/2.1 cherry-pick type/bugfix This PR fixes a bug. and removed type/bugfix This PR fixes a bug. labels Nov 6, 2019
@AilinKid AilinKid changed the title ddl : fix column collate should use table's if it has when create table or alter table (#13119) ddl : fix column collate should use table's if it has when create table or alter table. (#13119) Nov 6, 2019
@AilinKid
Copy link
Contributor Author

AilinKid commented Nov 6, 2019

/run-all-tests

Copy link
Member

@wjhuang2016 wjhuang2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

c.Assert(err, NotNil)
c.Assert(terror.ErrorEqual(err, table.ErrTruncatedWrongValueForField), IsTrue, Commentf("err %v", err))
tk.MustQuery("show create table t").Check(testkit.Rows("t CREATE TABLE `t` (\n" +
" `a` varchar(10) CHARSET utf8 COLLATE utf8_bin DEFAULT NULL,\n" +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why changing this keyword?

Copy link
Contributor Author

@AilinKid AilinKid Nov 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cause backport change the output in show.go. CHARACTER is same to master/mysql.

@AilinKid AilinKid added the type/bugfix This PR fixes a bug. label Nov 6, 2019
Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bb7133 bb7133 added the status/LGT2 Indicates that a PR has LGTM 2. label Nov 6, 2019
@bb7133 bb7133 changed the title ddl : fix column collate should use table's if it has when create table or alter table. (#13119) ddl : fix column collate should use table's if it has when create table or alter table. (#13119/#12327) Nov 6, 2019
@bb7133 bb7133 changed the title ddl : fix column collate should use table's if it has when create table or alter table. (#13119/#12327) ddl : fix column collate should use table's if it has when create table or alter table. (#13119 & #12327) Nov 6, 2019
@bb7133 bb7133 added the status/can-merge Indicates a PR has been approved by a committer. label Nov 6, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Nov 6, 2019

Sorry @bb7133, you don't have permission to trigger auto merge event on this branch.

@bb7133
Copy link
Member

bb7133 commented Nov 6, 2019

/run-all-tests

@bb7133 bb7133 merged commit 72c6073 into pingcap:release-2.1 Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants