When innodb_strict_mode is ONInnoDB returns errors rather than warnings for certain conditions. The default value is OFF.

Strict mode helps guard against ignored typos and syntax errors in SQL, or other unintended consequences of various combinations of operational modes and SQL statements. When innodb_strict_mode is ONInnoDB raises error conditions in certain cases, rather than issuing a warning and processing the specified statement (perhaps with unintended behavior). This is analogous to sql_mode in MySQL, which controls what SQL syntax MySQL accepts, and determines whether it silently ignores errors, or validates input syntax and data values.

The innodb_strict_mode setting affects the handling of syntax errors for CREATE TABLEALTER TABLE andCREATE INDEX statements. innodb_strict_mode also enables a record size check, so that an INSERT or UPDATE never fails due to the record being too large for the selected page size.

Oracle recommends enabling innodb_strict_mode when using ROW_FORMAT and KEY_BLOCK_SIZE clauses on CREATE TABLEALTER TABLE, and CREATE INDEX statements. When innodb_strict_mode is OFFInnoDB ignores conflicting clauses and creates the table or index, with only a warning in the message log. The resulting table might have different behavior than you intended, such as having no compression when you tried to create a compressed table. When innodb_strict_mode is ON, such problems generate an immediate error and the table or index is not created, avoiding a troubleshooting session later.

You can turn innodb_strict_mode ON or OFF on the command line when you start mysqld, or in the configuration file my.cnf or my.ini. You can also enable or disable innodb_strict_mode at runtime with the statement SET [GLOBAL|SESSION] innodb_strict_mode=mode, where mode is either ON or OFF. Changing the GLOBAL setting requires the SUPER privilege and affects the operation of all clients that subsequently connect. Any client can change the SESSION setting for innodb_strict_mode, and the setting affects only that client.

参考:

http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_strict_mode

最新文章

  1. 【JavaScript】JS 中 原始字符串 和 HTML 字符转换
  2. fastdfs-nginx扩展模块源码分析
  3. LRU implement Data Structure analysis
  4. JavaWeb之jsp编译为java源码的文件地址
  5. matlab中各种高斯相关函数
  6. IText&Html2canvas js截图 绘制 导出PDF
  7. Extension 代表的是私有成员变量
  8. svn 提交错误 400 Bad Reqest MKACTIVITY 请求于XX失败 Conflict Unable to connect to a repository at URL
  9. java里int和Integer什么区别
  10. Hbase深入学习(六) Java操作HBase
  11. JSON 数据的系统解析
  12. Windows消息传递函数SendMessage参数属性
  13. 数据层交换和高性能并发处理(开源ETL大数据治理工具--KETTLE使用及二次开发 )
  14. 《Effective C++》:规定44-规定45
  15. Asp.Net Web Api 接口,拥抱支持跨域访问。
  16. table固定宽度高度, 及overflow省略号
  17. 打印等腰三角形as3
  18. python-作用域解析
  19. CODEVS.5037.线段树练习4加强版(分块 区间k的倍数)
  20. 【读书笔记】Cronjob原理及源码分析

热门文章

  1. Be a person
  2. 三极管的妙用之C118自动刷机
  3. php大力力 [007节]php静态表量
  4. Ubuntu 升级VisualBox后无法启动 Kernel driver not installed (rc=-1908)
  5. Interview----2 sum
  6. 调用未绑定的父类方法和使用supper 函数 之间的选择.
  7. iOS开发:icon和启动图尺寸
  8. 破解 Rith's CrackMe #1(对比IDA查看动态分析中的MFC函数名)
  9. 在Runbook中添加Checkpoint-workflow
  10. UI Automation 简介