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

Parameter prefix being swapped between ":" and "@" carrying over to other concurrently generated queries. [DNET974] #893

Closed
firebird-automations opened this issue Oct 8, 2020 · 8 comments

Comments

@firebird-automations
Copy link

Submitted by: Benjamyn Williams (ben_williams)

Duplicates DNET945

Error is described in this "Resolved" issue DNET945
Critical as this is affecting medical information.

This is an error with concurrent query generation due to the changing of sqlGenerationHelper.ParameterNameMarker in the DbUpdateSqlGenerator within methods AppendUpdateOperation and AppendDeleteOperation when queries are being constructed concurrently.
This has caused mismatches between parameters and the query text where the query would be referring to "@p0" while the parameters object has ":p0".

This needs to be solved so that changing the ParameterNameMarker for named parameters will not affect other concurrent query generation.

Confirmed this by redirecting those particular parts (extracting the internal methods that EF uses) to a new version of sqlGenerationHelper (As it required no dependencies) with ":" instead of using the current one.
The test project on the previous issue was able to replicate this.

@firebird-automations
Copy link
Author

Modified by: Benjamyn Williams (ben_williams)

description: Error is described in this "Resolved" issue DNET945
Critical as this is affecting medical information.

This is an error with concurrent query generation due to the changing of sqlGenerationHelper.ParameterNameMarker in the singleton DbUpdateSqlGenerator within methods AppendUpdateOperation and AppendDeleteOperation when queries are being constructed concurrently.
This has caused mismatches between parameters and the query text where the query would be referring to "@p0" while the parameters object has ":p0".

This needs to be solved so that changing the ParameterNameMarker for named parameters will not affect other concurrent query generation.

Confirmed this by redirecting those particular parts (extracting the internal methods that EF uses) to a new version of sqlGenerationHelper (As it required no dependencies) with ":" instead of using the current one.
The test project on the previous issue was able to replicate this.

=>

Error is described in this "Resolved" issue DNET945
Critical as this is affecting medical information.

This is an error with concurrent query generation due to the changing of sqlGenerationHelper.ParameterNameMarker in the DbUpdateSqlGenerator within methods AppendUpdateOperation and AppendDeleteOperation when queries are being constructed concurrently.
This has caused mismatches between parameters and the query text where the query would be referring to "@p0" while the parameters object has ":p0".

This needs to be solved so that changing the ParameterNameMarker for named parameters will not affect other concurrent query generation.

Confirmed this by redirecting those particular parts (extracting the internal methods that EF uses) to a new version of sqlGenerationHelper (As it required no dependencies) with ":" instead of using the current one.
The test project on the previous issue was able to replicate this.

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Link: This issue duplicates DNET945 [ DNET945 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => Closed [ 6 ]

resolution: Duplicate [ 3 ]

@firebird-automations
Copy link
Author

Commented by: Benjamyn Williams (ben_williams)

Thanks for closing the issue however the other issue is marked as "Resolved" but according to the newest commit #⁠b99133fbb03c0ebb1190ac6b741a4d2b6f1e90ea on the master branch this has not been fixed at all.

@firebird-automations
Copy link
Author

Commented by: Benjamyn Williams (ben_williams)

My mistake, it's resolved on https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient not on https://github.com/FirebirdSQL/NETProvider

@firebird-automations
Copy link
Author

Commented by: @cincuranet

It's also in https://github.com/FirebirdSQL/NETProvider now.

@firebird-automations
Copy link
Author

Commented by: Benjamyn Williams (ben_williams)

Could we get a preview Nuget release? (Currently we are using our TC to build from the repo to our personal nuget however an official one would be good)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants