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

Unexpected question mark in the end of a TINYTEXT column

    XMLWordPrintable

    Details

      Description

      The problem is repeatable with all versions from 10.2 to 10.7.

      CREATE OR REPLACE TABLE t1 (a TINYTEXT character set utf8) engine=myisam default charset=utf8;
      INSERT IGNORE INTO t1 VALUES (REPEAT(_utf8 0xD184, 250));
      SELECT LENGTH(a), CHAR_LENGTH(a), RIGHT(a,3) FROM t1;
      

      +-----------+----------------+------------+
      | LENGTH(a) | CHAR_LENGTH(a) | RIGHT(a,3) |
      +-----------+----------------+------------+
      |       255 |            128 | фф?        |
      +-----------+----------------+------------+
      

      Looks wrong. There should not be ? at the end. The expected result is:

      +-----------+----------------+------------+
      | LENGTH(a) | CHAR_LENGTH(a) | RIGHT(a,3) |
      +-----------+----------------+------------+
      |       254 |            127 | ффф        |
      +-----------+----------------+------------+
      

        Attachments

          Activity

            People

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