MySqlConnector icon indicating copy to clipboard operation
MySqlConnector copied to clipboard

Add UseProcedureCache option and documentation. Fixes #1175

Open tarasevichvlad opened this issue 11 months ago • 2 comments
trafficstars

@bgrainger What do you think about this changes. This is implementation for second idea in #1175 issue.

Currently without tests.

tarasevichvlad avatar Dec 16 '24 18:12 tarasevichvlad

The connection string changes look fine.

I think the change to FillAsync isn't appropriate, as we do actually want CachedProcedure information for AlignParamsWithDb later on. Instead, we might want to make ConnectionPool.GetProcedureCache return null if procedure caching is disabled. But even then we wouldn't want to cache the procedure (even on the MySqlConnection) beyond the lifetime of the ExecuteXyz call. (And we would also need to update logging so it doesn't log incorrect messages about what is happening.)

Sorry I don't have more specific guidance yet; I haven't looked into the details of how to solve this problem.

bgrainger avatar Dec 19 '24 04:12 bgrainger

@bgrainger I took a closer look at the places where parameter caching is used for procedures and made some changes. If you have time, please look at additional edits to support this feature.

tarasevichvlad avatar Dec 21 '24 19:12 tarasevichvlad