Skip to content
  • Daogang.qu's avatar
    aee6c564
    Bug #19451053 CRASH AFTER DIRECT INSERT INTO MYSQL.GTID_EXECUTED TABLE · aee6c564
    Daogang.qu authored
    When gtid_mode=on and binary log is off, the server automatically
    inserts the transaction's GTID into mysql.gtid_executed within
    the transaction. But if the GTID has already been inserted into
    the table by an explicit INSERT statement, the server crashes.
    
    After the fix, the server does not crash in above case. Push a
    warning to client if user is modifying the gtid_executed table
    explicitly. Ignore the duplicate key error and log a warning
    for it when writing transaction owned GTID into gtid_executed
    table implicitly within the transaction, we did not push a
    warning to client in the case, since it is slave SQL thread
    or worker sometimes.
    
    @ sql/binlog.cc
    We invoke the warn_on_modify_gtid_table(...) in two places to
    decrease the iterations to table list for improving performance.
    aee6c564
    Bug #19451053 CRASH AFTER DIRECT INSERT INTO MYSQL.GTID_EXECUTED TABLE
    Daogang.qu authored
    When gtid_mode=on and binary log is off, the server automatically
    inserts the transaction's GTID into mysql.gtid_executed within
    the transaction. But if the GTID has already been inserted into
    the table by an explicit INSERT statement, the server crashes.
    
    After the fix, the server does not crash in above case. Push a
    warning to client if user is modifying the gtid_executed table
    explicitly. Ignore the duplicate key error and log a warning
    for it when writing transaction owned GTID into gtid_executed
    table implicitly within the transaction, we did not push a
    warning to client in the case, since it is slave SQL thread
    or worker sometimes.
    
    @ sql/binlog.cc
    We invoke the warn_on_modify_gtid_table(...) in two places to
    decrease the iterations to table list for improving performance.
Loading