MySQL 26.7.0
Source Code Documentation
trx0undo_trunc.cc File Reference

Undo truncation handling. More...

#include "trx0undo_trunc.h"
#include "fil0fil.h"
#include "fil0tablespace_scan.h"
#include "log0helpers.h"
#include "srv0srv.h"
#include "trx0purge.h"
#include "univ.i"
#include "ut0new.h"

Classes

class  undo_truncate::Space_id_bank
 A bank of UNDO space ids which is a lock free repository for information about the space IDs used for undo tablespaces. More...
 
struct  undo_truncate::Space_id_bank::Space_id_account
 The currently used undo space IDs for an undo space along with a boolean showing whether the undo space number is in use. More...
 

Namespaces

namespace  undo_truncate
 

Functions

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::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::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::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::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...
 
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...
 
void undo_truncate::set_active (space_id_t space_id)
 Set an undo tablespace active. 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...
 
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::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 Space_id_bank undo_truncate::space_id_bank
 

Detailed Description

Undo truncation handling.