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

New UUID column type values don't round-trip in binary charset mode

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Confirmed (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.7.1
    • Fix Version/s: 10.7
    • Component/s: Data types
    • Labels:
    • Environment:
      Ubuntu 20.04

      Description

      The new UUID column type accepts input in multiple formats as documented, but always outputs back in the usual 36-character dashed format. This is great for compatibility IMHO.

      However, I'm finding that these values don't round-trip correctly if the client has used `mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, "binary");` or more specifically has used `SET character_set_connection = 'binary';`

      Under this condition I get the error `ERROR 1292 (22007): Incorrect uuid value: 'c26ae0c4-b071-4058-9044-92042d6740fc' for column `ks_test`.`misctbl`.`uuidfield` at row 1`

      Although it is possible to work around by providing the value in the more packed `X'c26ae0c4b0714058904492042d6740fc'` format, I believe this is a bug because no other column type has this behavior. To my knowledge, all other values round-trip in binary charset mode without conversion (which is why my utility uses it) - whatever the SELECT returns will INSERT again.

        Attachments

          Activity

            People

            Assignee:
            bar Alexander Barkov
            Reporter:
            will.bryant Will Bryant
            Votes:
            0 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.