Skip to content

HA DSN parsing fails with Go 1.26 #1784

@M0rdecay

Description

@M0rdecay

Code example

With Go 1.25 - HA URL parsed successfully
With Go 1.26 - HA URL parsing fails

Minimalistic example:

package main

import (
	"fmt"
	"net/url"
)

func main() {
	result, err := url.Parse("clickhouse://host1:9440,host2:9440/database")
	fmt.Printf("%#v", result)
	fmt.Printf("%v", err)
}

Affected code - https://github.com/ClickHouse/clickhouse-go/blob/main/clickhouse_options.go#L185

Related issue - golang/go#75859

Related changes in Go src - golang/go@e3be2d1

Details

Environment

  • clickhouse-go version: 2.34.0, but the latest one is also affected
  • Interface: ClickHouse API / database/sql compatible driver
  • Go version: 1.26.0
  • Operating system:
  • ClickHouse version:
  • Is it a ClickHouse Cloud?
  • ClickHouse Server non-default settings, if any:
  • CREATE TABLE statements for tables involved:
  • Sample data for all these tables, use clickhouse-obfuscator if necessary

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions