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: incorrect assumptions about parameter names #60577

Open
mikerobi opened this issue Jun 2, 2023 · 1 comment
Open

database/sql: incorrect assumptions about parameter names #60577

mikerobi opened this issue Jun 2, 2023 · 1 comment
Labels
FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@mikerobi
Copy link

mikerobi commented Jun 2, 2023

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

go1.20.4 windows/amd64

Does this issue reproduce with the latest release?

yes

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

N/A

What did you do?

reviewed the function validateNamedValueName in go/src/database/sql/convert.go

What did you expect to see?

The function does not make the incorrect assumption that procedure parameters always start with a letter.

What did you see instead?

The function should not reject valid parameter names.

For example, $foo, and #bar are valid stored procedure parameters in SQL Server.

This means that the function needs to support all valid parameter names (which is unknowable), or should be eliminated.

I believe it acceptable to not perform a check and leave it to the database to generate an error.

@mknyszek mknyszek changed the title affected/package: sql incorrect assumptions about parameter names database/sql: incorrect assumptions about parameter names Jun 2, 2023
@mknyszek mknyszek added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 2, 2023
@mknyszek mknyszek added this to the Backlog milestone Jun 2, 2023
@mknyszek
Copy link
Contributor

mknyszek commented Jun 2, 2023

CC @bradfitz @kardianos @kevinburke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

2 participants