Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-26607

Information schema not accessable in C# using MySql connector

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.6.4
    • None
    • Information Schema
    • C# / ADO.NET (.NET 5.0)
      MySql connector 8.0.X

    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:

      Attachments

        1. image-2021-09-14-19-19-42-202.png
          48 kB
          Andreas Lennartz
        2. Program.cs
          0.9 kB
          Andreas Lennartz

        Issue Links

          Activity

            This isssue is resolved with the current stable version 11.4 (and perhaps also in potential previous versions)
            This ticket can be closed.

            andreas.lennartz Andreas Lennartz added a comment - This isssue is resolved with the current stable version 11.4 (and perhaps also in potential previous versions) This ticket can be closed.

            People

              Unassigned Unassigned
              andreas.lennartz Andreas Lennartz
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.