It is possible to create COMPRESSED columns in MyISAM tables via specifying partition engines

Bug #1631954 reported by Yura Sorokin
6
This bug affects 1 person
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_HA_CREATE_OPTION

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

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'

Revision history for this message
Yura Sorokin (yura-sorokin) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1754

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.