incubator-seata icon indicating copy to clipboard operation
incubator-seata copied to clipboard

bugfix: fix the failure of rollbacking back of the delete SQL at AT m…

Open TakeActionNow2019 opened this issue 1 year ago • 2 comments

  • [x] I have registered the PR changes.

Ⅰ. Describe what this PR did

fix the failure of rollbacking back of the delete SQL at AT mode when using SQLServer

Ⅱ. Does this pull request fix one issue?

fix #6449

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

TakeActionNow2019 avatar Apr 28 '24 17:04 TakeActionNow2019

At AT mode when using SQLServer, if any column of a table is with "IDENTITY", before inserting a value into this column, we should judge whether there is a "IDENTITY" with it or not. Or the database will report errors, ie "Table 'xxx' does not have the identity property. Cannot perform SET operation" and "Cannot insert explicit value for identity column in table 'xxx' when IDENTITY_INSERT is set to OFF."

TakeActionNow2019 avatar Apr 28 '24 17:04 TakeActionNow2019

Codecov Report

Attention: Patch coverage is 11.11111% with 40 lines in your changes missing coverage. Please review.

Project coverage is 52.38%. Comparing base (7f3b79b) to head (5c41ea6). Report is 1 commits behind head on 2.x.

Files with missing lines Patch % Lines
...ce/undo/sqlserver/SqlServerUndoDeleteExecutor.java 5.40% 34 Missing and 1 partial :warning:
...che/seata/sqlparser/struct/SqlServerTableMeta.java 0.00% 5 Missing :warning:
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #6511      +/-   ##
============================================
- Coverage     52.46%   52.38%   -0.09%     
+ Complexity     6387     6385       -2     
============================================
  Files          1080     1081       +1     
  Lines         37576    37617      +41     
  Branches       4457     4462       +5     
============================================
- Hits          19714    19705       -9     
- Misses        15910    15961      +51     
+ Partials       1952     1951       -1     
Files with missing lines Coverage Δ
...urce/sql/struct/cache/SqlServerTableMetaCache.java 79.09% <100.00%> (+0.38%) :arrow_up:
...che/seata/sqlparser/struct/SqlServerTableMeta.java 0.00% <0.00%> (ø)
...ce/undo/sqlserver/SqlServerUndoDeleteExecutor.java 28.30% <5.40%> (-61.18%) :arrow_down:

... and 4 files with indirect coverage changes

codecov[bot] avatar Aug 01 '24 16:08 codecov[bot]

Thank you for your contributions to Seata. If possible, please send your Dingtalk contact information to my email, and I will invite you to join the Seata developer group. [email protected]

funky-eyes avatar Sep 11 '24 01:09 funky-eyes