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

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.7.1
    • 10.11
    • Data types
    • 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

            bar Alexander Barkov
            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.