MySQL:Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT...
1:错误日志大量错误
150602 14:40:02 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... SELECT... ON DUPLICATE KEY UPDATE is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are updated. This order cannot be predicted and may differ on master and the slave. Statement:INSERT INTO tab_name
2:原因:
查了下原因,tab_name 这个表上有2个唯一键。则使用INSERT … ON DUPLICATE KEY UPDATE ,且当前数据库binlog_format是statement格式,这种sql语句就会报unsafe。
官方手册:
INSERT … ON DUPLICATE KEY UPDATE statements on tables with multiple primary or unique keys.When executed against a table that contains more than one primary or unique key, this statement is considered unsafe, being sensitive to the order in which the storage engine checks the keys, which is not deterministic, and on which the choice of rows updated by the MySQL Server depends.
解决方法:
把binlog_format设置为ROW或者STATEMENT或者修改SQL
MySQL:Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT...的更多相关文章
- [MySQL复制异常]'Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT.'
MySQL复制错误]Last_Errno: 1666 Last_Error: Error executing row event: 'Cannot execute statement: imposs ...
- ERROR 1666 (HY000): Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT.
centos7.5 binlog恢复数据失败 问题: mysql> \. /tmp/inc.sql ERROR 1050 (42S01): Table 'new_1' already exist ...
- mysql:服务器错误代码
服务器错误代码和消息 原文:https://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html MySQL的程序有几种类型的错误信息时 ...
- 【转】[MySQL复制异常]Cannot execute statement: impossible to write to binary log since statement is in row for
MySQL复制错误]Last_Errno: 1666 Last_Error: Error executing row event: 'Cannot execute statement: imposs ...
- MySQL 二进制日志(Binary Log)
同大多数关系型数据库一样,日志文件是MySQL数据库的重要组成部分. MySQL有几种不同的日志文件.通常包括错误日志文件,二进制日志,通用日志,慢查询日志,等等.这些日志能够帮助我们定位mysqld ...
- mysql二进制文件操作语法(mysql binary log operate statements)
开启 binary logs 功能 在 mysql 配置文件中配置 log-bin,重启 mysql my.cnf (on Linux/unix) or my.ini (on Windows) 例子: ...
- 7.5 Point-in-Time (Incremental) Recovery Using the Binary Log 使用binay log 基于时间点恢复
7.5 Point-in-Time (Incremental) Recovery Using the Binary Log 使用binay log 基于时间点恢复 7.5.1 Point-in-Tim ...
- 手动创建binary log files和手动编辑binary log index file会有什么影响
基本环境:官方社区版MySQL 5.7.19 一.了解Binary Log结构 1.1.High-Level Binary Log Structure and Contents • Binlog包括b ...
- MySQL四种类型日志:Error Log、General Query Log、Binary Log、Slow Query Log
MySQL Server 有四种类型的日志——Error Log.General Query Log.Binary Log 和 Slow Query Log. 第一个是错误日志,记录mysqld的一些 ...
随机推荐
- Unity3D——SendMessage方法的使用
SendMessage效率不高,因为每次调用的时候都会去遍历检测自身或者子节点上要调用的方法. 一.方法 GameObject自身的Script SendMessage("函数名" ...
- java解压缩zip和rar的工具类
package decompress; import java.io.File; import java.io.FileOutputStream; import org.apache.tools.an ...
- 修改服务的运行权限,解决SVN Post Commit问题
先来看一下错误现象 之前在Windows Server中安装了VirtualSVN Server,然后设置了Post Commit Hooks,在提交代码到版本库之后,将代码check到本地的一个Se ...
- DBS-Tally book(记账本)
ylbtech-dbs:DBS-Tally book(记账本) -- =============================================-- 记账本-- 模仿小程序“记账e”业 ...
- bash 括号(小括号,双小括号,中括号,双中括号,大括号)
小括号()和大括号{} 主要包括一下几种 ${var} $(cmd) ()和{} $((exp)) ${var:-string},${var:+string},${var:=string},${var ...
- Triangle leetcode java
题目: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjace ...
- 构建-14 Gradle使用技巧
官方文档 Gradle 提示与诀窍 [Gradle tips and recipes] Gradle 和 Android Plugin for Gradle 提供了一种灵活的方式[a flexible ...
- 荔枝FM 字体文件 IconFontTextView
使用效果 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android ...
- 初学 Delphi 嵌入汇编[1] - 汇编语言与机器语言
非科班出身, 现在才接触汇编, 惭愧呀, 好好学! 主选课本是清华大学王爽老师的<汇编语言>. 推荐 王爽老师的汇编网 汇编语言之前是机器语言. 机器语言是机器指令的集合, 机器指令是一系 ...
- Datetimepicker配置参数
jquery的datetimepicker时间控件除了样式有点不太美观,功能性还是相当强大的. 在正常情况下input的type应该设置为"text",可点击又可输入(mask,e ...