innodb_strict_mode
When innodb_strict_mode
is ON
, InnoDB
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 ON
, InnoDB
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 TABLE
, ALTER 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 TABLE
, ALTER TABLE
, and CREATE INDEX
statements. When innodb_strict_mode
is OFF
, InnoDB
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=
, where mode
is either mode
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
最新文章
- 【JavaScript】JS 中 原始字符串 和 HTML 字符转换
- fastdfs-nginx扩展模块源码分析
- LRU implement Data Structure analysis
- JavaWeb之jsp编译为java源码的文件地址
- matlab中各种高斯相关函数
- IText&;Html2canvas js截图 绘制 导出PDF
- Extension 代表的是私有成员变量
- svn 提交错误 400 Bad Reqest MKACTIVITY 请求于XX失败 Conflict Unable to connect to a repository at URL
- java里int和Integer什么区别
- Hbase深入学习(六) Java操作HBase
- JSON 数据的系统解析
- Windows消息传递函数SendMessage参数属性
- 数据层交换和高性能并发处理(开源ETL大数据治理工具--KETTLE使用及二次开发 )
- 《Effective C++》:规定44-规定45
- Asp.Net Web Api 接口,拥抱支持跨域访问。
- table固定宽度高度, 及overflow省略号
- 打印等腰三角形as3
- python-作用域解析
- CODEVS.5037.线段树练习4加强版(分块 区间k的倍数)
- 【读书笔记】Cronjob原理及源码分析
热门文章
- Be a person
- 三极管的妙用之C118自动刷机
- php大力力 [007节]php静态表量
- Ubuntu 升级VisualBox后无法启动 Kernel driver not installed (rc=-1908)
- Interview----2 sum
- 调用未绑定的父类方法和使用supper 函数 之间的选择.
- iOS开发:icon和启动图尺寸
- 破解 Rith's CrackMe #1(对比IDA查看动态分析中的MFC函数名)
- 在Runbook中添加Checkpoint-workflow
- UI Automation 简介