-
Notifications
You must be signed in to change notification settings - Fork 286
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
Only check inexact match when no exact match is found. #668
Conversation
Is there a test case to verify the fix? |
Infact, I don't know how to create an test for this internal api. And maybe it's not a problem due to it's internal and there is no dupe tables with different case actually used by public apis. |
@yyjdelete it may be worth looking into this a little further and finding an actual user impact - since the current implementation does seem buggy. |
If it isn't testable but is clearly a fix I'm fine with merging it but testing does always need to be considered een though writing tests sucks. |
This bug would only surface if the embedded resource, Microsoft.Data.SqlClient.SqlMetaData.xml, contained multiple MetaDataCollections with a CollectionName differing only by case and the desired entry (case sensitive match) appeared before the undesired entry (case insensitive match). Testing the bug would be awkward. I'm fine with simply fixing the bug. Bonus points if a couple lines are added to TestGetSchema to test |
@David-Engel Lines 32 to 36 in 4258e4b
|
Fix dotnet/runtime#39620
The same as dotnet/runtime#39961
Avoid the exact match result be overwrite by later inexact ones.
This may not happen due to limited callsites, just make the code more clear.