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

View cuts off the end of string with the utf8 character set in INSERT function

    XMLWordPrintable

Details

    Description

      Case:

      SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20));
      CREATE VIEW v1 AS SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20));
      SELECT * FROM v1;
      DROP VIEW v1;
      

      Expected that result for the first select and select from view will be the same but this is not so:
      Actual result:

      SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20));
      HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20))
      D120D18E
       
      SELECT * FROM v1;
      HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20))
      D120D1
      

      Expected result:

      SELECT * FROM v1;
      HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20))
      D120D18E
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              lstartseva Lena Startseva
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.