Skip to content
  • Daogang Qu's avatar
    d8d180cb
    Bug#21686749 PARTIALLY FAILED DROP OR ACL STMT FAILS TO CONSUME GTID ON BINLOGLESS SLAVE · d8d180cb
    Daogang Qu authored
    PROBLEM
    =======
    The partially failed statement fails to consume an
    auto-generated/specified gtid when binlog is disabled.
    
    ANALYSIS
    ========
    DROP TABLE can be failed partially when dropping multiple tables, and
    a partially failed DROP TABLE consumes an auto-generated/specified
    gtid and is binlogged when binlog is enabled, so the current behavior
    is wrong that the partially failed DROP TABLE does not consume a
    specified gtid when binlog is disabled.
    
    DROP USER can be failed partially when dropping multiple users, and
    a partially failed DROP USER consumes an auto-generated/specified
    gtid and is binlogged when binlog is enabled, so the current behavior
    is wrong that the partially failed DROP USER does not consume a
    specified gtid when binlog is disabled.
    
    DROP VIEW can be failed partially when dropping multiple views, and
    a partially failed DROP VIEW consumes an auto-generated/specified
    gtid and is binlogged when binlog is enabled, so the current behavior
    is wrong that the partially failed DROP VIEW does not consume a
    specified gtid when binlog is disabled.
    
    GRANT statement can be failed partially when granting an
    available privilege to both an existent user and a
    non-existent user, and the partially failed GRANT statement
    does not consume an auto-generated/specified gtid and is not
    binlogged when binlog is enabled, so the current behavior is
    correct that the partially failed GRANT statement does not
    consume a specified gtid when binlog is disabled.
    
    GRANT statement can not be failed partially when granting an
    available privilege and a non-available privilege to an
    existent user, and a failed GRANT statement does not consume
    an auto-generated/specified gtid and is not binlogged when
    binlog is enabled, so the current behavior is correct that
    the failed GRANT statement does not consume a specified gtid
    when binlog is disabled.
    
    REVOKE statement can be failed partially when revoking multiple
    privileges from a user, but a partially failed REVOKE statement
    does not consume an auto-generated/specified gtid and is not
    binlogged when binlog is enabled, so the current behavior is
    correct that the partially failed REVOKE statement does not
    consume a specified gtid when binlog is disabled.
    
    RENAME TABLE can not be failed partially when renaming multiple
    tables, and a failed RENAME TABLE does not consume an
    auto-generated/specified gtid and is not binlogged when binlog
    is enabled, so the current behavior is correct that the failed
    RENAME TABLE does not consume a specified gtid when binlog is
    disabled.
    
    OPTIMIZE TABLE can be failed partially when optimizing multiple
    tables which contains a non-existent table, and the partially
    failed OPTIMIZE TABLE consumes an auto-generated/specified gtid
    and is binlogged when binlog is enabled, so the current behavior
    is correct that the partially failed OPTIMIZE TABLE consumes a
    specified gtid when binlog is disabled.
    
    ANALYZE TABLE can be failed partially when analyzing multiple
    tables which contain a non-existent table, and the partially
    failed ANALYZE TABLE consumes an auto-generated/specified gtid
    and is binlogged when binlog is enabled, so the current behavior
    is correct that the partially failed ANALYZE TABLE consumes a
    specified gtid when binlog is disabled.
    
    REPAIR TABLE can be failed partially when repairing multiple
    tables which contain a non-existent table, and the partially
    failed REPAIR TABLE consumes an auto-generated/specified gtid
    and is binlogged when binlog is enabled, so the current behavior
    is correct that the partially failed REPAIR TABLE consumes a
    specified gtid when binlog is disabled.
    
    CHECKSUM TABLE can be failed partially when checksuming multiple
    tables which contain a non-existent table, and the partially
    failed CHECKSUM TABLE does not consume an auto-generated/specified
    gtid and is not binlogged when binlog is enabled, so the current
    behavior is correct that the partially failed CHECKSUM TABLE does
    not consume a specified gtid when binlog is disabled.
    
    Fix
    ===
    To fix these wrong behaviors, make a partially failed DROP TABLE,
    a partially failed DROP USER and a partially failed DROP VIEW
    consume respectively specified gtid and save these gtids into
    @@GLOBAL.GTID_EXECUTED and mysql.gtid_executed table when binlog
    is disabled as it did when binlog is enabled.
    d8d180cb
    Bug#21686749 PARTIALLY FAILED DROP OR ACL STMT FAILS TO CONSUME GTID ON BINLOGLESS SLAVE
    Daogang Qu authored
    PROBLEM
    =======
    The partially failed statement fails to consume an
    auto-generated/specified gtid when binlog is disabled.
    
    ANALYSIS
    ========
    DROP TABLE can be failed partially when dropping multiple tables, and
    a partially failed DROP TABLE consumes an auto-generated/specified
    gtid and is binlogged when binlog is enabled, so the current behavior
    is wrong that the partially failed DROP TABLE does not consume a
    specified gtid when binlog is disabled.
    
    DROP USER can be failed partially when dropping multiple users, and
    a partially failed DROP USER consumes an auto-generated/specified
    gtid and is binlogged when binlog is enabled, so the current behavior
    is wrong that the partially failed DROP USER does not consume a
    specified gtid when binlog is disabled.
    
    DROP VIEW can be failed partially when dropping multiple views, and
    a partially failed DROP VIEW consumes an auto-generated/specified
    gtid and is binlogged when binlog is enabled, so the current behavior
    is wrong that the partially failed DROP VIEW does not consume a
    specified gtid when binlog is disabled.
    
    GRANT statement can be failed partially when granting an
    available privilege to both an existent user and a
    non-existent user, and the partially failed GRANT statement
    does not consume an auto-generated/specified gtid and is not
    binlogged when binlog is enabled, so the current behavior is
    correct that the partially failed GRANT statement does not
    consume a specified gtid when binlog is disabled.
    
    GRANT statement can not be failed partially when granting an
    available privilege and a non-available privilege to an
    existent user, and a failed GRANT statement does not consume
    an auto-generated/specified gtid and is not binlogged when
    binlog is enabled, so the current behavior is correct that
    the failed GRANT statement does not consume a specified gtid
    when binlog is disabled.
    
    REVOKE statement can be failed partially when revoking multiple
    privileges from a user, but a partially failed REVOKE statement
    does not consume an auto-generated/specified gtid and is not
    binlogged when binlog is enabled, so the current behavior is
    correct that the partially failed REVOKE statement does not
    consume a specified gtid when binlog is disabled.
    
    RENAME TABLE can not be failed partially when renaming multiple
    tables, and a failed RENAME TABLE does not consume an
    auto-generated/specified gtid and is not binlogged when binlog
    is enabled, so the current behavior is correct that the failed
    RENAME TABLE does not consume a specified gtid when binlog is
    disabled.
    
    OPTIMIZE TABLE can be failed partially when optimizing multiple
    tables which contains a non-existent table, and the partially
    failed OPTIMIZE TABLE consumes an auto-generated/specified gtid
    and is binlogged when binlog is enabled, so the current behavior
    is correct that the partially failed OPTIMIZE TABLE consumes a
    specified gtid when binlog is disabled.
    
    ANALYZE TABLE can be failed partially when analyzing multiple
    tables which contain a non-existent table, and the partially
    failed ANALYZE TABLE consumes an auto-generated/specified gtid
    and is binlogged when binlog is enabled, so the current behavior
    is correct that the partially failed ANALYZE TABLE consumes a
    specified gtid when binlog is disabled.
    
    REPAIR TABLE can be failed partially when repairing multiple
    tables which contain a non-existent table, and the partially
    failed REPAIR TABLE consumes an auto-generated/specified gtid
    and is binlogged when binlog is enabled, so the current behavior
    is correct that the partially failed REPAIR TABLE consumes a
    specified gtid when binlog is disabled.
    
    CHECKSUM TABLE can be failed partially when checksuming multiple
    tables which contain a non-existent table, and the partially
    failed CHECKSUM TABLE does not consume an auto-generated/specified
    gtid and is not binlogged when binlog is enabled, so the current
    behavior is correct that the partially failed CHECKSUM TABLE does
    not consume a specified gtid when binlog is disabled.
    
    Fix
    ===
    To fix these wrong behaviors, make a partially failed DROP TABLE,
    a partially failed DROP USER and a partially failed DROP VIEW
    consume respectively specified gtid and save these gtids into
    @@GLOBAL.GTID_EXECUTED and mysql.gtid_executed table when binlog
    is disabled as it did when binlog is enabled.
Loading