mysql error日志的一个问题

来源:互联网 发布:网络分层模型详解 编辑:程序博客网 时间:2024/05/20 08:44

2014-01-08 10:26:50 13761 [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 `tb_user_69`(`nick_name`,`user_id`) VALUES('滔哥test','900698') ON DUPLICATE KEY UPDATE `nick_name`='滔哥test',`user_id`='900698'
2014-01-08 10:28:43 13761 [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 `tb_user_69`(`sex`,`user_id`) VALUES('1','900698') ON DUPLICATE KEY UPDATE `sex`='1',`user_id`='900698'
2014-01-08 10:38:22 13761 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. Statement: DELETE FROM `db_application`.`mine_car_info` WHERE `mine_car_info`.`mine_car_id` = 78 LIMIT 1

 

由于开启了replication, 且binlog日志的格式默认为STATEMENT。查看官方手册有以下解释:

  • When one or more tables with AUTO_INCREMENT columns are updated and a trigger or stored function is invoked. Like all other unsafe statements, this generates a warning ifbinlog_format = STATEMENT.

    For more information, see Section 16.4.1.1, “Replication and AUTO_INCREMENT”.

     

    将数据库binlog_format 设置为mixed后,error日志不在提示该警告提示。

     

  • 0 0
    原创粉丝点击