• Brandon Nesterenko's avatar
    DBAAS-7828: Primary/replica: configuration change of autocommit=0 can not be applied · cd88b083
    Brandon Nesterenko authored
    Problem:
    ========
    When the mysql.gtid_slave_pos table uses the InnoDB engine, and
    mysqld starts, it reads the table and begins a transaction. After
    reading the value, it should end the transaction and release all
    associated locks. The bug reported in DBAAS-7828 shows that when
    autocommit is off, the locks are not released, resulting in
    indefinite hangs on future attempts to change gtid_slave_pos. In
    particular, the transaction was not properly finalized because
    thd->server_status was not updated to reflect the end of the
    transaction.
    
    Solution:
    ========
    This patch updates the code to properly commit the transaction after
    reading gtid_slave_pos during mysqld start-up.
    
    Reviewed By:
    ============
    Andrei Elkin <andrei.elkin@mariadb.com>
    cd88b083
binlog_autocommit_off_no_hang.result 221 Bytes