Skip to content

support gbk charset - #808

Open
spongedu wants to merge 10 commits into
pingcap:masterfrom
spongedu:200413
Open

support gbk charset#808
spongedu wants to merge 10 commits into
pingcap:masterfrom
spongedu:200413

Conversation

@spongedu

@spongeduspongedu commented Apr 13, 2020

Copy link
Copy Markdown
Contributor
  1. Support charset gbk in parser;
  2. fix description for charsetlatin and charsetbin1 and charsetbin

What problem does this PR solve?

We're using parser to develop some our systems and found that charset gbk is not supported yet in parser, which makes some SQL fail to work.
As a MySQL compatible parser, I think we should support gbk as MySQL's parser do, and leave the charset-compatible issues to TiDB layer.

What is changed and how it works?

Add gbk into supported charsets, and add related tests

Check List

Tests

  • Unit test
  • Manual test

@spongedu
spongedu requested a review from a teamApril 13, 2020 03:27
@codecov

codecovBot commented Apr 13, 2020

Copy link
Copy Markdown

Codecov Report

Merging #808 into master will decrease coverage by 0.08%.
The diff coverage is n/a.

@@ Coverage Diff @@## master #808 +/- ##
==========================================
- Coverage 78.35% 78.27% -0.09% 
==========================================
Files 40 40 Lines 14773 14707 -66 ==========================================
- Hits 11576 11512 -64 - Misses 2509 2515 +6 + Partials 688 680 -8 

@kennytmkennytm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rest LGTM.

Why do we support GBK rather than its superset GB18030?

Comment threadcharset/charset.go Outdated
spongeduand others added 2 commits April 13, 2020 14:15
Co-Authored-By: kennytm <kennytm@gmail.com>
@spongedu

spongedu commented Apr 13, 2020

Copy link
Copy Markdown
ContributorAuthor

Rest LGTM.

Why do we support GBK rather than its superset GB18030?

@kennytm Because we just met gbk in our cases. maybe gb18030 should be supported as well

@tangentatangenta changed the title 1. Support charset gbk in parser; 2. fix description for charsetlatin and charsetbinsupport gbk charsetApr 14, 2020
@tiancaiamao

Copy link
Copy Markdown
Collaborator

PTAL @bb7133@wjhuang2016

Comment threadcharset/charset.go Outdated

@wjhuang2016wjhuang2016 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

GetSupportedCharsets need to change too.

@spongedu

Copy link
Copy Markdown
ContributorAuthor

@wjhuang2016 PTAL :)

@ti-chi-bot

Copy link
Copy Markdown
Member

@spongedu: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.27%. Comparing base (8be0c27) to head (824320b).
⚠️ Report is 255 commits behind head on master.

⚠️Current head 824320b differs from pull request most recent head 73b534d

Please upload reports for the commit 73b534d to get more accurate results.

Additional details and impacted files
@@ Coverage Diff @@## master #808 +/- ##
==========================================
- Coverage 78.35% 78.27% -0.09% 
==========================================
Files 40 40 Lines 14773 14707 -66 ==========================================
- Hits 11576 11512 -64 - Misses 2509 2515 +6 + Partials 688 680 -8 
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@spongedu@tiancaiamao@ti-chi-bot@codecov-commenter@kennytm@wjhuang2016@tangenta@AilinKid