-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Refactoring (*textRows).readRow
in a more clear way
#1230
Conversation
@shogo82148 @methane |
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 fixed the test on master branch #1228
Please merge these changes into this pull request.
packets.go
Outdated
fieldTypeDate, | ||
fieldTypeNewDate: | ||
if dest[i], err = parseDateTime(dest[i].([]byte), mc.cfg.Loc); err != nil { | ||
errLog.Print(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.
In this case, current implementation returns the error.
So, should it be the following?
errLog.Print(err) | |
return 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.
Oh, sorry, I made a mistake here, quick fixed.
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.
Fine! Unit tests in MySQL 8.0 passed.
Fix error returns use utf8mb4 instead of utf8 in TestCharset (go-sql-driver#1228) From MySQL 8.0.24, `SELECT @@character_set_connection` reports utf8mb3 or utf8mb4 instead of utf8. Because utf8 is currently an alias for utf8mb3, however at some point utf8 is expected to become a reference to utf8mb4. > ref. https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-24.html#mysqld-8-0-24-bug > Important Note: When a utf8mb3 collation was specified in a CREATE TABLE statement, SHOW CREATE TABLE, DEFAULT CHARSET, > the values of system variables containing character set names, > and the binary log all subsequently displayed the character set as utf8 which is becoming a synonym for utf8mb4. > Now in such cases, utf8mb3 is shown instead, and CREATE TABLE raises the warning 'collation_name' is a collation of the deprecated character set UTF8MB3. > Please consider using UTF8MB4 with an appropriate collation instead. (Bug #27225287, Bug #32085357, Bug #32122844) > > References: See also: Bug #30624990. The document says that we should use utf8mb4 instead of utf8, so we should follow it.
693bfb8
to
58f6c4a
Compare
@shogo82148 |
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.
LGTM
Description
(*textRows).readRow
in a more clear way.Log the error whenparseDateTime
failed.Checklist