DROP DATABASE IF EXISTS `gtid_test`;
CREATE DATABASE `gtid_test`;
USE `gtid_test`;
CREATE TABLE `tab1` (
`a` INT
) ENGINE=MYISAM ;
CREATE TABLE `tab2` (
`b` INT
) ENGINE=INNODB;
SET autocommit=0;
INSERT INTO `tab1` VALUES (1);
INSERT INTO `tab2` VALUES (1);
UPDATE `tab1` SET `a` = 5 WHERE `a` = 1;
– Error Code: 1785
— When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, 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.
This happens with MySQL 5.6 GTIDs (Global Transaction IDs) enabled and it is documented here: …
[Read more]