tachibana22 opened a new pull request, #1133:
URL: https://github.com/apache/incubator-seata-go/pull/1133

   - [x] I have registered the PR 
[changes](https://github.com/apache/incubator-seata-go/tree/master/changes).
   
   **What this PR does**:
   This PR systematically enhances Seata-Go's AT mode to support handling 
tables with composite (joint) primary keys. 
   
   Key changes include:
   1. **Metadata & Index Order Consistency**: Added `ORDER BY SEQ_IN_INDEX ASC` 
in MySQL trigger index parsing to enforce deterministic primary key ordering 
based on physical database definition[cite: 21]. Fixed a bug in `meta.go` where 
composite PK types incorrectly overwrote each other[cite: 21].
   2. **Insert Executor Enhancements**: Fixed after-image SQL building logic in 
`insert_executor.go` by properly grouping multi-column primary keys per row 
instead of treating them as isolated entries[cite: 21]. Expanded 
`canAutoIncrement` to allow auto-increment logic on composite key 
combinations[cite: 21].
   3. **Order-Independent Comparison**: Rewrote `rowListToMap` in `utils.go` to 
safely decouple from SQL result set row shuffling, generating predictable, 
sorted composite row keys (`tenant_id_##$$_id`)[cite: 21].
   4. **Undo Execution Param Alignment**: Aligned the exact value sequence 
passed into execution placeholders with the structured primary key definitions 
in `mysql_undo_insert_executor.go`[cite: 21].
   5. **Test Coverage**: Added comprehensive test cases for composite PK 
situations across all modified units[cite: 21].
   
   **Which issue(s) this PR fixes**:
   Fixes #1131
   
   **Special notes for your reviewer**:
   The core infrastructure updates (e.g., `GetPrimaryKeyOnlyName`, 
`rowListToMap`) automatically stabilize other AT-mode executors (`update`, 
`delete`, `select_for_update`) that share these common utility 
dependencies[cite: 1, 7, 11, 14, 17, 21].
   
   **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]

Reply via email to