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

*: support gbk charset #33

Merged
merged 2 commits into from
Nov 22, 2021
Merged

*: support gbk charset #33

merged 2 commits into from
Nov 22, 2021

Conversation

zimulala
Copy link
Collaborator

@zimulala zimulala commented Nov 18, 2021

@CLAassistant
Copy link

CLAassistant commented Nov 18, 2021

CLA assistant check
All committers have signed the CLA.

@zimulala
Copy link
Collaborator Author

PTAL @morgo @tangenta @xiongjiwei

@zimulala zimulala changed the title *: add gbk charset *: support gbk charset Nov 18, 2021
@@ -155,7 +167,7 @@ func isTiDB(db *sql.DB) bool {
}

func (t *tester) addConnection(connName, hostName, userName, password, db string) {
mdb, err := OpenDBWithRetry("mysql", userName+":"+password+"@tcp("+hostName+":"+port+")/"+db+"?strict=true&time_zone=%27Asia%2FShanghai%27"+params)
mdb, err := OpenDBWithRetry("mysql", userName+":"+password+"@tcp("+hostName+":"+port+")/"+db+"?time_zone=%27Asia%2FShanghai%27"+params)
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the strict mean, why we need remove it

Copy link
Collaborator

Choose a reason for hiding this comment

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

The strict mode is an option in the driver that changes warnings to errors. However in newer versions of the driver this has been removed.

https://github.com/go-sql-driver/mysql/wiki/strict-mode

@dveeden dveeden mentioned this pull request Nov 19, 2021
xiongjiwei
xiongjiwei previously approved these changes Nov 19, 2021
@zimulala
Copy link
Collaborator Author

PTAL @morgo @tangenta

src/main.go Outdated
@@ -800,6 +796,7 @@ func (t *tester) executeStmt(query string) error {
return errors.Trace(err)
}
}

Copy link
Member

Choose a reason for hiding this comment

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

Please remove this blank line.

Copy link
Collaborator

@dveeden dveeden left a comment

Choose a reason for hiding this comment

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

I don't know what exact issue the GBK part fixes, so I can't fully review that part. However updating the dependencies looks ok and I don't see any issues with the GBK part of this.

if strings.EqualFold(coll.CharsetName, c.Name) {
charset.AddCollation(coll)
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

GBK related issues are dealt with here. @dveeden

@zimulala zimulala merged commit 3320096 into pingcap:master Nov 22, 2021
@zimulala zimulala deleted the support-gbk branch November 22, 2021 02:14
@morgo morgo mentioned this pull request Nov 22, 2021
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.

Allow this framework to run GBK related tests dependency on github.com/go-sql-driver/mysql v1.3.0 is old
5 participants