tachibana22 opened a new pull request, #1123: URL: https://github.com/apache/incubator-seata-go/pull/1123
- [x] I have registered the PR [changes](https://github.com/apache/incubator-seata-go/tree/master/changes). **What this PR does**: Intercept the `REPLACE INTO` statement in AT mode to prevent potential data inconsistency, as AT mode does not currently support it. Added corresponding unit tests to verify the interception and ensure normal execution for non-global transactions. **Which issue(s) this PR fixes**: Fixes #1121 **Special notes for your reviewer**: @mx-gp First, I apologize for any confusion caused by closing the previous PR (#1122). I had to recreate this new PR to cleanly resolve some messy merge conflicts with the `master` branch. Second, thank you very much for your detailed and valuable feedback! I have updated the code to address all your concerns: 1. **Resolved testability regression**: Removed `gomonkey` entirely. Switched to package-level variable reassignment combined with `t.Cleanup()` for dependency injection. This ensures test stability without requiring specific compiler flags (`-gcflags="-l"`). 2. **Added missing test cases**: - Added coverage for `REPLACE INTO` executed via `ExecWithValue`. - Added test cases to verify that the statement *passes through* correctly when outside a global transaction (`isGlobalTx == false`). **Does this PR introduce a user-facing change?**: ```release-note NONE -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
