MySqlConnector icon indicating copy to clipboard operation
MySqlConnector copied to clipboard

Support MySqlCommandBuilder.DeriveParameters for MySQL Server 5.0

Open dxmi opened this issue 3 years ago • 2 comments
trafficstars

Is your feature request related to a problem? Please describe. We need support for legacy MySQL Server 5.0 similar to the level the MySql.Data provides.

Specifically, we use the MySql.Data.MySqlClient.MySqlCommandBuilder.DeriveParameters method to obtain the schema of a stored procedure.
The MySqlConnector.MySqlCommandBuilder.DeriveParameters throws an exception for server versions less than 5.5.3 due to the absence of "information_schema.routines".

Describe the solution you'd like As I see, some fallback code using "mysql.proc" already exists in the CachedProcedure.FillAsync method. Use this code to derive parameters instead of throwing an exception.

Describe alternatives you've considered We'd like to avoid re-implementing procedure parameter parsing on our side.

dxmi avatar Feb 02 '22 16:02 dxmi

If you'd like to open a PR to add the support you need (with code that is entirely your original contribution and able to be licensed to this project), I'd be happy to review it.

bgrainger avatar Feb 02 '22 21:02 bgrainger

(It looks like the earliest-available MySQL Docker image is mysql:5.5.40, which would make developing and testing this difficult.)

bgrainger avatar Feb 02 '22 22:02 bgrainger