Refactoring (*textRows).readRow in a more clear way#1230
Merged
shogo82148 merged 1 commit intogo-sql-driver:masterfrom Jul 12, 2021
Merged
Refactoring (*textRows).readRow in a more clear way#1230shogo82148 merged 1 commit intogo-sql-driver:masterfrom
(*textRows).readRow in a more clear way#1230shogo82148 merged 1 commit intogo-sql-driver:masterfrom
Conversation
Contributor
Author
|
@shogo82148 @methane |
shogo82148
requested changes
Jul 12, 2021
Contributor
shogo82148
left a comment
There was a problem hiding this comment.
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) |
Contributor
There was a problem hiding this comment.
In this case, current implementation returns the error.
So, should it be the following?
Suggested change
| errLog.Print(err) | |
| return err |
Contributor
Author
There was a problem hiding this comment.
Oh, sorry, I made a mistake here, quick fixed.
Contributor
Author
There was a problem hiding this comment.
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
Contributor
Author
|
@shogo82148 |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
(*textRows).readRowin a more clear way.Log the error whenparseDateTimefailed.Checklist