MySQL  8.0.21
Source Code Documentation
fil_space_t Struct Reference

Tablespace or log data space. More...

#include <fil0fil.h>

Public Types

using List_node = UT_LIST_NODE_T(fil_space_t)
 
using Files = std::vector< fil_node_t, ut_allocator< fil_node_t > >
 

Public Member Functions

void release_free_extents (ulint n_reserved)
 Release the reserved free extents. More...
 
bool is_deleted ()
 Determine if this space was deleted with BUF_REMOVE_NONE. More...
 
std::ostream & print_xdes_pages (std::ostream &out) const
 Print the extent descriptor pages of this tablespace into the given output stream. More...
 
void print_xdes_pages (const char *filename) const
 Print the extent descriptor pages of this tablespace into the given file. More...
 

Public Attributes

char * name
 Tablespace name. More...
 
space_id_t id
 Tablespace ID. More...
 
bool stop_ios
 true if we want to rename the .ibd file of tablespace and want to stop temporarily posting of new i/o requests on the file More...
 
bool stop_new_ops
 We set this true when we start deleting a single-table tablespace. More...
 
ulint redo_skipped_count
 Reference count for operations who want to skip redo log in the file space in order to make fsp_space_modify_check pass. More...
 
fil_type_t purpose
 Purpose. More...
 
Files files
 Files attached to this tablespace. More...
 
page_no_t size
 Tablespace file size in pages; 0 if not known yet. More...
 
page_no_t size_in_header
 FSP_SIZE in the tablespace header; 0 if not known yet. More...
 
uint32_t free_len
 Length of the FSP_FREE list. More...
 
page_no_t free_limit
 Contents of FSP_FREE_LIMIT. More...
 
uint32_t flags
 Tablespace flags; see fsp_flags_is_valid() and page_size_t(ulint) (constructor). More...
 
uint32_t n_reserved_extents
 Number of reserved free extents for ongoing operations like B-tree page split. More...
 
uint32_t n_pending_flushes
 This is positive when flushing the tablespace to disk; dropping of the tablespace is forbidden if this is positive. More...
 
uint32_t n_pending_ops
 This is positive when we have pending operations against this tablespace. More...
 
rw_lock_t latch
 Latch protecting the file space storage allocation. More...
 
List_node unflushed_spaces
 List of spaces with at least one unflushed file we have written to. More...
 
bool is_in_unflushed_spaces
 true if this space is currently in unflushed_spaces More...
 
Compression::Type compression_type
 Compression algorithm. More...
 
Encryption::Type encryption_type
 Encryption algorithm. More...
 
byte encryption_key [Encryption::KEY_LEN]
 Encrypt key. More...
 
ulint encryption_klen
 Encrypt key length. More...
 
byte encryption_iv [Encryption::KEY_LEN]
 Encrypt initial vector. More...
 
encryption_op_type encryption_op_in_progress
 Encryption is in progress. More...
 
ulint magic_n
 FIL_SPACE_MAGIC_N. More...
 
lsn_t m_deleted_lsn
 LSN when the instance was deleted. More...
 

Static Public Attributes

static fil_space_ts_sys_space
 System tablespace. More...
 
static fil_space_ts_redo_space
 Redo log tablespace. More...
 

Detailed Description

Tablespace or log data space.

Member Typedef Documentation

◆ Files

◆ List_node

Member Function Documentation

◆ is_deleted()

bool fil_space_t::is_deleted ( )
inline

Determine if this space was deleted with BUF_REMOVE_NONE.

Returns
true if the space was deleted

◆ print_xdes_pages() [1/2]

std::ostream & fil_space_t::print_xdes_pages ( std::ostream &  out) const

Print the extent descriptor pages of this tablespace into the given output stream.

Print the extent descriptor pages of this tablespace into the given file.

Parameters
[in]outthe output stream.
Returns
the output stream.
Parameters
[in]outthe output file name.
Returns
the output stream.

◆ print_xdes_pages() [2/2]

void fil_space_t::print_xdes_pages ( const char *  filename) const

Print the extent descriptor pages of this tablespace into the given file.

Parameters
[in]filenamethe output file name.

◆ release_free_extents()

void fil_space_t::release_free_extents ( ulint  n_reserved)

Release the reserved free extents.

Parameters
[in]n_reservednumber of reserved extents

Member Data Documentation

◆ compression_type

Compression::Type fil_space_t::compression_type

Compression algorithm.

◆ encryption_iv

byte fil_space_t::encryption_iv[Encryption::KEY_LEN]

Encrypt initial vector.

◆ encryption_key

byte fil_space_t::encryption_key[Encryption::KEY_LEN]

Encrypt key.

◆ encryption_klen

ulint fil_space_t::encryption_klen

Encrypt key length.

◆ encryption_op_in_progress

encryption_op_type fil_space_t::encryption_op_in_progress

Encryption is in progress.

◆ encryption_type

Encryption::Type fil_space_t::encryption_type

Encryption algorithm.

◆ files

Files fil_space_t::files

Files attached to this tablespace.

Note: Only the system tablespace can have multiple files, this is a legacy issue.

◆ flags

uint32_t fil_space_t::flags

Tablespace flags; see fsp_flags_is_valid() and page_size_t(ulint) (constructor).

This is protected by space->latch and tablespace MDL

◆ free_len

uint32_t fil_space_t::free_len

Length of the FSP_FREE list.

◆ free_limit

page_no_t fil_space_t::free_limit

Contents of FSP_FREE_LIMIT.

◆ id

space_id_t fil_space_t::id

Tablespace ID.

◆ is_in_unflushed_spaces

bool fil_space_t::is_in_unflushed_spaces

true if this space is currently in unflushed_spaces

◆ latch

rw_lock_t fil_space_t::latch

Latch protecting the file space storage allocation.

◆ m_deleted_lsn

lsn_t fil_space_t::m_deleted_lsn

LSN when the instance was deleted.

◆ magic_n

ulint fil_space_t::magic_n

FIL_SPACE_MAGIC_N.

◆ n_pending_flushes

uint32_t fil_space_t::n_pending_flushes

This is positive when flushing the tablespace to disk; dropping of the tablespace is forbidden if this is positive.

◆ n_pending_ops

uint32_t fil_space_t::n_pending_ops

This is positive when we have pending operations against this tablespace.

The pending operations can be ibuf merges or lock validation code trying to read a block. Dropping of the tablespace is forbidden if this is positive. Protected by Fil_shard::m_mutex.

◆ n_reserved_extents

uint32_t fil_space_t::n_reserved_extents

Number of reserved free extents for ongoing operations like B-tree page split.

◆ name

char* fil_space_t::name

Tablespace name.

◆ purpose

fil_type_t fil_space_t::purpose

Purpose.

◆ redo_skipped_count

ulint fil_space_t::redo_skipped_count

Reference count for operations who want to skip redo log in the file space in order to make fsp_space_modify_check pass.

◆ s_redo_space

fil_space_t * fil_space_t::s_redo_space
static

Redo log tablespace.

◆ s_sys_space

fil_space_t * fil_space_t::s_sys_space
static

System tablespace.

◆ size

page_no_t fil_space_t::size

Tablespace file size in pages; 0 if not known yet.

◆ size_in_header

page_no_t fil_space_t::size_in_header

FSP_SIZE in the tablespace header; 0 if not known yet.

◆ stop_ios

bool fil_space_t::stop_ios

true if we want to rename the .ibd file of tablespace and want to stop temporarily posting of new i/o requests on the file

◆ stop_new_ops

bool fil_space_t::stop_new_ops

We set this true when we start deleting a single-table tablespace.

When this is set following new ops are not allowed: read IO request ibuf merge file flush Note that we can still possibly have new write operations because we don't check this flag when doing flush batches.

◆ unflushed_spaces

List_node fil_space_t::unflushed_spaces

List of spaces with at least one unflushed file we have written to.


The documentation for this struct was generated from the following files: