MySQL錯誤提示mysql Statement violates GTID consistency

  MySQL版本用的是5.7,MySQL的GTID指的是全局事務ID(global transaction identifier)

  ### Cause: java.sql.SQLException: Statement violates GTID consistency: Updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.

  


  字面意思違反事務規則,詳細原因當時沒有想到。大連鋼結構工程http://dljunxiang.com/

  參考網上意見,發現新建的MySQL數據庫用的是MyISAM模式,這個模式是不支持事務。改成了InnoDB,InnoDB是提供事務支持,並且支持外鍵和行級鎖等高級功能。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章