![]()  | 
  
    MySQL 9.5.0
    
   Source Code Documentation 
   | 
 
Transaction system. More...
#include "data0type.h"#include "srv0srv.h"#include "trx0trx.h"#include "mtr0log.h"#include "my_dbug.h"Typedefs | |
| typedef byte | trx_sysf_rseg_t | 
Functions | |
| void | trx_sys_write_max_trx_id (void) | 
| Writes the value of max_trx_id to the file based trx system header.  More... | |
| static bool | trx_sys_hdr_page (const page_id_t &page_id) | 
| Checks if a page address is the trx sys header page.  More... | |
| static trx_sysf_t * | trx_sysf_get (mtr_t *mtr) | 
| static page_no_t | trx_sysf_rseg_get_page_no (trx_sysf_t *sys_header, ulint slot, mtr_t *mtr) | 
| static void | trx_sysf_rseg_set_space (trx_sysf_t *sys_header, ulint slot, space_id_t space, mtr_t *mtr) | 
| static void | trx_sysf_rseg_set_page_no (trx_sysf_t *sys_header, ulint slot, page_no_t page_no, mtr_t *mtr) | 
| static void | trx_write_trx_id (byte *ptr, trx_id_t id) | 
| Writes a trx id to an index page.  More... | |
| static trx_id_t | trx_read_trx_id (const byte *ptr) | 
| Reads a trx id from an index page.  More... | |
| static trx_t * | trx_rw_is_active (trx_id_t trx_id, bool do_ref_count) | 
| trx_id_t | trx_sys_get_trx_id_write_margin () | 
| trx_id_t | trx_sys_allocate_trx_id_or_no () | 
| Allocates a new transaction id or transaction number.  More... | |
| trx_id_t | trx_sys_allocate_trx_id () | 
| Allocates a new transaction id (for trx->id).  More... | |
| trx_id_t | trx_sys_allocate_trx_no () | 
| Allocates a new transaction number (for trx->no).  More... | |
| static trx_id_t | trx_get_serialisation_min_trx_no (void) | 
| Reads trx->no up to which all transactions have been serialised.  More... | |
| trx_id_t | trx_sys_get_next_trx_id_or_no () | 
| Retrieves a next value that will be allocated if trx_sys_allocate_trx_id() or trx_sys_allocate_trx_id_trx_no() was called.  More... | |
| static bool | trx_sys_need_rollback () | 
| Determine if there are incomplete transactions in the system.  More... | |
| static void | trx_sys_rw_trx_add (trx_t *trx) | 
Variables | |
| constexpr uint32_t | TRX_SYS_RSEG_SPACE = 0 | 
| space where the segment header is placed; starting with MySQL/InnoDB 5.1.7, this is FIL_NULL if the slot is unused  More... | |
| constexpr uint32_t | TRX_SYS_RSEG_PAGE_NO = 4 | 
| page number where the segment header is placed; this is FIL_NULL if the slot is unused  More... | |
| constexpr uint32_t | TRX_SYS_RSEG_SLOT_SIZE = 8 | 
Transaction system.
Created 3/26/1996 Heikki Tuuri
| typedef byte trx_sysf_rseg_t | 
      
  | 
  inlinestatic | 
Reads trx->no up to which all transactions have been serialised.
Reads a trx id from an index page.
In case that the id size changes in some future version, this function should be used instead of mach_read_...
| ptr | in: pointer to memory from where to read | 
      
  | 
  inline | 
Allocates a new transaction id (for trx->id).
Before calling, the trx_sys_mutex must be acquired.
      
  | 
  inline | 
Allocates a new transaction id or transaction number.
      
  | 
  inline | 
Allocates a new transaction number (for trx->no).
Before calling, the trx_sys_serialisation_mutex must be acquired.
      
  | 
  inline | 
Retrieves a next value that will be allocated if trx_sys_allocate_trx_id() or trx_sys_allocate_trx_id_trx_no() was called.
      
  | 
  inline | 
      
  | 
  inlinestatic | 
Checks if a page address is the trx sys header page.
| [in] | page_id | page id | 
      
  | 
  inlinestatic | 
Determine if there are incomplete transactions in the system.
      
  | 
  inlinestatic | 
| void trx_sys_write_max_trx_id | ( | void | ) | 
Writes the value of max_trx_id to the file based trx system header.
      
  | 
  inlinestatic | 
      
  | 
  inlinestatic | 
      
  | 
  inlinestatic | 
      
  | 
  inlinestatic | 
Writes a trx id to an index page.
In case that the id size changes in some future version, this function should be used instead of mach_write_...
| ptr | in: pointer to memory where written | 
| id | in: id | 
      
  | 
  constexpr | 
page number where the segment header is placed; this is FIL_NULL if the slot is unused
      
  | 
  constexpr | 
      
  | 
  constexpr | 
space where the segment header is placed; starting with MySQL/InnoDB 5.1.7, this is FIL_NULL if the slot is unused