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

TINYTEXT CHARACTER SET utf8 COMPRESSED truncates data

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.3
    • Fix Version/s: 10.3.7
    • Component/s: Server
    • Labels:
      None

      Description

      I insert an latin1 string consisting of 250 ASCII characters in two TINYTEXT columns (compressed and non-compressed) with CHARACTER SET utf8. The compressed column truncates data. The non-compressed column writes the entire value, as expected:

      SET sql_mode='';
      CREATE OR REPLACE TABLE t1(
        a TINYTEXT CHARACTER SET utf8 COMPRESSED,
        b TINYTEXT CHARACTER SET utf8
      );
      INSERT INTO t1 VALUES (REPEAT(_latin1'a',250), REPEAT(_latin1'a',250));
      SELECT CHAR_LENGTH(a), CHAR_LENGTH(b) FROM t1;
      

      +----------------+----------------+
      | CHAR_LENGTH(a) | CHAR_LENGTH(b) |
      +----------------+----------------+
      |             84 |            250 |
      +----------------+----------------+
      

      Looks wrong. The expected behavior would be to write all 250 characters into both columns.

        Attachments

          Activity

            People

            Assignee:
            svoj Sergey Vojtovich
            Reporter:
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: