-
Notifications
You must be signed in to change notification settings - Fork 64
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
Conversation
PTAL @morgo @tangenta @xiongjiwei |
@@ -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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
src/main.go
Outdated
@@ -800,6 +796,7 @@ func (t *tester) executeStmt(query string) error { | |||
return errors.Trace(err) | |||
} | |||
} | |||
|
There was a problem hiding this comment.
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.
There was a problem hiding this 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) | ||
} | ||
} |
There was a problem hiding this comment.
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
Add gbk charset, close: Allow this framework to run GBK related tests #31
close dependency on github.com/go-sql-driver/mysql v1.3.0 is old #25.
MySQLWarnings
is removed in go-sql-driver/mysql(v1.6.0). So here remove it too.strict mode
is removed too in Remove strict mode go-sql-driver/mysql#676.