-
Maria Couceiro authored
Problem: The SET GTID_PURGED statement is presenting a different behaviour for MySQL 5.6 and 5.7 servers. In MySQL 5.7 it is starting a transaction which might lead to an error when executing other statements, such as a SET SQL_LOG_BIN, without a previous commit. This behaviour is not observed in 5.6 servers. Analysis: Setting GTID_PURGED is initiating a transaction because the flag SERVER_STATUS_IN_TRANS was unecessarily activated when saving the purged gtid set in the table. Fix: The thd->lex->autocommit flag is set to true when the variable GTID_PURGED is set, ensuring that the transaction started during this statement is committed when it finishes.
Maria Couceiro authoredProblem: The SET GTID_PURGED statement is presenting a different behaviour for MySQL 5.6 and 5.7 servers. In MySQL 5.7 it is starting a transaction which might lead to an error when executing other statements, such as a SET SQL_LOG_BIN, without a previous commit. This behaviour is not observed in 5.6 servers. Analysis: Setting GTID_PURGED is initiating a transaction because the flag SERVER_STATUS_IN_TRANS was unecessarily activated when saving the purged gtid set in the table. Fix: The thd->lex->autocommit flag is set to true when the variable GTID_PURGED is set, ensuring that the transaction started during this statement is committed when it finishes.
Loading