apache / incubator-seata

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.
https://seata.apache.org/
Apache License 2.0
25.38k stars 8.79k forks source link

bugfix: fix the problem of building undoLog exception when update join does not update data #6994

Closed GoodBoyCoder closed 2 weeks ago

GoodBoyCoder commented 2 weeks ago

Ⅰ. Describe what this PR did

If the before and agter images are both empty, skip prepareUndoLog directly

Ⅱ. Does this pull request fix one issue?

fixes #6976

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

Ⅳ. Describe how to verify it

make an updateJoin statement with an empty query result to test

Ⅴ. Special notes for reviews

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 52.65%. Comparing base (60a81b1) to head (9aaa658). Report is 2 commits behind head on 2.x.

Files with missing lines Patch % Lines
...datasource/exec/mysql/MySQLUpdateJoinExecutor.java 75.00% 0 Missing and 1 partial :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/apache/incubator-seata/pull/6994/graphs/tree.svg?width=650&height=150&src=pr&token=tbmHt2ZfxO&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/incubator-seata/pull/6994?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) ```diff @@ Coverage Diff @@ ## 2.x #6994 +/- ## ========================================= Coverage 52.65% 52.65% - Complexity 6571 6576 +5 ========================================= Files 1126 1126 Lines 39942 39945 +3 Branches 4680 4682 +2 ========================================= + Hits 21031 21034 +3 - Misses 16911 16913 +2 + Partials 2000 1998 -2 ``` | [Files with missing lines](https://app.codecov.io/gh/apache/incubator-seata/pull/6994?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [...datasource/exec/mysql/MySQLUpdateJoinExecutor.java](https://app.codecov.io/gh/apache/incubator-seata/pull/6994?src=pr&el=tree&filepath=rm-datasource%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Frm%2Fdatasource%2Fexec%2Fmysql%2FMySQLUpdateJoinExecutor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cm0tZGF0YXNvdXJjZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VhdGEvcm0vZGF0YXNvdXJjZS9leGVjL215c3FsL015U1FMVXBkYXRlSm9pbkV4ZWN1dG9yLmphdmE=) | `78.26% <75.00%> (-0.23%)` | :arrow_down: | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-seata/pull/6994/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)