It is possible to create COMPRESSED columns in MyISAM tables via specifying partition engines
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.6 |
Fix Released
|
Medium
|
Yura Sorokin | |||
5.7 |
Fix Released
|
Medium
|
Yura Sorokin |
Bug Description
The following statement does not generate an error
CREATE TABLE t1(
id INT NOT NULL AUTO_INCREMENT,
a BLOB COLUMN_FORMAT COMPRESSED,
PRIMARY KEY(id)
)
PARTITION BY RANGE(id)
(
PARTITION pa100 values less than (100) ENGINE=MyISAM,
PARTITION paMax values less than MAXVALUE ENGINE=MyISAM
);
Even though the 'ENGINE' for 't1' is deducted as 'MyISAM', the 'COLUMN_FORMAT COMPRESSED' attribute for column 'a' is allowed and a new MyISAM table with a compressed column is created.
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`a` blob /*!50632 COLUMN_FORMAT COMPRESSED */,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (id)
(PARTITION pa100 VALUES LESS THAN (100) ENGINE = MyISAM,
PARTITION paMax VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
This should generate ER_ILLEGAL_
CREATE TABLE `t1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`a` blob /*!50633 COLUMN_FORMAT COMPRESSED */,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
/*!50100 PARTITION BY RANGE (id)
(PARTITION pa100 VALUES LESS THAN (100) ENGINE = MyISAM,
PARTITION paMax VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
With PS 5.7:
master [localhost] {msandbox} (dbtest) > alter table t1 compression='zlib';
ERROR 1478 (HY000): Table storage engine 'partition' does not support the create option 'COMPRESSED COLUMNS'