Skip to content
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

Conversation

renliangyu857
Copy link
Contributor

…ecutor

  • I have registered the PR changes.

Ⅰ. 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

@funky-eyes funky-eyes changed the title bugfix:insert value is all parsed as string in insert on duplicate ex… bugfix:insert value is all parsed as string in insert on duplicate Oct 31, 2022
@@ -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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get(j)优化下,没必要get2次,虽然很快

@codecov-commenter
Copy link

Codecov Report

Merging #5028 (19f5995) into develop (84e8756) will increase coverage by 0.29%.
The diff coverage is 78.94%.

Impacted file tree graph

@@              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     
Impacted Files Coverage Δ
...ec/mysql/MySQLInsertOnDuplicateUpdateExecutor.java 30.97% <78.94%> (ø)
...in/java/io/seata/server/session/GlobalSession.java 81.39% <0.00%> (+0.38%) ⬆️
...erver/storage/file/session/FileSessionManager.java 49.68% <0.00%> (+0.63%) ⬆️
...very/registry/zk/ZookeeperRegisterServiceImpl.java 61.76% <0.00%> (+0.73%) ⬆️
...o/seata/server/coordinator/DefaultCoordinator.java 48.36% <0.00%> (+0.81%) ⬆️
...o/seata/server/session/AbstractSessionManager.java 61.19% <0.00%> (+2.98%) ⬆️
...rage/redis/store/RedisTransactionStoreManager.java 67.23% <0.00%> (+3.70%) ⬆️
...torage/file/store/FileTransactionStoreManager.java 60.45% <0.00%> (+4.18%) ⬆️
.../java/io/seata/server/coordinator/DefaultCore.java 53.84% <0.00%> (+5.91%) ⬆️
...java/io/seata/server/storage/SessionConverter.java 89.09% <0.00%> (+9.09%) ⬆️
... and 1 more

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@funky-eyes funky-eyes added this to the 1.6.0 milestone Nov 1, 2022
@funky-eyes funky-eyes changed the title bugfix:insert value is all parsed as string in insert on duplicate bugfix: insert value is all parsed as string in insert on duplicate Nov 4, 2022
Copy link
Member

@jsbxyyx jsbxyyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@funky-eyes funky-eyes merged commit 0e03695 into apache:develop Nov 5, 2022
zw201913 pushed a commit to zw201913/seata that referenced this pull request Nov 7, 2022
* '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)
Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants