You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm testing different database providers (as part of linq2db/linq2db#2643 feature implementation) and observe 3 behaviors:
provider doesn't allow multiple open data readers for connection
provider allow multiple open data readers for connection using same command object (AdoNetCore.AseClient falls here)
provider allow multiple open data readers for connection using separate command object per data reader (includes also all providers from previous entry)
But for AdoNetCore.AseClient there is one inconsistency (not observed for other ADO.NET providers) - it doesn't allow command disposal if data reader is still active:
System.ObjectDisposedException: Cannot access a disposed object.
at AdoNetCore.AseClient.AseCommand.get_Connection() in C:\gitprojects\AdoNetCore.AseClient_master\src\AdoNetCore.AseClient\AseCommand.cs:line 331
at AdoNetCore.AseClient.AseDataReader.EnsureSchemaTable() in C:\gitprojects\AdoNetCore.AseClient_master\src\AdoNetCore.AseClient\AseDataReader.cs:line 534
at AdoNetCore.AseClient.AseDataReader.GetSchemaTable() in C:\gitprojects\AdoNetCore.AseClient_master\src\AdoNetCore.AseClient\AseDataReader.cs:line 516
at LinqToDB.DataProvider.DataProviderBase.IsDBNullAllowed(IDataReader reader, Int32 idx) in c:\GitHub\linq2db\Source\LinqToDB\DataProvider\DataProviderBase.cs:line 283
As you can see from stack trace, data reader tries to access command from internal call to GetSchemaTable API and fails due command being already disposed.
I think it makes sense to refactor it to not fail this scenario.
Environment
AdoNetCore.AseClient nuget package version : 0.18.0
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm testing different database providers (as part of linq2db/linq2db#2643 feature implementation) and observe 3 behaviors:
AdoNetCore.AseClient
falls here)But for
AdoNetCore.AseClient
there is one inconsistency (not observed for other ADO.NET providers) - it doesn't allow command disposal if data reader is still active:As you can see from stack trace, data reader tries to access command from internal call to
GetSchemaTable
API and fails due command being already disposed.I think it makes sense to refactor it to not fail this scenario.
Environment
AdoNetCore.AseClient
nuget package version : 0.18.0The text was updated successfully, but these errors were encountered: