Bug #105181 Empty result from MySqlConnection.GetSchema("Procedure Parameters") call.
Submitted: 9 Oct 2021 17:18 Modified: 19 Jan 2022 21:44
Reporter: Ilya Gunya Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:8.0.26, 8.0.27 OS:Windows
Assigned to: CPU Architecture:x86
Tags: GetSchema, NET

[9 Oct 2021 17:18] Ilya Gunya
Description:
When I do call GetSchema("Procedure Parameters") of MySqlConnection object, the returned table is empty. There is column names, but no rows.
Of course, MySqlConnection is connected, the string "Procedure Parameters" taken from GetSchema("MetaDataCollections") call. Other calls of GetSchema with other strings (such as "Tables", "Columns", "Users" and so on) works OK.

How to repeat:
There is C# sample:

static void Main(string[] args)
{
	using (MySqlConnection cnn = new MySqlConnection("server=localhost;user=root;database=testdb;password=1234567;"))
	{
		cnn.Open();

		Console.WriteLine("Procedure Parameters");
		ShowDataTable(cnn.GetSchema("Procedure Parameters"), 25);
		Console.WriteLine();
	}

	Console.WriteLine("Please press any key to exit...");
	Console.ReadKey();
}

private static void ShowDataTable(DataTable table, Int32 length)
{
	foreach (DataColumn col in table.Columns)
	{
		Console.Write("{0,-" + length + "}", col.ColumnName);
	}
	Console.WriteLine();

	foreach (DataRow row in table.Rows)
	{
		foreach (DataColumn col in table.Columns)
		{
			if (col.DataType.Equals(typeof(DateTime)))
				Console.Write("{0,-" + length + ":d}", row[col]);
			else if (col.DataType.Equals(typeof(Decimal)))
				Console.Write("{0,-" + length + ":C}", row[col]);
			else
				Console.Write("{0,-" + length + ":C}", row[col]);
		}
		Console.WriteLine();
	}
}
[15 Dec 2021 12:42] MySQL Verification Team
Hello Ilya Gunya,

Thank you for the bug report.
Verified as described.

Regards,
Ashwini Patil
[19 Jan 2022 21:44] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Connector/NET 8.0.29 release, and here's the proposed changelog entry from the documentation team:

When calling the GetSchema("Procedure Parameters") method of a
MySqlConnection object, the returned table included column names without
any rows representing the collection.

Thank you for the bug report.