Book Image

Mastering MariaDB

By : Federico Razzoli
Book Image

Mastering MariaDB

By: Federico Razzoli

Overview of this book

Table of Contents (19 chapters)
Mastering MariaDB
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating InnoDB compressed tables


Before creating a compressed table, it is usually better to make sure that we are using the InnoDB strict mode. The reason for this is that InnoDB performs more checks on the CREATE TABLE statements when the strict mode is on. If something is wrong with the table definition, the table will not be created and an error will be produced instead. This prevents us from creating tables that are different from what we expect. However, the existing applications rely on the SQL statements they execute, and the strict mode might break them. For this reason, the strict mode is disabled by default, and it is possible to enable it at the session level. To enable the InnoDB strict mode globally, execute the following command:

SET @@global.innodb_strict_mode = ON;

Note

In the current versions, the checks performed with the strict mode are only useful while creating compressed tables. However, in future versions, it could be useful in other situations; not necessarily related...