Skip to content

Reuse parameter index for all case permutations #5432

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

Merged
merged 1 commit into from
Nov 21, 2023
Merged

Conversation

NinoFloris
Copy link
Member

@NinoFloris NinoFloris commented Nov 21, 2023

Fixes #5428

Given we bind before we write, and reset all the bind info after writing we can't have multiple param indices pointing to the same parameter instance.

This is already guarded against for positional via the NpgsqlParameterCollection ownership check (can't add the same instance twice as it's already part of a collection). While for multiple same cased name references we already folded those to the same index.

@NinoFloris NinoFloris marked this pull request as ready for review November 21, 2023 13:57
@NinoFloris NinoFloris merged commit aebf620 into main Nov 21, 2023
@NinoFloris NinoFloris deleted the fix-parameter-reuse branch November 21, 2023 14:15
NinoFloris added a commit that referenced this pull request Nov 21, 2023
JonasWestman pushed a commit to monitor-erp/npgsql that referenced this pull request Dec 20, 2023
Fixes npgsql#5428

(cherry picked from commit aebf620)
Signed-off-by: monjowe <jonas.westman@monitor.se>
JonasWestman pushed a commit to monitor-erp/npgsql that referenced this pull request Dec 21, 2023
Fixes npgsql#5428

(cherry picked from commit aebf620)
Signed-off-by: monjowe <jonas.westman@monitor.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Missing type info or binding info" when referencing parameters with different casings (Regression 8.0)
2 participants