Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
10.1.18
Description
InnoDB page compression in MariaDB 10.1 requires innodb_file_format to be set to Barracuda. If innodb_file_format is not Barracuda, and if the user tries to enable InnoDB page compression for a particular table, MariaDB returns a somewhat confusing error. e.g.:
MariaDB [db1]> SHOW GLOBAL VARIABLES LIKE 'innodb_compression_algorithm'; +------------------------------+-------+
|
| Variable_name | Value |
|
+------------------------------+-------+
|
| innodb_compression_algorithm | zlib |
|
+------------------------------+-------+
|
1 row in set (0.00 sec)
|
|
MariaDB [db1]> SHOW GLOBAL VARIABLES LIKE 'innodb_file_format'; +--------------------+----------+
|
| Variable_name | Value |
|
+--------------------+----------+
|
| innodb_file_format | Antelope |
|
+--------------------+----------+
|
1 row in set (0.00 sec)
|
|
MariaDB [db1]> CREATE TABLE `tab_compressed` (
|
-> `id` int(11) NOT NULL,
|
-> `str` varchar(50) DEFAULT NULL,
|
-> PRIMARY KEY (`id`)
|
-> ) ENGINE=InnoDB DEFAULT CHARSET=latin1 PAGE_COMPRESSED=1;
|
ERROR 1005 (HY000): Can't create table `db1`.`tab_compressed` (errno: 140 "Wrong create options")
|
"Wrong create options" is kind of confusing if the user doesn't know to check innodb_file_format. Wouldn't it be better if the error message said something like "PAGE_COMPRESSED can only be set if innodb_file_format is Barracuda"?