This repository has been archived by the owner on Nov 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 188
*: fix cannot convert type: decimal.Decimal
#375
Merged
Merged
Conversation
This file contains 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
csuzhangxc
added
priority/important
Major change, requires approval from ≥2 primary reviewers
status/PTAL
This PR is ready for review. Add this label back after committing new changes
type/bug-fix
Bug fix
needs-cherry-pick-release-1.0
This PR should be cherry-picked to release-1.0. Remove this label after cherry-picked to release-1.0
labels
Nov 26, 2019
/run-all-tests tidb=release-3.0 |
Codecov Report
@@ Coverage Diff @@
## master #375 +/- ##
===========================================
Coverage 57.7346% 57.7346%
===========================================
Files 162 162
Lines 16368 16368
===========================================
Hits 9450 9450
Misses 5994 5994
Partials 924 924 |
@WangXiangUSTC @amyangfei PTAL |
amyangfei
reviewed
Nov 26, 2019
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
amyangfei
added
status/LGT1
One reviewer already commented LGTM
and removed
status/PTAL
This PR is ready for review. Add this label back after committing new changes
labels
Nov 26, 2019
/run-all-tests tidb=release-3.0 |
2 similar comments
/run-all-tests tidb=release-3.0 |
/run-all-tests tidb=release-3.0 |
LGTM |
WangXiangUSTC
added
status/LGT2
Two reviewers already commented LGTM, ready for merge
and removed
status/LGT1
One reviewer already commented LGTM
labels
Nov 27, 2019
WangXiangUSTC
approved these changes
Nov 27, 2019
/run-cherry-picker |
cherry pick to release-1.0 in PR #376 |
sre-bot
added
already-cherry-pick-1.0
The related PR is already cherry-picked to release-1.0. Add this label once the PR is cherry-picked
and removed
needs-cherry-pick-release-1.0
This PR should be cherry-picked to release-1.0. Remove this label after cherry-picked to release-1.0
labels
Nov 27, 2019
lichunzhu
pushed a commit
to lichunzhu/dm
that referenced
this pull request
Apr 6, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
already-cherry-pick-1.0
The related PR is already cherry-picked to release-1.0. Add this label once the PR is cherry-picked
priority/important
Major change, requires approval from ≥2 primary reviewers
status/LGT2
Two reviewers already commented LGTM, ready for merge
type/bug-fix
Bug fix
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.
What problem does this PR solve?
in golang v1.13, the Decimal decompose interface is introduced, see:
in shopspring/decimal@75bb2cb, it implements the Decimal decompose interface.
when executing a statement with decimal type columns, a possible execution path is:
the code block
will cause the skip of the value fetching (convert
decimal.Decimal
tostring
) in https://github.com/go-sql-driver/mysql/blob/v1.4.1/statement.go#L146.then continue the execution flow:
another useful link golang/go#34315.
What is changed and how it works?
some methods can be used to fix this problem:
I chose the first one, and update shopspring/decimal to shopspring/decimal@b054a8d. (revert Decimal decompose interface implementation)
Check List
Tests
Related changes