Skip to content

DeriveParameters caches missing stored procedures #730

@nhathongly

Description

@nhathongly

These are my steps to reproduce the issue:

  1. 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'."
  2. I deploy the stored procedure 'ABC' to the database 'XYZ' while the web app is running
  3. Call MySqlCommandBuilder.DeriveParametersAsync to get parameters of stored procedure 'ABC' again and still get the exception
  4. 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

lock (cachedProcedures)
{
cachedProcedures[normalized.FullyQualified] = cachedProcedure;
count = cachedProcedures.Count;
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions