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
bugfix: insert value is all parsed as string in insert on duplicate #5028
bugfix: insert value is all parsed as string in insert on duplicate #5028
Conversation
@@ -263,7 +264,7 @@ public TableRecords buildTableRecords2(TableMeta tableMeta, String selectSQL, Ar | |||
for (int i = 0; i < ts; i++) { | |||
List<Object> paramAppender = paramAppenderList.get(i); | |||
for (int j = 0; j < ds; j++) { | |||
ps.setObject(i * ds + j + 1, "NULL".equals(paramAppender.get(j).toString()) ? null : paramAppender.get(j)); | |||
ps.setObject(i * ds + j + 1, (paramAppender.get(j) instanceof Null) ? null : paramAppender.get(j)); |
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.
get(j)优化下,没必要get2次,虽然很快
Codecov Report
@@ Coverage Diff @@
## develop #5028 +/- ##
=============================================
+ Coverage 49.03% 49.32% +0.29%
- Complexity 4090 4119 +29
=============================================
Files 733 733
Lines 26012 26012
Branches 3213 3213
=============================================
+ Hits 12755 12831 +76
+ Misses 11895 11818 -77
- Partials 1362 1363 +1
|
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
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
* '1103' of https://github.com/zw201913/seata: optimize: remove useless code (apache#5047) bugfix: fix startup failure of Server1.5.2 by using OpenJDK 11 (apache#4874) bugfix: insert value is all parsed as string in insert on duplicate (apache#5028) bugfix: global session is not change to Committed in saga mode (apache#5050)
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
…ecutor
Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?
fixes #5023
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews