MySQL 26.7.0
Source Code Documentation
trx0undo_trunc.h File Reference

Undo truncation handling. More...

#include "dict0dict.h"
#include "fsp0fsp.h"
#include "trx0sys.h"

Go to the source code of this file.

Classes

class  undo_truncate::Undo_num2id_map
 Map from undo tablespace number to space id to allow a reserved undo space ID to be found quickly. More...
 
struct  undo_truncate::Tablespace
 An undo_truncate::Tablespace object is used to easily convert between undo_space_id and undo_space_num and to create the automatic file_name and space name. More...
 
class  undo_truncate::Tablespaces
 List of undo tablespaces, each containing a list of rollback segments. More...
 
class  undo_truncate::Truncate
 Track an UNDO tablespace marked for truncate. More...
 
class  undo_truncate::Inject_failure_once
 Inject a failure in the undo truncation debug compiled code at various places so that it fails the first time it hits and succeeds after that. More...
 

Namespaces

namespace  undo_truncate
 

Functions

bool undo_truncate::is_active_truncate_log_present (space_id_t space_num)
 Check if TRUNCATE_DDL_LOG file exist. More...
 
void undo_truncate::remove_truncate_log_file (space_id_t space_num)
 Remove TRUNCATE_DDL_LOG file if it exists. More...
 
char * undo_truncate::make_space_name (space_id_t space_id)
 Build a standard undo tablespace name from a space_id. More...
 
char * undo_truncate::make_file_name (space_id_t space_id)
 Build a standard undo tablespace file name from a space_id. More...
 
bool undo_truncate::is_reserved (space_id_t space_id)
 Check if the space_id is an undo space ID in the reserved range. More...
 
space_id_t undo_truncate::num2id (space_id_t space_num, size_t ndx)
 Convert an undo space number (from 1 to 127) into the undo space_id, given an index indicating which space_id from the pool assigned to that undo number. More...
 
space_id_t undo_truncate::num2id (space_id_t space_num)
 Convert an undo space number (from 1 to 127) into an undo space_id. More...
 
space_id_t undo_truncate::id2num (space_id_t space_id)
 Get the corresponding UNDO space number for a given UNDO space id. More...
 
space_id_t undo_truncate::id2next_id (space_id_t space_id)
 
void undo_truncate::set_active (space_id_t space_id)
 Set an undo tablespace active. More...
 
void undo_truncate::use_space_id (space_id_t space_id)
 Note that the undo space number for a space ID is being used. More...
 
space_id_t undo_truncate::use_next_space_id (space_id_t space_num)
 Mark that the given undo space number is being used and return the next available space_id for that space number. More...
 
space_id_t undo_truncate::next_space_id (space_id_t space_id)
 Given a valid undo space_id, return the next space_id for that space number. More...
 
space_id_t undo_truncate::next_space_id (space_id_t space_id, space_id_t space_num)
 Given a valid undo space_id or SPACE_UNKNOWN, return the next space_id for the given space number. More...
 
void undo_truncate::unuse_space_id (space_id_t space_id)
 Mark an undo number associated with a given space_id as unused and available to be reused. More...
 
space_id_t undo_truncate::get_next_available_space_id ()
 Return the next available undo space ID to be used for a new explicit undo tablespaces. More...
 
void undo_truncate::mark_undo_tablespace_unusable (space_id_t space_id, mtr_t *mtr)
 Set the FSP_FLAGS_MASK_UNDO_UNUSABLE flag in the undo tablespace header to indicate that the undo file is not usable. More...
 
void undo_truncate::mark_undo_tablespace_usable (space_id_t space_id, mtr_t *mtr)
 Unset the FSP_FLAGS_MASK_UNDO_UNUSABLE in the undo tablespace header to indicate that the undo file is now usable. More...
 
void undo_truncate::inject_crash (const char *injection_point_name)
 Inject a crash if a certain SET GLOBAL DEBUG has been set. More...
 

Variables

static constexpr char undo_truncate::s_log_prefix [] = "undo_"
 Truncate Log file Prefix. More...
 
static constexpr char undo_truncate::s_log_ext [] = "trunc.log"
 Truncate Log file Extension. More...
 
ib_mutex_t undo_truncate::ddl_mutex
 Mutex for serializing undo tablespace related DDL. More...
 
ut::unique_ptr< Undo_num2id_map > undo_truncate::num2id_map
 
Tablespaces * undo_truncate::spaces
 A global object that contains a vector of undo_truncate::Tablespace structs. More...
 
constexpr ulint undo_truncate::TRUNCATE_FREQUENCY = 128
 

Detailed Description

Undo truncation handling.