Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

database/sql: blank driver name #44467

Open
mehmetcantas opened this issue Feb 20, 2021 · 1 comment · May be fixed by #44477
Open

database/sql: blank driver name #44467

mehmetcantas opened this issue Feb 20, 2021 · 1 comment · May be fixed by #44477
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@mehmetcantas
Copy link

What version of Go are you using (go version)?

$ go version
 1.16

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

Windows amd64

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Can\AppData\Local\go-build
set GOENV=C:\Users\Can\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\Can\go\pkg\mod
set GONOPROXY=github.com/mehmetcantas
set GONOSUMDB=github.com/mehmetcantas
set GOOS=windows
set GOPATH=C:\Users\Can\go
set GOPRIVATE=github.com/mehmetcantas
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.16
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\Can\AppData\Local\Temp\go-build2416388004=/tmp/go-build -gno-record-gcc-switches

What did you do?

I can pass empty string as name to database/sql/driver Register function.

What did you expect to see?

While creating a new driver for database/sql package, in the Register function name parameter should not be blank.

What did you see instead?

It's accept empty name for driver.

@seankhliao seankhliao added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 21, 2021
mehmetcantas added a commit to mehmetcantas/go that referenced this issue Feb 21, 2021
@gopherbot
Copy link

Change https://golang.org/cl/294809 mentions this issue: database/sql: add empty driver name check on Register method

@seankhliao seankhliao added this to the Backlog milestone Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants