How to change Innodb fileformat to Barracuda

I've attempted to change to the new barracuda file format. I'm using a Galera cluster (MariaDB 10.1.11) and have innodb_file_format=Barracuda set on all my servers, I've rebooted the servers and exported a database with phpmyadmin. After this I deleted the database and recreated it and then imported the previously exported .sql file with phpmyadmin.

I checked the file format in INFORMATION_SCHEMA.INNODB_SYS_TABLES and found that it's still set as Antelope. Why is it not set to Barracuda? How can I change it to Barracuda?

Answer Answered by Daniel Black in this comment.

xtradbinnodb-storage-formats/#compressed suggests that setting innodb_strict_mode.

ALTER TABLE (ROW_FORMAT=DYNAMIC) should be able to change the format.

Thanks, this seems to work. I ran the following SQL query to make a new query which does this for all tables in a database: USE INFORMATION_SCHEMA; SELECT CONCAT("ALTER TABLE `", TABLE_SCHEMA,"`.`", TABLE_NAME, "` ROW_FORMAT=DYNAMIC;") AS MySQLCMD FROM TABLES WHERE TABLE_SCHEMA = "replace_with_your_table_name";

The output from the above query can be used for a new query which alters all tables. I'm curious when MariaDB will convert to the new format as default, MySQL 5.7 seems to do this automatically.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.