国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > MySQL > 正文

MySQL:Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEM

2020-01-18 22:26:13
字體:
供稿:網(wǎng)友

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 ,且當前數(shù)據(jù)庫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設(shè)置為ROW或者STATEMENT或者修改SQL。

一般情況下就是mysql配置問題,大家可以參考這篇文章://m.survivalescaperooms.com/article/84357.htm

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 朝阳县| 四子王旗| 曲阳县| 自贡市| 甘孜| 南开区| 宁陕县| 海南省| 黄梅县| 乌拉特前旗| 县级市| 灵丘县| 怀集县| 民权县| 柘城县| 五常市| 萝北县| 安仁县| 樟树市| 丰台区| 游戏| 古蔺县| 阳西县| 宜良县| 长岛县| 沧州市| 新郑市| 紫阳县| 武清区| 明星| 天台县| 涟水县| 江阴市| 安吉县| 宝清县| 彭阳县| 江门市| 承德县| 隆尧县| 沁源县| 城固县|