[MDEV-20856] Bad values in metadata views for partitions on VARBINARY Created: 2019-10-18  Updated: 2019-10-18  Resolved: 2019-10-18

Status: Closed
Project: MariaDB Server
Component/s: Character Sets, Partitioning
Affects Version/s: 10.3, 10.4, 10.5
Fix Version/s: 10.5.0

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-20831 Table partitioned by LIST/RANGE COLUM... Closed
relates to MDEV-20855 Crash with PARTITION BY LIST and exte... Closed

 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.


Generated at Thu Feb 08 09:02:41 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.