mysql报错Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage

在执行create table  xx  as  select xx的时候

或者在执行

tpcc-mysql的tpcc_load 的时候

都会遇到这个错误

1534, HY000, Writing one row to the row-based binary log failed
Retrying ...

1197, HY000, Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again
Retrying ...

因为使用的是腾讯云主机,1核1G内存,内存不足导致的binlog cache size不够不能写入binlog,导致语句无法执行

解决办法:

修改my.cnf,增大binlog_cache_size和max_binlog_cache_size参数的值

binlog_cache_size = 20M
max_binlog_cache_size = 100M


今天备份表数据遇到一个错误  Error CODE: 1197 Multi-statement TRANSACTION required more THAN 'max_binlog_cache_size' bytes of STORAGE

版本:mysql5.6.35

系统:centos6.5

下面是备份语句

CREATE TABLE FONTANA_BETSBAK AS SELECT * FROM FONTANA_BETS; 
Error CODE: 1197
Multi-statement TRANSACTION required more THAN 'max_binlog_cache_size' bytes of STORAGE; increase this mysqld variable AND try again

上网搜了一下,发现是max_binlog_cache_size设置得不够大的原因

对Innodb引擎
由于innodb是事务型的,所以会把load文件的整个操作当作一个事务来处理,
中途中断load操作,会导致回滚。 
与此相关的一些参数:
max_binlog_cache_size----能够使用的最大cache内存大小。
当执行多语句事务时,max_binlog_cache_size如果不够大,
系统可能会报出“Multi-statement
transaction required more than 'max_binlog_cache_size' bytes of storage”的错误。
 备注:以load data 来说,如果load的文件大小为512M,在执行load 的过程中,
所有产生的binlog会先写入binlog_cache_size,直到load data 的操作结束后,
最后,再由binlog_cache_size 写入二进制日志,如mysql-bin.0000008等。
所以此参数的大小必须大于所要load 的文件的大小,或者当前所要进行的事务操作的大小。

改大max_binlog_cache_size 和binlog_cache_size  问题解决

SET GLOBAL max_binlog_cache_size =;
SET GLOBAL binlog_cache_size =;

最新文章

  1. 菜鸟的Python学习之路(流水账)
  2. 崽崽帮www.zaizaibang.com精选1
  3. ln 软链接与硬链接的区别再次回顾
  4. 50款免费名片设计模板 PSD 源文件下载《上篇》
  5. CentOS 7 firewalld使用简介
  6. ubuntu14.04 ibus pinyin wrong (ibus拼音乱拼问题)
  7. 使用mysqladmin ext 了解MySQL运行状态 转
  8. 读书笔记 (一) ———Fundamentals of Multiagent Systems with NetLogo Examples by Prof. Jose M Vidal
  9. tomcat+JNDI+spring 的配置问题
  10. .net 基础之截取字符串
  11. VS2013中使用QT插件后每次重新编译问题
  12. HDU5919:Sequence II
  13. JMeter 中实现发送Java请求
  14. MOT大连站 | 卓越研发之路:前沿技术落地实践
  15. String类的常用方法详解
  16. 【GMT43智能液晶模块】例程七:定时器PWM实验——简易电子琴
  17. 洛谷P1029 最小公约数和最大公倍数问题【数论】
  18. html5-超级链接
  19. over(partition by)开窗函数的使用
  20. c++——数据结构

热门文章

  1. [Laravel] 11 - WEB API : cache & timer
  2. 【问题集】redis集群set报错(error) MOVED 11469 192.168.181.201:7002
  3. HashMap和Hashtable的区别 2
  4. 使用sts(SpringToolSuite4)无法将项目部署到tomcat容器
  5. 关于web标准的一些想法
  6. 隐藏响应的server,X-Powered-By
  7. Goroutines
  8. win10 开启蓝 由于其配置信息(注册表中的)不完整或已损坏
  9. pycharm平台下的Django教程(转)
  10. Oracle的字符连接函数 concat 和 || 的区别