binlog_format日志错误

客户磁盘空间不够用,发现mysql的err日志文件已每天大概600M-800M的速度增长,开头考虑作日志切割,打开发现,整个7.8G的文件里面百分之99的文件全部是如下所示的warning警告信息

180531 9:21:01 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe Statement: insert into log_user_active_degree(corp_id,user_id,statistic_time,startTime,endTime,login_count) values(1001,'archive@globalegrow.com','2018-05-31 09:20:44','2018-05-31 08:00:00','2018-05-31 10:00:00','1') on duplicate key update login_count=login_count+1
180531 9:21:01 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe Statement: insert into log_user_active_degree(corp_id,user_id,statistic_time,startTime,endTime,login_count) values(1001,'dongzhao@globalegrow.com','2018-05-31 09:20:44','2018-05-31 08:00:00','2018-05-31 10:00:00','1') on duplicate key update login_count=login_count+1
180531 9:21:01 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe Statement: insert into log_user_active_degree(corp_id,user_id,statistic_time,startTime,endTime,login_count) values(1001,'diana_lee@globalegrow.com','2018-05-31 09:20:44','2018-05-31 08:00:00','2018-05-31 10:00:00','1') on duplicate key update login_count=login_count+1
180531 9:21:02 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into rm_popmail_mid (userMailName,mail_addr,isAutoPop,status,days,createtime,appId,id,starttime) select userMailName,mail_addr,isAutoPop,9,if(flag=0, 0, if(flag=1, 7, 30)) as days,sysdate(),appId,id,sysdate() from rm_user_popmail a where appid=1 and isAutoPop=1 and lastrecvtime<='2018-05-31 09:11:17' and authenticated in (0,1) and not exists (select 'X' from rm_popmail_mid b where b.id = a.id)

将binlog_fomat进行修改

set session binlog_format='row';

set global binlog_format=row;

发现仍然不起作用,只能变相的去做改变了,要么修改存储过程,要么写个脚本凌晨清空,

转载于:https://www.cnblogs.com/steven9898/p/9115228.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值