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

VARCHAR COMPRESSED is created with a wrong length for multi-byte character sets

    XMLWordPrintable

    Details

      Description

      CREATE OR REPLACE TABLE t1 (a VARCHAR(1000) CHARACTER SET utf8 COMPRESSED);
      SHOW CREATE TABLE t1;
      

      +-------+--------------------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                                         |
      +-------+--------------------------------------------------------------------------------------------------------------------------------------+
      | t1    | CREATE TABLE `t1` (
        `a` varchar(999) /*!100301 COMPRESSED*/ CHARACTER SET utf8 DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
      +-------+--------------------------------------------------------------------------------------------------------------------------------------+
      

      Notice, the column was created with a wrong length.

        Attachments

          Activity

            People

            Assignee:
            bar Alexander Barkov
            Reporter:
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: