Skip to content

Commit

Permalink
handle error for xa exec context (#674)
Browse files Browse the repository at this point in the history
  • Loading branch information
smiletrl committed Mar 16, 2024
1 parent b254466 commit 72ca442
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/datasource/sql/conn_xa.go
Expand Up @@ -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
Expand Down

0 comments on commit 72ca442

Please sign in to comment.