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

COLUMN_CREATE unicode name breakage

Details

    • 10.2.11

    Description

      Possibly related to MDEV-461.

      When calling column_create with names set to utf8, one can successfully
      encode an emoji that takes 4 bytes in utf-8:

      adamj@localhost [1]> set names utf8;
      adamj@localhost [2]> select column_json(column_create('��', 1));
      +---------------------------------------+
      | column_json(column_create('��', 1))     |
      +---------------------------------------+
      | {"��":1}                                |
      +---------------------------------------+

      However if the connection is set to utf8mb4 this actually fails,
      counter-intuitively:

      adamj@localhost [3]> set names utf8mb4;
      adamj@localhost [4]> select column_json(column_create('��', 1));
      +------------------------------------+
      | column_json(column_create('?', 1)) |
      +------------------------------------+
      | {"?":1}                            |
      +------------------------------------+
       
      adamj@localhost [5]> select column_list(column_create('��', 1));
      +------------------------------------+
      | column_list(column_create('?', 1)) |
      +------------------------------------+
      | `?`                                |
      +------------------------------------+

      Other unicode characters work fine though:

      adamj@localhost [6]> select column_list(column_create('❤', 1));
      +--------------------------------------+
      | column_list(column_create('❤', 1))   |
      +--------------------------------------+
      | `❤`                                  |
      +--------------------------------------+

      Attachments

        Activity

          Transition Time In Source Status Execution Times
          Elena Stepanova made transition -
          Open Confirmed
          4d 8h 57m 1
          Oleksandr Byelkin made transition -
          Confirmed In Progress
          748d 15h 19m 1
          Oleksandr Byelkin made transition -
          Stalled In Progress
          6d 5h 19m 1
          Oleksandr Byelkin made transition -
          In Progress Stalled
          18h 33m 2
          Oleksandr Byelkin made transition -
          Stalled In Review
          3m 52s 1
          Alexander Barkov made transition -
          In Review Stalled
          18h 32m 1
          Oleksandr Byelkin made transition -
          Stalled Closed
          37m 17s 1

          People

            sanja Oleksandr Byelkin
            adamchainz Adam Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.