• Denis Protivensky's avatar
    MDEV-33064: Sync trx->wsrep state from THD on trx start · cfbd57df
    Denis Protivensky authored
    InnoDB transactions may be reused after committed:
    - when taken from the transaction pool
    - during a DDL operation execution
    
    In this case wsrep flag on trx object is cleared, which may cause wrong
    execution logic afterwards (wsrep-related hooks are not run).
    
    Make trx->wsrep flag initialize from THD object only once on InnoDB transaction
    start and don't change it throughout the transaction's lifetime.
    The flag is reset at commit time as before.
    
    Unconditionally set wsrep=OFF for THD objects that represent InnoDB background
    threads.
    
    Make Wsrep_schema::store_view() operate in its own transaction.
    
    Fix streaming replication transactions' fragments rollback to not switch
    THD->wsrep value during transaction's execution
    (use THD->wsrep_ignore_table as a workaround).
    Signed-off-by: default avatarJulius Goryavsky <julius.goryavsky@mariadb.com>
    cfbd57df
trx0trx.cc 64.5 KB