Compression dictionaries are not being used in partitioned tables
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Invalid
|
Undecided
|
Unassigned | |||
5.6 |
Fix Released
|
Medium
|
Yura Sorokin | |||
5.7 |
Fix Released
|
Medium
|
Yura Sorokin |
Bug Description
Hi dear all,
Testing with latest 5.7 branch.
Created table as:
CREATE TABLE `sbtest2` (
`id` int(10) unsigned NOT NULL,
`k` int(10) unsigned NOT NULL DEFAULT '0',
`c` varchar(250) DEFAULT NULL,
`pad` char(60) NOT NULL DEFAULT ''
) ENGINE=InnoDB AUTO_INCREMENT=
/*!50100 PARTITION BY RANGE (k)
(PARTITION p1 VALUES LESS THAN (100) ENGINE = InnoDB,
PARTITION p2 VALUES LESS THAN (1000) ENGINE = InnoDB,
PARTITION p3 VALUES LESS THAN (10000) ENGINE = InnoDB,
PARTITION p4 VALUES LESS THAN (10001) ENGINE = InnoDB) */;
mysql [localhost] {msandbox} (dbtest) > insert into sbtest2 select * from sbtest1;
Query OK, 10000 rows affected (1.35 sec)
Records: 10000 Duplicates: 0 Warnings: 0
mysql [localhost] {msandbox} (dbtest) > CREATE COMPRESSION_
Query OK, 0 rows affected (0.01 sec)
mysql [localhost] {msandbox} (dbtest) > alter table sbtest2 modify `c` varchar(250) column_format compressed with compression_
Query OK, 10000 rows affected (2.10 sec)
Records: 10000 Duplicates: 0 Warnings: 0
mysql [localhost] {msandbox} (dbtest) > show create table sbtest2\G
*******
Table: sbtest2
Create Table: CREATE TABLE `sbtest2` (
`id` int(10) unsigned NOT NULL,
`k` int(10) unsigned NOT NULL DEFAULT '0',
`c` varchar(250) /*!50633 COLUMN_FORMAT COMPRESSED */ DEFAULT NULL,
`pad` char(60) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!50100 PARTITION BY RANGE (k)
(PARTITION p1 VALUES LESS THAN (100) ENGINE = InnoDB,
PARTITION p2 VALUES LESS THAN (1000) ENGINE = InnoDB,
PARTITION p3 VALUES LESS THAN (10000) ENGINE = InnoDB,
PARTITION p4 VALUES LESS THAN (10001) ENGINE = InnoDB) */
1 row in set (0.00 sec)
Noted the missing dictionary name -> `c` varchar(250) /*!50633 COLUMN_FORMAT COMPRESSED */ DEFAULT NULL,
With ordinary table:
mysql [localhost] {msandbox} (dbtest) > alter table sbtest1 modify `c` varchar(250) column_format compressed with compression_
Query OK, 10000 rows affected (2.45 sec)
Records: 10000 Duplicates: 0 Warnings: 0
mysql [localhost] {msandbox} (dbtest) > show create table sbtest1\G
*******
Table: sbtest1
Create Table: CREATE TABLE `sbtest1` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`k` int(10) unsigned NOT NULL DEFAULT '0',
`c` varchar(250) /*!50633 COLUMN_FORMAT COMPRESSED WITH COMPRESSION_
`pad` char(60) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `k_1` (`k`)
) ENGINE=InnoDB AUTO_INCREMENT=
1 row in set (0.00 sec)
tags: | added: qa |
Changed in percona-server: | |
assignee: | nobody → Yura Sorokin (yura-sorokin) |
So it looks like "WITH COMPRESSION_ DICTIONARY `numbers`" is not being used/dropped for partitioned tables.