diff --git a/CHANGELOG.md b/CHANGELOG.md index 6772bb342..00c93592a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v3.95.6 +* Fixed panic on span reporting in `xsql/Tx` + ## v3.95.5 * Fixed goroutine leak on failed execute call in query client diff --git a/internal/xsql/legacy/tx.go b/internal/xsql/legacy/tx.go index 7aba57197..a1ec1fdf1 100644 --- a/internal/xsql/legacy/tx.go +++ b/internal/xsql/legacy/tx.go @@ -20,6 +20,10 @@ type transaction struct { } func (tx *transaction) ID() string { + if tx.tx == nil { + return "" + } + return tx.tx.ID() } diff --git a/internal/xsql/tx.go b/internal/xsql/tx.go index 35a395e78..1f9f386b9 100644 --- a/internal/xsql/tx.go +++ b/internal/xsql/tx.go @@ -18,6 +18,10 @@ type Tx struct { } func (tx *Tx) ID() string { + if tx.tx == nil { + return "" + } + return tx.tx.ID() }