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

Bad values in metadata views for partitions on VARBINARY

    XMLWordPrintable

Details

    Description

      I run this script:

      CREATE OR REPLACE TABLE t1 (a VARBINARY(10)) CHARACTER SET utf8
        PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (0xFF));
      SHOW CREATE TABLE t1;
      SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
      

      It returns the following output:

      +-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                                                                                |
      +-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | t1    | CREATE TABLE `t1` (
        `a` varbinary(10) DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8
       PARTITION BY LIST  COLUMNS(`a`)
      (PARTITION `p0` VALUES IN ('�') ENGINE = InnoDB)  |
      +-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      

      +-----------------------+
      | PARTITION_DESCRIPTION |
      +-----------------------+
      | '?'                   |
      +-----------------------+
      

      Notice:

      • the SHOW CREATE output prints the byte 0xFF as is
      • the INFORMATION_SCHEMA.PARTITIONS query changes it to the question mark

      The expected behaviour would be to print 0xFF as _binary 0xff.

      Attachments

        Issue Links

          Activity

            People

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