Replication and Binary Logging Options and Variables The values that  enforce_gtid_consistency  can be configured to are: • OFF : all transactions are allowed to violate GTID consistency. • ON : no transaction is allowed to violate GTID consistency. • WARN : all transactions are allowed to violate GTID consistency, but a warning is generated in this case. --enforce-gtid-consistency  only takes effect if binary logging takes place for a statement. If binary logging is disabled on the server, or if statements are not written to the binary log because they are removed by a filter, GTID consistency is not checked or enforced for the statements that are not logged. Only statements that can be logged using GTID safe statements can be logged when enforce_gtid_consistency  is set to  ON , so the operations listed here cannot be used with this option: For more information, see Section 17.1.3.7, “Restrictions on Replication with GTIDs” . • CREATE TEMPORARY TABLE  or  DROP TEMPORARY TABLE  statements inside transactions. •Transactions or statements that update both transactional and nontransactional tables. There is an exception that nontransactional DML is allowed in the same transaction or in the same statement as transactional DML, if all  nontransactional  tables are temporary. • CREATE TABLE ... SELECT  statements, prior to MySQL 8.0.21. From MySQL 8.0.21,  CREATE TABLE ... SELECT  statements are allowed for storage engines that support atomic DDL. Prior to MySQL 5.7 and in early releases in that release series, the boolean enforce_gtid_consistency  defaulted to  OFF . To maintain compatibility with these earlier releases, the enumeration defaults to  OFF , and setting  --enforce-gtid-consistency  without a value is interpreted as setting the value to  ON . The variable also has multiple textual aliases for the values: 0=OFF=FALSE ,  1=ON=TRUE , 2=WARN . This differs from other enumeration types but maintains compatibility with the boolean type used in previous releases. These changes impact on what is returned by the variable. Using  SELECT @@ENFORCE_GTID_CONSISTENCY ,  SHOW VARIABLES LIKE ’ENFORCE_GTID_CONSISTENCY’ , and  SELECT * FROM INFORMATION_SCHEMA.VARIABLES WHERE ’VARIABLE_NAME’ = ’ENFORCE_GTID_CONSISTENCY’ , all return the textual form, not the numeric form. This is an incompatible change, since  @@ENFORCE_GTID_CONSISTENCY  returns the numeric form for booleans but returns the textual form for  SHOW  and the Information Schema. • gtid_executed System Variable gtid_executed Scope Global Dynamic No SET_VAR  Hint Applies No Type String Unit set of GTIDs When used with global scope, this variable contains a representation of the set of all transactions executed on the server and GTIDs that have been set by a  SET gtid_purged  statement. This is the same as the value of the  Executed_Gtid_Set  column in the output of  SHOW MASTER STATUS  and 3572