AsperforMias commented on code in PR #1136:
URL: 
https://github.com/apache/incubator-seata-go/pull/1136#discussion_r3542827558


##########
pkg/datasource/sql/exec/at/insert_executor.go:
##########
@@ -487,17 +487,25 @@ func (i *insertExecutor) getPkIndex(InsertStmt 
*ast.InsertStmt, meta types.Table
                return pkIndexMap
        }
        insertColumnsSize := len(InsertStmt.Columns)
-       if insertColumnsSize == 0 {
+       if meta.ColumnNames == nil {
                return pkIndexMap
        }
-       if meta.ColumnNames == nil {
+       if insertColumnsSize == 0 {
+               if len(InsertStmt.Lists) == 0 {
+                       return pkIndexMap
+               }
+               for idx, columnName := range meta.ColumnNames {
+                       if pkColumnName, ok := i.matchPKColumnName(columnName, 
meta); ok {
+                               pkIndexMap[pkColumnName] = idx
+                       }

Review Comment:
   done



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