You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by zf...@apache.org on 2025/06/27 14:02:56 UTC

(incubator-seata-go) branch master updated: bugfix failed parsing table of delete sql (#850)

This is an automated email from the ASF dual-hosted git repository.

zfeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-seata-go.git


The following commit(s) were added to refs/heads/master by this push:
     new 8a243027 bugfix  failed parsing table of delete sql  (#850)
8a243027 is described below

commit 8a24302733fe120ee6505e2bf577ca9a2a9a3d3d
Author: lxfeng1997 <33...@users.noreply.github.com>
AuthorDate: Fri Jun 27 22:02:51 2025 +0800

    bugfix  failed parsing table of delete sql  (#850)
    
    bugfix delete sql of failed parsing table
---
 pkg/datasource/sql/exec/at/multi_delete_executor.go | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/pkg/datasource/sql/exec/at/multi_delete_executor.go b/pkg/datasource/sql/exec/at/multi_delete_executor.go
index 8ec3d258..8df78867 100644
--- a/pkg/datasource/sql/exec/at/multi_delete_executor.go
+++ b/pkg/datasource/sql/exec/at/multi_delete_executor.go
@@ -178,7 +178,13 @@ func (m *multiDeleteExecutor) buildBeforeImageSQL() (string, []driver.NamedValue
 		}
 		whereCondition += fmt.Sprintf("(%s)", string(whereBuffer.Bytes()))
 
-		newParams := m.buildSelectArgs(&ast.SelectStmt{Where: parser.DeleteStmt.Where}, m.execContext.NamedValues)
+		newParams := m.buildSelectArgs(&ast.SelectStmt{
+			Where:      deleteParser.Where,
+			From:       deleteParser.TableRefs,
+			Limit:      deleteParser.Limit,
+			OrderBy:    deleteParser.Order,
+			TableHints: deleteParser.TableHints,
+		}, m.execContext.NamedValues)
 		params = append(params, newParams...)
 	}
 


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org