查看 max_binlog_stmt_cache_size 参数解释时,有这么一句话 If nontransactional statements within a transaction require more than this many bytes of memory, the server generates an error.

那么,什么是 nontransactional statements ?
在 http://dev.mysql.com/ 查找 nontransactional关键字,查询结果第一个是 Rollback Failure for Nontransactional Tables 。

那么什么又是 Nontransactional Tables ?、

一、非事务表
Nontransactional Tables,非事务表,不支持事务的表,也就是使用MyISAM存储引擎的表。
非事务表的特点是不支持回滚,看下面的列子

 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
>create table no_trans(id int) ENGINE=MyiSAM;
>start transaction;
>insert into no_trans values(1);
>select * from no_trans;
+------+
| id   |
+------+
|    1 |
+------+
1 row in set (0.00 sec)
 
>rollback;
Query OK, 0 rows affected, 1 warning (0.00 sec)
 
>show warnings;
+---------+------+---------------------------------------------------------------+
| Level   | Code | Message                                                       |
+---------+------+---------------------------------------------------------------+
| Warning | 1196 | Some non-transactional changed tables couldn't be rolled back |
+---------+------+---------------------------------------------------------------+
1 row in set (0.00 sec)
 
>select * from no_trans;
+------+
| id   |
+------+
|    1 |
+------+
1 row in set (0.00 sec)

可以看到,非事务表回滚抛出警告,显示非事务表不支持回滚。

二、事务表
与非事务表对象的是事务表,比如使用InnoDB的表,支持回滚操作。

 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
>create table trans(id int);
>start transaction;
>insert into trans values(1);
>select * from trans;
+------+
| id   |
+------+
|    1 |
+------+
1 row in set (0.00 sec)
 
 
>rollback;
Query OK, 0 rows affected (0.00 sec)
 
 
>select * from trans;
Empty set (0.00 sec)

可以得出,nontransactional statements的意思是操作非事务表的语句。

三、相关参数
max_binlog_stmt_cache_size 该参数影响的是非事务表,如MyISAM,该参数不够时,则提示需要更多的空间。
max_binlog_cache_size 该参数影响的是事务表,如InnoDB,该参数不够时,则提示需要更多的空间。

最新文章

  1. Redhat Linux安装JDK 1.7
  2. CSS选择器 转
  3. html/css 布局练习3
  4. C#学习系列-this的使用
  5. PostgreSQL index types and index bloating
  6. 如何让div水平居中
  7. js冲突怎么解决
  8. Remove Element 解答
  9. memcache 集群
  10. A标签-一个按钮样式
  11. 排序算法总结及Java实现
  12. tcp.go
  13. 学习DDD之路--勇于纠正自己的错误
  14. 5 questions
  15. hdu 2647 Reward(拓扑排序+反图)
  16. centos7-vmware克隆后的配置
  17. 不用IDE写C#的Hello World
  18. Asp.Net导出文件名中文乱码
  19. 转:苹果Xcode帮助文档阅读指南
  20. WebCollector2.7爬虫框架——在Eclipse项目中配置

热门文章

  1. 制作IOS ANE的基本流程
  2. 如何通过Restful API的方式读取SAP Commerce Cloud的Product Reference
  3. python下调用c语言代码
  4. 程序写入mycat中文乱码解决(也包括mysql编码修改)
  5. Vue检测当前是否处于mock模式
  6. eclipse debug问题
  7. python3 生成二维码并存入word文档
  8. 《少年先疯队》第八次团队作业:Alpha冲刺第三天
  9. byte中的数值为什么是127到-128?
  10. C#多线程代码示例