innodb_strict_mode

2026-02-12 02:58:32  Updated

Note

This variable is available starting with V4.0.0.

Description

innodb_strict_mode specifies the SQL syntax check mode.

Privilege requirements

  • Query variables

    • Global level

      sys tenants and all user tenants can execute the SHOW VARIABLES statement or query the SYS.TENANT_VIRTUAL_GLOBAL_VARIABLE view (Oracle mode) or the information_schema.GLOBAL_VARIABLES view (MySQL mode) to obtain the values of global system variables.

    • Session level

      sys tenants and all user tenants can execute the SHOW VARIABLES statement or query the SYS.TENANT_VIRTUAL_SESSION_VARIABLE view (Oracle mode) or the information_schema.SESSION_VARIABLES view (MySQL mode) to obtain the values of session system variables.

  • Modify variables

    • Global level

      • sys tenants can directly modify the values of global system variables.

      • MySQL user tenants must have the SUPER or ALTER SYSTEM privilege to modify the values of global system variables.

      • Oracle user tenants must have the ALTER SYSTEM privilege to modify the values of global system variables.

    • Session level

      sys tenants and all user tenants can directly modify the values of session system variables.

Attributes

Attribute Description
Type Boolean
Default value 1
Value range
  • 1: strict mode is enabled. When you execute the CREATE TABLE, ALTER TABLE, or CREATE INDEX statement, an error is returned without a warning for specific errors, such as unsupported ROW_FORMAT.
  • 0: non-strict mode is enabled. Loose syntax checks are performed. The default syntax is used to replace the incorrect syntax.
Scope
  • Global
  • Session
Modifiable Yes. You can execute the SET statement to modify the value.
Nullable No

Examples

Set the SQL syntax check mode to 1.

  • Global level

    obclient> SET GLOBAL innodb_strict_mode =1;
    
  • Session level

    obclient> SET innodb_strict_mode =1;
    

Contact Us