Bug #79932 Unclear error message while altering compressed table with page compression
Submitted: 12 Jan 2016 9:27 Modified: 21 Jul 2016 7:37
Reporter: Shahriyar Rzayev Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.7.10 OS:CentOS (7)
Assigned to: CPU Architecture:Any

[12 Jan 2016 9:27] Shahriyar Rzayev
Description:
Hi dear, all

Simple as:

I have table:

CREATE TABLE `sbtest2` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `k` int(10) unsigned NOT NULL DEFAULT '0',
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k_1` (`k`)
) ENGINE=InnoDB AUTO_INCREMENT=4280540 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8

mysql> alter table sbtest2 compression="zlib";
ERROR 1478 (HY000): Table storage engine 'InnoDB' does not support the create option 'COMPRESSION'
mysql> alter table sbtest2 compression="lz4";
ERROR 1478 (HY000): Table storage engine 'InnoDB' does not support the create option 'COMPRESSION'

Well, saying that 'InnoDB' does not support create option 'COMPRESSION' is not a best way to explain situation.
If table compression and page compression is mutually exclusive this should be indicated as clear as possible.

How to repeat:
See description

Suggested fix:
Improve Error message and documentation.
For eg, there is no such error message as in description here:

https://dev.mysql.com/doc/refman/5.7/en/innodb-compression-syntax-warnings.html
[14 Jan 2016 7:02] MySQL Verification Team
Hello Shahriyar,

Thank you for the report.

Thanks,
Umesh
[21 Jul 2016 7:36] Shahriyar Rzayev
Same thing when trying to alter tablespace of compressed table:

alter table sbtest1 tablespace=t1;
ERROR 1478 (HY000): Table storage engine 'InnoDB' does not support the create option 'COMPRESSION'
[21 Jul 2016 7:37] Shahriyar Rzayev
Changed severity.