Skip to content

Panics with unix domain socket DSN #624

Closed

Description

@ttc0419

Reproducible Code

package main

import "github.com/XSAM/otelsql"

func main() {
	otelsql.AttributesFromDSN("username:password@unix(/tmp/mysql.sock)/mysql?parseTime=true")
}
panic: runtime error: slice bounds out of range [5:4]

goroutine 1 [running]:
github.com/XSAM/otelsql.AttributesFromDSN({0x104986dda, 0x3c})
        /u/!x!s!a!m/[email protected]/helpers.go:58 +0x3bc
main.main()
        /u/repro_otelsql_unix_socket_panic.go:6 +0x28
exit status 2

Activity

  1. added
    bug
    on Apr 15, 2026
  2. added a commit that references this issue on Apr 22, 2026
    42c7d8a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions