Store UserOptions in DbConnectionPool.PendingGetConnection#40342
Store UserOptions in DbConnectionPool.PendingGetConnection#40342stephentoub wants to merge 1 commit into
Conversation
|
This actually has people who know what's going on, /cc @David-Engel @maryamariyan @Wraith2. It definitely does look like this could be a bug. |
|
Also cc @cheenamalhotra. Microsoft.Data.SqlClient likely has a copy of the same code with the same potential bug. |
|
Thanks @divega I have ported over this change to Microsoft.Data.SqlClient. Strangely this issue also existed in NetFx source code, seems like a miss from long time. |
|
It seems to exist on every copy of the code (there a separate copy for each provider) in this repo. I think we need someone to dive a bit deeper to understand the ramifications of both the original (apparently buggy) code and of taking this change. |
|
I looked into the property usage and seems like this PR is not going to add any value, the userOptions property is passed all the way to DbConnectionFactory:L372 after which it disappears. Implementation in SqlClient also treats it as |
|
Ok. I'll close this... but if it's actually not going to add value, it would seem instead there's some dead code here to be deleted. |
@roji, is this worth fixing? It does seem like these were supposed to be stored such that they'd be passed through to subsequent operations, but this code has also been around for a very long time.