zoukankan      html  css  js  c++  java
  • 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;

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

  • 相关阅读:
    深入理解JavaScript系列
    Knockout应用开发指南(完整版) 目录索引
    js原生设计模式——8单例模式之简约版属性样式方法库
    彻底理解JavaScript原型
    Javascript模块化编程(一):模块的写法
    使用Grunt构建自动化开发环境
    js原生之一个面向对象的应用
    js原生之函数
    angular源码分析:angular中的依赖注入式如何实现的
    js原生之scrollTop、offsetHeight和offsetTop等属性用法详解
  • 原文地址:https://www.cnblogs.com/steven9898/p/9115228.html
Copyright © 2011-2022 走看看