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

incorrect charsetnr for utf8mb4

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not a Bug
    • 10.11.5, 10.11.6
    • N/A
    • Character Sets, Protocol
    • None
    • Windows Server 2019

    Description

      We're using a software that supports MySQL via its C connector library, version 5.7.25.

      We are using MariaDB version 10.11.6 but saw the problem also on 10.11.5.

      We have a table with several columns of type utf8mb4. The software retrieves column information using the C connector function mysql_fetch_field. For the utf8mb4 columns it returns MYSQL_FIELD.charsetnr == 33. This is apparently supposed to be the collation id, which they then lookup in INFORMATION_SCHEMA.COLLATIONS.

      The problem is that 33 is the id for collation utf8mb3_general_ci, i.e. charset utf8mb3, which is incorrect. Correct value would, in their tests with ci collation, be id 45, collation utf8mb4_general_ci.

      I'm afraid I know too little to be able to determine if this is even supposed to work, but I was under the impression that MariaDB is intended to be a fully compatible replacement to MySQL at the API level. I also know too little to be able to determine exactly where the problem lies (which component), but inspection the information in the information_schema tables, everything looks correct there, so I assume there's some problem at the api level.

      Attachments

        Activity

          People

            Unassigned Unassigned
            krilbe Kjell Rilbe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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