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

首頁 > 數據庫 > MySQL > 正文

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

2024-07-24 13:09:31
字體:
來源:轉載
供稿:網友
這篇文章主要介紹了MySQL:Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEM,需要的朋友可以參考下
 

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教程頻道。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 镇安县| 阳谷县| 响水县| 平舆县| 西林县| 武陟县| 邢台县| 丰县| 汾西县| 青岛市| 泊头市| 海丰县| 西安市| 叶城县| 连州市| 大名县| 临沧市| 古蔺县| 苏尼特左旗| 遂川县| 台山市| 博乐市| 旬邑县| 万全县| 敦化市| 肃宁县| 会泽县| 庆城县| 扎赉特旗| 吉木乃县| 英山县| 津南区| 阿坝县| 左云县| 鄱阳县| 镇江市| 利辛县| 新巴尔虎左旗| 太和县| 工布江达县| 恩平市|