I am unable to create a new table using compression.
I'm using the following options which from what I understand should allow me to use compression.
default-storage-engine = InnoDB
innodb_large_prefix = true
innodb_file_format = barracuda
innodb_file_per_table = true
This is on a brand new install of MySQL, and these configuration options have been set before creating the new database, so file per table should be set.
When I try to create a new table I get the following response:
CREATE TABLE IF NOT EXISTS `db_example`.`table_example` (
`ugid` INT NOT NULL,
`uid` INT NOT NULL,
PRIMARY KEY (`ugid`, `uid`))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED;;
Error message:
Error Code: 1031. Table storage engine for 'table_example' doesn't have this option.
I don't understand why this would be happening since the storage engine is set to innodb, which should have support for compression.
Additionally. If I force the creation of the schema to complete by disabling innodb strict mode, and then try to alter the tables enabling compression:
ALTER TABLE ${table_goes_here} ROW_FORMAT=COMPRESSED;
I get the following:
ERROR 1478 (HY000) at line 1: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
SELECT @@innodb_file_format, @@innodb_file_per_table;. Just because you believe they are configured as shown does not prove that they in fact are. – Michael - sqlbot Jan 31 '19 at 21:10|Barracuda | 1 |– johnramsden Jan 31 '19 at 22:14INTs. – Rick James Feb 01 '19 at 02:20@@innodb_file_per_table=1when you created the table? (The current value has no impact.) – Rick James Feb 01 '19 at 02:26VARCHAR(255); (2) Normalizing (where appropriate), or (3) "vertical" partitioning. Start a new Question; I'll critique it from those (and maybe other) point of view. – Rick James Feb 01 '19 at 03:10VIEWthat puts the pieces back together. – Rick James Feb 01 '19 at 03:22