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

uuid data type - convert from text with binary data based on length

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • N/A
    • Data types
    • None

    Description

      text conversion to uuid data type is based on hex characters.

      binary data conversion is base on raw bytes.

      The case of a 16 byte string in a text data type is unambiguous and could be converted as raw bytes rather than the failed conversion below.

      MariaDB [(none)]> select cast(cast(x'00000000000000000000000000000001' as varchar(36)) as uuid);
      +------------------------------------------------------------------------+
      | cast(cast(x'00000000000000000000000000000001' as varchar(36)) as uuid) |
      +------------------------------------------------------------------------+
      | NULL                                                                   |
      +------------------------------------------------------------------------+
      1 row in set, 1 warning (0.000 sec)
       
      MariaDB [(none)]> show warnings;
      +---------+------+----------------------------------------------------------------------------------------------------------+
      | Level   | Code | Message                                                                                                  |
      +---------+------+----------------------------------------------------------------------------------------------------------+
      | Warning | 1292 | Incorrect uuid value: '\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0001' |
      +---------+------+----------------------------------------------------------------------------------------------------------+
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.