[MDEV-26607] Information schema not accessable in C# using MySql connector Created: 2021-09-14  Updated: 2021-09-15

Status: Open
Project: MariaDB Server
Component/s: Information Schema
Affects Version/s: 10.6.4
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Andreas Lennartz Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: regression-10.6
Environment:

C# / ADO.NET (.NET 5.0)
MySql connector 8.0.X


Attachments: Text File Program.cs     PNG File image-2021-09-14-19-19-42-202.png    
Issue Links:
Problem/Incident
is caused by MDEV-8334 Rename utf8 to utf8mb3 Closed
Relates
relates to MDEV-26105 MariaDB 10.6 cannot be used from C# c... Closed
relates to MDEV-26605 Creating table with primary key const... Open

 Description   

I am using C# (.NET 5.0) and the MySql connector (8.0.26) to query the information schema about database details. This worked fine with MariaDb 10.5

With MariaDb 10.6.4, I get an exception that utf8mb3 is not supported whenever I try to query anything from the information schema.
Here is an example code to reproduce the issue:

string sql = $@"SELECT SCHEMA_NAME FROM `information_schema`.`SCHEMATA` ";
MySqlCommand cmd = new MySqlCommand(sql, conn);
var reader = cmd.ExecuteReader();

This worked fine on MariaDb 10.5

See the attached file for the full example code. The MySql connector does not support uft8mb3 anymore. (It is deprecated by Oracle/MySql and won't be supported in the future).

I guess this issue is related to the fact that the information schema has now the collation uft8mb3 by default. I tried to configure my server that Uft8mb4 is the default collation for all databases, but I can't change the collation for the information schema:


Generated at Thu Feb 08 09:46:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.