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
innodb_strict_mode的更多相关文章
- innodb_strict_mode=1
从MySQL5.5.X版本开始,你可以开启InnoDB严格检查模式,尤其采用了页数据压缩功能后,最好是开启该功能.开启此功能后,当创建表(CREATE TABLE).更改表(ALTER TABLE)和 ...
- 如何利用脚本实现MySQL的快速部署以及一机多实例的部署
MySQL有三个版本:二进制,源码包,RPM. 下面讲讲二进制包的安装过程 下载地址: http://dev.mysql.com/downloads/mysql/ 选择Linux-Generic 我这 ...
- mysql 5.7.15单机主从快速搭建并配置复制表到不同库
一直以来因为线上系统盘中风控计算过于消耗资源,导致服务器负载太高,时常影响盘中交易的稳定性,最近决定了将风控拆分到独立的库进行计算,并进行回填操作. 总体来说,是将部分风控计算相关的表同步到备库,但是 ...
- [MySQL Reference Manual]14 InnoDB存储引擎
14 InnoDB存储引擎 14 InnoDB存储引擎 14.1 InnoDB说明 14.1.1 InnoDB作为默认存储引擎 14.1.1.1 存储引擎的趋势 14.1.1.2 InnoDB变成默认 ...
- MySQL 5.6 & 5.7最优配置模板
摘自:http://mp.weixin.qq.com/s?__biz=MjM5MjIxNDA4NA==&mid=207854835&idx=1&sn=c998031ae6816 ...
- MySQL 升级详细步骤 (包括 Percona)
MySQL 升级步骤 MySQL 5.1.72 升级到 MySQL 5.5.36 鉴于我在升级的时候遇到的麻烦问题,我觉得有必要把一些细节说清楚,免得引起误解了.感觉官方文档上的升级步骤写的比较简单, ...
- DBA应用技巧:如何升级InnoDB Plugin
DBA应用技巧:如何升级InnoDB Plugin 2011-03-23 10:09 康凯 ITPUB 字号:T | T 本文中,我们将向读者详细介绍如何升级动态InnoDB Plugin和升级静态编 ...
- MySQL 5.6 my.cnf 模版
[client] port = socket = /var/run/mysqld/mysqld.sock [mysqld_safe] thp-setting=never socket = /var/r ...
- MySQL 5.6 Threadpool(优先队列)介绍及性能测试【转】
本文来自:http://www.gpfeng.com/?p=540&utm_source=tuicool&utm_medium=referral 背景介绍 MySQL常用(目前线上使用 ...
随机推荐
- jstl表达式替换某些字符
转自:http://www.yiibai.com/jsp/jstl_function_replace.html fn:replace() 函数替换一个字符串与另一个字符串的所有匹配. 语法 fn:re ...
- Linux信号(signal) 机制分析
Linux信号(signal) 机制分析 [摘要]本文分析了Linux内核对于信号的实现机制和应用层的相关处理.首先介绍了软中断信号的本质及信号的两种不同分类方法尤其是不可靠信号的原理.接着分析了内核 ...
- Multiple dex files define
Multiple dex files define 在项目中,有一个类的包名和引用的jar包中的类和包名一致
- How to Avoid OOM in Android
1.use java reference(strong soft weak phantom) 2.use android:largeHeap="true" above or VMR ...
- 使用hadoop multipleOutputs对输出结果进行不一样的组织
MapReduce job中,可以使用FileInputFormat和FileOutputFormat来对输入路径和输出路径来进行设置.在输出目录中,框架自己会自动对输出文件进行命名和组织,如:par ...
- MouseJack:利用15美元的工具和15行代码控制无线鼠标和键盘
Bastille的研究团队发现了一种针对蓝牙键盘鼠标的攻击,攻击者可以利用漏洞控制你的电脑操作.研究团队将此攻击命名为MouseJack. 七大厂商皆中招 软件工程师马克纽林说:“利用假冒的无线电脑鼠 ...
- 极客DIY:打造属于自己的无线移动渗透测试箱
本文中介绍的工具.技术带有一定的攻击性,请合理合法使用. 你想不想拥有一款属于自己的移动无线渗透测试箱,如果你感兴趣,下面介绍的设备将会对你很有帮助.这个箱子被称为“MiTM(中间人攻击)WiFi箱” ...
- Node.js +Express+MongoDB+mogoose+ejs+bootstrap+jquery
Node.js + MongoDB 项目实战(二) 创建项目 在项目实战(一)中,已经配置好了开发环境(详见:http://www.cnblogs.com/jameslong/articles/34 ...
- 钉子和小球_DP
Description 有一个三角形木板,竖直立放,上面钉着n(n+1)/2颗钉子,还有(n+1)个格子(当n=5时如图1).每颗钉子和周围的钉子的距离都等于d,每个格子的宽度也都等于d,且除了最左端 ...
- Codis 集群搭建
Codis 集群搭建 1 安装go1.3.1 CentOS 7.0 安装go 1.3.1 1.1 下载go安装包 golang中国上下载 下载到Downloads下 1.2 解压 tar -zxf g ...