This is an automated email from the ASF dual-hosted git repository.
yixia 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 72ca4420 handle error for xa exec context (#674)
72ca4420 is described below
commit 72ca44201f6b884fa764ebff26675b7e2c704338
Author: smiletrl <[email protected]>
AuthorDate: Sat Mar 16 18:33:48 2024 +0800
handle error for xa exec context (#674)
---
pkg/datasource/sql/conn_xa.go | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pkg/datasource/sql/conn_xa.go b/pkg/datasource/sql/conn_xa.go
index c4767bcb..e5a002e9 100644
--- a/pkg/datasource/sql/conn_xa.go
+++ b/pkg/datasource/sql/conn_xa.go
@@ -102,7 +102,11 @@ func (c *XAConn) ExecContext(ctx context.Context, query
string, args []driver.Na
return types.NewResult(types.WithResult(ret)), nil
})
- return ret.GetResult(), err
+ if err != nil {
+ return nil, err
+ }
+
+ return ret.GetResult(), nil
}
// BeginTx like common transaction. but it just exec XA START
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]