Skip to content

MySqlDataReader.GetSchemaTable() behavior change in 0.57.0 #722

@MaceWindu

Description

@MaceWindu

in linq2db we use following code to read procedure results schema to be able to generate mappings from existing database:

cmd.CommandText = "<procedure_name>";
cmd.CommandType = CommandType.StoredProcedure;
//cmd.Parameters.Add(...);
var table = cmd.ExecuteReader(CommandBehavior.SchemaOnly).GetSchemaTable();
// reverse resultset schema from table

For MySqlConnector it always returned null for procedures, that doesn't return any resultsets but have output parameters.
Starting from version 0.57 for such procedures it started to return schema table with:

  • row with name "\ue001\b\v" (probably came from MySql itself?)
  • rows for each output parameter

Now is question - is it expected breaking change or bug? From API point of view I would say it's a bug, because there is no resultsets in SQL terms. BUT. MySql.Data was doing same thing for a long time and we even have detection logic for it:
https://github.com/linq2db/linq2db/blob/master/Source/LinqToDB/DataProvider/MySql/MySqlSchemaProvider.cs#L279-L283

Anyway I will update this condition in our code to check if schema table have columns with "\ue001\b\v" name.

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