Skip to content

Commit

Permalink
release 0.108.2
Browse files Browse the repository at this point in the history
  • Loading branch information
stfnmllr committed Sep 17, 2022
1 parent 44b838e commit a09ea5e
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 7 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,15 @@ tools:
go install golang.org/x/lint/golint@latest
#install staticcheck
@echo "install latest staticcheck version"
go install honnef.co/go/tools/cmd/staticcheck@latest

go install honnef.co/go/tools/cmd/staticcheck@latest

#install additional go versions
go:
go install golang.org/dl/go1.17.13@latest
go1.17.13 download
go install golang.org/dl/go1.18.5@latest
go1.18.5 download

#install fsfe reuse tool (https://git.fsfe.org/reuse/tool)
# pre-conditions:
# - Python 3.6+
Expand Down
6 changes: 6 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ Release Notes

## Release 0.108

Release 0.108.2 (upgrade urgency: high)

- Fixed hdb version parsing error using HANA v1
- Fixed some comments and error message texts
- Enhanced makefile to install further go versions

Release 0.108.1 (upgrade urgency: medium)

- Fixed driver.Decimal conversion overflow error
Expand Down
2 changes: 1 addition & 1 deletion driver/atomicBool1.18.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//
// SPDX-License-Identifier: Apache-2.0

// Delete after go1.17 is out of maintenance.
// Delete after go1.18 is out of maintenance.

package driver

Expand Down
13 changes: 12 additions & 1 deletion driver/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ func initConn(ctx context.Context, metrics *metrics, attrs *connAttrs, auth *p.A
return nil, fmt.Errorf("invalid session id %d", c.sessionID)
}

c.hdbVersion = parseVersion(c.serverOptions[p.CoFullVersionString].(string))
c.hdbVersion = parseVersion(c.versionString())

if attrs._defaultSchema != "" {
if _, err := c.ExecContext(ctx, strings.Join([]string{setDefaultSchema, Identifier(attrs._defaultSchema).String()}, " "), nil); err != nil {
Expand All @@ -383,6 +383,17 @@ func initConn(ctx context.Context, metrics *metrics, attrs *connAttrs, auth *p.A
return c, nil
}

func (c *conn) versionString() (version string) {
v, ok := c.serverOptions[p.CoFullVersionString]
if !ok {
return
}
if s, ok := v.(string); ok {
return s
}
return
}

func (c *conn) isBad() bool {
switch {

Expand Down
2 changes: 1 addition & 1 deletion driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

// DriverVersion is the version number of the hdb driver.
const DriverVersion = "0.108.1"
const DriverVersion = "0.108.2"

// DriverName is the driver name to use with sql.Open for hdb databases.
const DriverName = "hdb"
Expand Down
4 changes: 2 additions & 2 deletions driver/internal/protocol/auth/x509.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ func decodeClientCert(data []byte) ([]*pem.Block, error) {
}
switch {
case blocks == nil:
return nil, errors.New("invalid client cert")
return nil, errors.New("invalid client certificate")
case len(blocks) < 1:
return nil, fmt.Errorf("invalid number of blocks in cert file %d - expected min 1", len(blocks))
return nil, fmt.Errorf("invalid number of blocks in certificate file %d - expected min 1", len(blocks))
}
return blocks, nil
}
Expand Down

0 comments on commit a09ea5e

Please sign in to comment.