MySQL Statement violates GTID consistency pit

Source: Internet
Author: User
Tags error code

Today, the project migration, re-changed a database version, and then the problem came, the original operation of the normal program after the migration is not normal operation, the background error is as follows:

Update Tbl_user_info Set--force the lower frame mv_count = mv_count-1, Update_time=now () where user_id =?; Update Tbl_user_info a,tbl_mv_like b Set a.enjoy_num = a.enjoy_num-1, A.update_time = Now () where B.mvlikeid =? and B.userid =a.user_id and b.userid! =? and b.islike = 1 and b.state = 0
# # # Cause:java.sql.SQLException:Statement violates GTID consistency:updates to non-transactional tables can only be Don E in either autocommitted statements or single-statement transactions, and never in the same statement as updates to trans actional tables.
; Uncategorized SQLException for SQL []; SQL state [HY000]; Error code [1785]; Statement violates GTID consistency:updates to non-transactional tables can is only do in either autocommitted statemen TS or single-statement transactions, and never in the same statement as updates to transactional tables.; Nested exception is java.sql.SQLException:Statement violates GTID consistency:updates to non-transactional tables can on Ly be do in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.

Online check Statement violates GTID consistency this, and then see this page https://dev.mysql.com/doc/refman/5.6/en/ Replication-options-gtids.html, initially thought is the database schema problem, looked at the next database table, only to know that the original operation and maintenance personnel in the new database on the database table of my schema set to MyISAM this mode, and then go to the database show Engines a bit,

As you can see, this pattern doesn't support things, it's changed to InnoDB, the problem is done.

MySQL Statement violates GTID consistency pit

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.