This is a configuration setting for MySQL that specifies the SQL mode that the server should operate in. The mode includes several options that control how the server handles certain types of errors and data types.

The options included in this SQL mode are:

  • STRICT_TRANS_TABLES: This option enables strict mode for transactional storage engines like InnoDB. It causes MySQL to reject any data that violates the defined data type or constraints.
  • ERROR_FOR_DIVISION_BY_ZERO: This option causes MySQL to return an error when attempting to divide by zero, instead of returning NULL or a warning.
  • NO_AUTO_CREATE_USER: This option prevents MySQL from automatically creating a new user account if a non-existent user attempts to connect to the server.
  • NO_ENGINE_SUBSTITUTION: This option causes MySQL to return an error if a requested storage engine is not available, instead of automatically substituting it with a different engine.

Overall, this SQL mode is designed to enforce stricter data integrity and prevent certain types of errors and security issues

sql_mode=STRICT_TRANS_TABLESERROR_FOR_DIVISION_BY_ZERONO_AUTO_CREATE_USERNO_ENGINE_SUBSTITUTION

原文地址: http://www.cveoy.top/t/topic/hv8J 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录