dotConnect for MySQL procedure call exception from Entity Framework 6 with build > 8.6.714.0

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
dpursanov
Posts: 10
Joined: Wed 16 Nov 2016 12:44

dotConnect for MySQL procedure call exception from Entity Framework 6 with build > 8.6.714.0

Post by dpursanov » Wed 16 Nov 2016 12:50

Something is broken with the latest builds.. I've found that on builds > 8.6.714.0 in case you call procedure WITHOUT parameters(stored procedure in MySql without parameters) we get exception:
Can not the describe procedure PROCEDURENAME. You do not have enough privileges to get object metadata.
Here is sample exception:
System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> System.InvalidOperationException: Can not the describe procedure PROCEDURENAME. You do not have enough privileges to get object metadata.
at Devart.Data.MySql.MySqlCommand.DescribeProcedure(String name)
at Devart.Data.MySql.MySqlCommandBuilder.DeriveParameters(MySqlCommand command)
at Devart.Data.MySql.Entity.ai.a()
at Devart.Data.MySql.Entity.ai.a(CommandBehavior A_0)
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
--- End of inner exception stack trace ---
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
at System.Data.Entity.Core.Objects.ObjectContext.CreateFunctionObjectResult[TElement](EntityCommand entityCommand, ReadOnlyCollection`1 entitySets, EdmType[] edmTypes, ExecutionOptions executionOptions)
at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass47`1.<ExecuteFunction>b__46()
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass47`1.<ExecuteFunction>b__45()
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteFunction[TElement](String functionName, ExecutionOptions executionOptions, ObjectParameter[] parameters)
......
Can not the describe procedure PROCEDURENAME. You do not have enough privileges to get object metadata. at Devart.Data.MySql.MySqlCommand.DescribeProcedure(String name)
at Devart.Data.MySql.MySqlCommandBuilder.DeriveParameters(MySqlCommand command)
at Devart.Data.MySql.Entity.ai.a()
at Devart.Data.MySql.Entity.ai.a(CommandBehavior A_0)
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
In case i deploy the version 8.6.714.0 of all the components (Devart.Data.MySql, Devart.Data, Devart.Data.MySql.Entity.EF6) - the error disappears.

Is this a known bug or I need to deploy differently in case of MySQL with entity framework for latest builds of dotConnect?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: dotConnect for MySQL procedure call exception from Entity Framework 6 with build > 8.6.714.0

Post by Shalex » Thu 17 Nov 2016 13:46

Looks like the issue is caused by the following fix:
8.6.729 01-Sep-16
The bug with calling the function without IN parameters is fixed

We have reproduced the error when a database user with limited privileges is used in a connection string. We will investigate the question and notify you about the result.

dpursanov
Posts: 10
Joined: Wed 16 Nov 2016 12:44

Re: dotConnect for MySQL procedure call exception from Entity Framework 6 with build > 8.6.714.0

Post by dpursanov » Thu 17 Nov 2016 14:23

Ok, thats nice that the bug was easily reproducible and will be fixed. Hope to see the new build soon, thanks!

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: dotConnect for MySQL procedure call exception from Entity Framework 6 with build > 8.6.714.0

Post by Shalex » Fri 09 Dec 2016 19:11

The bug with requesting extra privileges when preparing stored procedure is fixed: viewtopic.php?f=2&t=34691.

Post Reply