Skip to content
  • Maria Couceiro's avatar
    9b9c1806
    BUG#21472492 SET GTID_PURGED START A TRANSACTION FOR MYSQL 5.7 · 9b9c1806
    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.
    9b9c1806
    BUG#21472492 SET GTID_PURGED START A TRANSACTION FOR MYSQL 5.7
    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.
Loading