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
In my running web app, call MySqlCommandBuilder.DeriveParametersAsync to get parameters of an **nonexistent ** stored procedure, then I get a MySqlException which its message is ""Procedure or function 'ABC' cannot be found in database 'XYZ'."
I deploy the stored procedure 'ABC' to the database 'XYZ' while the web app is running
Call MySqlCommandBuilder.DeriveParametersAsync to get parameters of stored procedure 'ABC' again and still get the exception
Restart my web app, and the exception is gone
It seems the cachedProcedure should be checked if it's null before storing it in cachedProcedures
null needs to be stored in cachedProcedures as an optimisation for DB server versions that don't support retrieving parameter metadata. (Otherwise, overhead is incurred on every stored procedure execution.)
But it seems that DeriveParameters could always revalidate the stored procedure since this is an explicit action by the user.
bgrainger
changed the title
MySqlException with the message as "Procedure or function '{0}' cannot be found in database '{1}'." was thrown when deriving parameters of s stored procedure
DeriveParameters caches missing stored procedures
Oct 23, 2019
These are my steps to reproduce the issue:
MySqlCommandBuilder.DeriveParametersAsync
to get parameters of an **nonexistent ** stored procedure, then I get aMySqlException
which its message is ""Procedure or function 'ABC' cannot be found in database 'XYZ'."MySqlCommandBuilder.DeriveParametersAsync
to get parameters of stored procedure 'ABC' again and still get the exceptionIt seems the
cachedProcedure
should be checked if it's null before storing it incachedProcedures
The text was updated successfully, but these errors were encountered: