-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Possible copy-paste mistake in SqlConnection introduced by AAD Authentication work #28254
Comments
From what I can see I think this means there will be a lot of connection pool misses. Is that what you're seeing? lots of new connection throughput? |
I haven't switched that part of our code to CoreFX yet, so I don't know the impact. I created this issue to ensure it's being tracked, seeing as there's a lack of response in the PR itself. |
Tagging @afsanehr @keeratsingh since as you point out, this already got into 2.2 bits so we should move quickly if it's going to cause a problem. |
Replied dotnet/corefx#31039 (comment) based on the code in NetFx at https://github.com/Microsoft/referencesource/blob/master/System.Data/System/Data/SqlClient/SqlConnection.cs Impact of this bug based on my understanding of the area:
We should consider this for servicing. |
Maybe it's fortunate then that few people have consumed this change yet, due to our bug: dotnet/corefx#33697 |
These don't cause a problem because they're all in dead code. All three ChangePassword overloads have no callers other than themselves. I've just commented them out and compiled the library just fine. The three real call sites through Connection_Set all pass both credential and token references are expected. So it looks buggy but isn't. |
@Wraith2 It is buggy. You dont see any callers because these are public APIs |
Which also means that we don't have tests for these APIs |
Oh, that's a weird api. a static method that changes a connection string parameter password and affects the pool at the same time. |
@steji113 and @stijnherreman Thanks for pointing this out. |
@saurabh500 absolutely, I should have thought to just open an issue initially. I also thought it seemed like it indicated a testing gap, as well. Thanks for the evaluation! |
@stijnherreman thanks again. |
I am going to close this since the fix is now both in master and Release/2.2 branch. Thank you @stijnherreman for finding this issue 👍 |
Fixed in 3.0 in PR dotnet/corefx#34268. |
The work done for #19366 may have introduced a copy-paste mistake in
SqlConnection
. The change is present in the already released 2.2 (see dotnet/corefx#31039) and the planned release 3.0 (see dotnet/corefx#30342).The possible mistake was noticed by @steji113 in the 2.2 PR. It appears that the change at https://github.com/dotnet/corefx/pull/31039/files#diff-78c5752d4a8ee85fdc3593a8851c86e9L1363 was copied to https://github.com/dotnet/corefx/pull/31039/files#diff-78c5752d4a8ee85fdc3593a8851c86e9L1406 and https://github.com/dotnet/corefx/pull/31039/files#diff-78c5752d4a8ee85fdc3593a8851c86e9L1444
Was this change meant to be done, or is it a mistake?
The text was updated successfully, but these errors were encountered: