• Sunny Bains's avatar
    Bug #57243 Inconsistent use of trans_register_ha() API in InnoDB · 30d5e327
    Sunny Bains authored
    Remove trx_t::active_trans. Split into two separate fields with distinct
    responsibilities. trx_t::is_registered and trx_t::owns_prepare_mutex.
    There are wrapper functions for using this fields in ha_innodb.cc. The
    wrapper functions check for invariants.
    
    Fix some formatting to conform to InnoDB guidelines.
    
    Remove innobase_register_stmt() and innobase_register_trx_and_stmt().
    
    Add:
    trx_is_started()
    trx_deregister_from_2pc()
    trx_register_for_2pc()
    trx_is_registered_for_2pc()
    trx_owns_prepare_commit_mutex_set()
    trx_has_prepare_commit_mutex()
    
    rb://479, Approved by Jimmy Yang.
    30d5e327
trx0trx.c 49.2 KB