怀疑是BUG 十分严重,希望尽快解决 返回

SqlSugar
3 410
该叫什么 Mr.An 发布于2022/1/15
悬赏:0 飞吻

升级到支持分表的版本就出现了该bug


image.png


详细错误信息


2022-01-15 08:01:23.7467 ERROR  

======================================================================

url:http://localhost/article/83c1ac18093.html

exceptionThere is already an open DataReader associated with this Connection which must be closed first.

exceptionMySql.Data.MySqlClient.MySqlException (0x80004005): There is already an open DataReader associated with this Connection which must be closed first.

   at SqlSugar.AdoProvider.GetDataReader(String sql, SugarParameter[] parameters)

   at SqlSugar.QueryableProvider`1.GetData[TResult](KeyValuePair`2 sqlObj)

   at SqlSugar.QueryableProvider`1._ToList[TResult]()

   at SqlSugar.QueryableProvider`1.ToList()

   at ***.Controllers.DetailController.Index(String Skey) in D:\******\Controllers\DetailController.cs:line 18

   at lambda_method(Closure , Object , Object[] )

   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()

--- End of stack trace from previous location where exception was thrown ---

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()

--- End of stack trace from previous location where exception was thrown ---

   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

======================================================================

  ResourceInvoker.InvokeNextResourceFilter => ResourceInvoker.Next => ExceptionFilter.OnException 


热忱回答3

  • Mr.An Mr.An VIP0
    2022/1/15

    目前 SqlSugarCoreNoDrive 回退到了 5.0.2.8 版本,一切恢复正常

    0 回复
  • fate sta fate sta VIP0
    2022/1/15

    看升级指南吧,并非BUG只是移除了sqlsugarsclient不完整的线程安全支持,你可以将sqlsugarclient换成 sqlsugarscope  并且将sqlsugarscope  设为单例解决你的问题

    0 回复
  • Mr.An Mr.An VIP0
    2022/1/15

    @fate sta:好的,那应该是我没好好看文档

    0 回复