mysql
mysql copied to clipboard
missed ADDR in formated dsn when Net is not setted or is emtpy string
Issue description
In code, when we don't set up Net, the ADDR disappeared in formated DSN. and if we set Net to an empty string, this behavior can be seen as well.
Configuration
Driver version (or git SHA): github.com/go-sql-driver/mysql v1.6.0
Go version: go version go1.17.5 Linux/amd64
Server version: MySQL 8
Server OS: Ubuntu 20.04.2 LTS
Please submit a program that reproduces your issue.
Here is a template on the Go Playground: https://go.dev/play/p/3aQum7ZrIMM