InnoDB Strict Mode

InnoDB strict mode is similar to SQL strict mode. When it is enabled, certain InnoDB warnings become errors instead.

In MariaDB 10.2.2 and later, InnoDB strict mode is enabled by default.

InnoDB strict mode can be enabled or disabled by configuring the innodb_strict_mode server system variable.

Its global value can be changed dynamically with SET GLOBAL. For example:

SET GLOBAL innodb_strict_mode=ON;

Its value for the current session can also be changed dynamically with SET SESSION. For example:

SET SESSION innodb_strict_mode=ON;

It can also be set in a server option group in an option file prior to starting up the server. For example:

[mariadb]
...
innodb_strict_mode=ON

InnoDB Strict Mode Errors
Wrong Create Options
If InnoDB strict mode is enabled, and if a DDL statement is executed and invalid or conflicting table options are specified, then an error is raised. The error will only be a generic error that says the following:

ERROR 1005 (HY000): Can't create table `db1`.`tab` (errno: 140 "Wrong create options")

However, more details about the error can be found by executing SHOW WARNINGS.

Source: MariaDB

One Reply to “InnoDB Strict Mode”

Leave a Reply

Your email address will not be published. Required fields are marked *