Skip to content
  • Sven Sandberg's avatar
    780c635f
    WL#7083 step 5.1. Anonymous transactions: Maintain a counter of ongoing anonymous transactions. · 780c635f
    Sven Sandberg authored
    In order to prevent switching gtid_mode from ON_PERMISSIVE to ON when
    there are ongoing anonymous transactions, we introduce a counter that
    counts the number of ongoing anonymous transactions.
    
    @atomic_class.h
    - Auxiliary class to use C++ syntax to access atomic integers.
    
    @rpl_gtid.h
    - Add member functions in Gtid_state to acquire and release anonymous
    ownership.
    
    @rpl_gtid_execution.cc
    - Acquire anonymous ownership when executing set gtid_next='anonymous'.
    
    @rpl_gtid_state.cc
    - Release anonymous ownership in update_gtid_impl.
    - Acquire anonymous ownership in generate_automatic_gtid.
    
    @binlog.cc:
    - Decrease global counter when releasing anonymous ownership.
    - When thread holds anonymous ownership, and gtid_end_transaction is
    called, it should call update_on_commit instead of clear_owned_gtids, so
    that it releases anonymous ownership.
    780c635f
    WL#7083 step 5.1. Anonymous transactions: Maintain a counter of ongoing anonymous transactions.
    Sven Sandberg authored
    In order to prevent switching gtid_mode from ON_PERMISSIVE to ON when
    there are ongoing anonymous transactions, we introduce a counter that
    counts the number of ongoing anonymous transactions.
    
    @atomic_class.h
    - Auxiliary class to use C++ syntax to access atomic integers.
    
    @rpl_gtid.h
    - Add member functions in Gtid_state to acquire and release anonymous
    ownership.
    
    @rpl_gtid_execution.cc
    - Acquire anonymous ownership when executing set gtid_next='anonymous'.
    
    @rpl_gtid_state.cc
    - Release anonymous ownership in update_gtid_impl.
    - Acquire anonymous ownership in generate_automatic_gtid.
    
    @binlog.cc:
    - Decrease global counter when releasing anonymous ownership.
    - When thread holds anonymous ownership, and gtid_end_transaction is
    called, it should call update_on_commit instead of clear_owned_gtids, so
    that it releases anonymous ownership.
Loading