The MVCC read view manager.  
 More...
#include <read0read.h>
 | 
| view_list_t  | m_free | 
|   | Free views ready for reuse.  More...
  | 
|   | 
| view_list_t  | m_views | 
|   | Active and closed views, the closed views will have the creator trx id set to TRX_ID_MAX.  More...
  | 
|   | 
The MVCC read view manager. 
 
◆ MVCC() [1/2]
Constructor. 
- Parameters
 - 
  
    | size | Number of views to pre-allocate  | 
  
   
 
 
◆ ~MVCC()
Destructor. 
Free all the views in the m_free list 
 
 
◆ MVCC() [2/2]
  
  
      
        
          | MVCC::MVCC  | 
          ( | 
          const MVCC &  | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
 
◆ clone_oldest_view()
      
        
          | void MVCC::clone_oldest_view  | 
          ( | 
          ReadView *  | 
          view | ) | 
           | 
        
      
 
Clones the oldest view into the provided view, unless the function determines that the provided view is already a good enough lower bound. 
The caller owns the view that is passed in, which is interpreted to be a previous lower bound known to the caller. No need to call view_close(view,..).
Note: This function is called by Purge to determine the purge_sys->view used to distinguish which transactions are considered committed by everybody, and thus their undo logs can be purged. Purge mainly uses purge_sys->view->low_limit_no(), which is a safe lower-bound on what can be purged based on NO, and further limits it to the lowest needed NO reported by GTID Persistor. But other places like ROLLBACK use purge_sys->view->changes_visible(ID,..). 
- Parameters
 - 
  
    | [in,out] | view | Preallocated view, owned by the caller. Can be either default constructed (m_low_limit_no is 0) or a fully initialized ReadView object.  | 
  
   
 
 
◆ get_view()
Find a free view from the active list, if none found then allocate a new view. 
This function will also attempt to move delete marked views from the active list to the freed list. 
- Returns
 - a view to use
 
- 
a view to use 
 
 
 
◆ is_view_active()
  
  
      
        
          | static bool MVCC::is_view_active  | 
          ( | 
          ReadView *  | 
          view | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
- Returns
 - true if the view is active and valid 
 
 
 
◆ operator=()
◆ set_view_creator_trx_id()
Set the view creator transaction id. 
Note: This should be set only for views created by RW transactions. 
- Parameters
 - 
  
    | view | Set the creator trx id for this view  | 
    | id | Transaction id to set  | 
  
   
 
 
◆ size()
      
        
          | ulint MVCC::size  | 
          ( | 
           | ) | 
           const | 
        
      
 
- Returns
 - the number of active views 
 
 
 
◆ UT_LIST_BASE_NODE_T()
  
  
      
        
          | typedef MVCC::UT_LIST_BASE_NODE_T  | 
          ( | 
          ReadView  | 
          ,  | 
         
        
           | 
           | 
          m_view_list  | 
            | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
private   | 
  
 
 
◆ validate()
  
  
      
        
          | bool MVCC::validate  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
private   | 
  
 
Validates a read view list. 
 
 
◆ view_close()
      
        
          | void MVCC::view_close  | 
          ( | 
          ReadView *&  | 
          view,  | 
        
        
           | 
           | 
          bool  | 
          own_mutex  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Close a view created by the above function. 
- Parameters
 - 
  
    | view | view allocated by trx_open.  | 
    | own_mutex | true if caller owns trx_sys_t::mutex  | 
  
   
 
 
◆ view_open()
Allocate and create a view. 
- Parameters
 - 
  
    | view | View owned by this class created for the caller. Must be freed by calling view_close()  | 
    | trx | Transaction instance of caller  | 
  
   
If no new RW transaction has been started since the last view was created then reuse the the existing view.
 
 
◆ m_free
Free views ready for reuse. 
 
 
◆ m_views
  
  
      
        
          | view_list_t MVCC::m_views | 
         
       
   | 
  
private   | 
  
 
Active and closed views, the closed views will have the creator trx id set to TRX_ID_MAX. 
 
 
The documentation for this class was generated from the following files: