执行 delete from xx;
出现:
Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage
内存不足导致的binlog cache size不够不能写入binlog,导致语句无法执行
解决办法:
一
改成 truncate table xx;
二
修改my.cnf,增大binlog_cache_size和max_binlog_cache_size参数的值
binlog_cache_size = 20M
max_binlog_cache_size = 100M
原因:
TRUNCATE TABLE 在功能上与不带 WHERE 子句的 DELETE 语句相同:二者均删除表中的全部行。
TRUNCATE TABLE 比 DELETE 速度快,且使用的系统和事务日志资源少。 DELETE 语句每次删除一行,并在事务日志中为所删除的每行记录一项。
Multi-statement transaction required more than 'max_binlog_cache_size' bytes of
猜你喜欢
转载自cuityang.iteye.com/blog/2410784
今日推荐
周排行