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

*: fix upper-cased charset and collation name #301

Merged
merged 3 commits into from
Apr 29, 2019

Conversation

bb7133
Copy link
Member

@bb7133 bb7133 commented Apr 25, 2019

What problem does this PR solve?

This PR aims to fix the following 3 potential issues:

What is changed and how it works?

As stated above

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change

Side effects

  • (Potentially) Breaking backward compatibility

Copy link
Contributor

@winkyao winkyao left a comment

Choose a reason for hiding this comment

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

LGTM

charset/charset.go Outdated Show resolved Hide resolved
lonng
lonng previously approved these changes Apr 28, 2019
Copy link
Contributor

@lonng lonng left a comment

Choose a reason for hiding this comment

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

Rest LGTM

@bb7133
Copy link
Member Author

bb7133 commented Apr 28, 2019

addressed, PTAL @lonng @crazycs520

// TiDB always suppose all charsets / collations as lower-cased and try to convert them if they're not.
// However, the convert is missed in some scenarios before v2.1.9, so for all those tables prior to TableInfoVersion3, their
// charsets / collations will be converted to lower-case while loading from the storage.
TableInfoVersion3 = uint16(3)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we update column version too?

Copy link
Member Author

Choose a reason for hiding this comment

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

IMHO it's not necessary, after all string case convert is not a heavy opeartion, using only TableInfoVersion makes the codes simple and clear.

@@ -165,4 +178,5 @@ func BenchmarkGetCharsetDesc(b *testing.B) {
for i := 0; i < b.N; i++ {
GetCharsetDesc(cs)
}

Copy link
Contributor

Choose a reason for hiding this comment

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

remove this blank line.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@crazycs520 crazycs520 left a comment

Choose a reason for hiding this comment

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

Reset LGTM

@bb7133
Copy link
Member Author

bb7133 commented Apr 28, 2019

hi @crazycs520 , please check my replys for your comments, thanks!

Copy link
Contributor

@lonng lonng left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants