MySQL  8.0.21
Source Code Documentation
fsp0fsp.h File Reference

File space management. More...

#include "univ.i"
#include "fsp0space.h"
#include "fut0lst.h"
#include "mtr0mtr.h"
#include "mysql/components/services/mysql_cond_bits.h"
#include "mysql/components/services/mysql_mutex_bits.h"
#include "page0types.h"
#include "rem0types.h"
#include "ut0byte.h"
#include <random>
#include "fsp0types.h"
#include "fsp0fsp.ic"

Go to the source code of this file.

Classes

struct  xdes_mem_t
 
struct  fsp_header_mem_t
 In-memory representation of the fsp_header_t file structure. More...
 
class  File_segment_inode
 A wrapper class to operate on a file segment inode pointer (fseg_inode_t*) More...
 

Macros

#define FSP_HEADER_OFFSET   FIL_PAGE_DATA
 Offset of the space header within a file page. More...
 
#define FSP_SDI_HEADER_LEN   8
 The number of bytes required to store SDI root page number(4) and SDI version(4) at Page 0. More...
 
#define FSP_SPACE_ID   0 /* space id */
 
#define FSP_NOT_USED
 
#define FSP_SIZE
 
#define FSP_FREE_LIMIT
 
#define FSP_SPACE_FLAGS
 
#define FSP_FRAG_N_USED
 
#define FSP_FREE   24 /* list of free extents */
 
#define FSP_FREE_FRAG   (24 + FLST_BASE_NODE_SIZE)
 
#define FSP_FULL_FRAG   (24 + 2 * FLST_BASE_NODE_SIZE)
 
#define FSP_SEG_ID   (24 + 3 * FLST_BASE_NODE_SIZE)
 
#define FSP_SEG_INODES_FULL   (32 + 3 * FLST_BASE_NODE_SIZE)
 
#define FSP_SEG_INODES_FREE   (32 + 4 * FLST_BASE_NODE_SIZE)
 
#define FSP_HEADER_SIZE   (32 + 5 * FLST_BASE_NODE_SIZE)
 
#define FSP_FREE_ADD
 
#define FSEG_INODE_PAGE_NODE   FSEG_PAGE_DATA
 
#define FSEG_ARR_OFFSET   (FSEG_PAGE_DATA + FLST_NODE_SIZE)
 
#define FSEG_ID
 
#define FSEG_NOT_FULL_N_USED   8
 
#define FSEG_FREE   12
 
#define FSEG_NOT_FULL   (12 + FLST_BASE_NODE_SIZE)
 
#define FSEG_FULL   (12 + 2 * FLST_BASE_NODE_SIZE)
 
#define FSEG_MAGIC_N   (12 + 3 * FLST_BASE_NODE_SIZE)
 
#define FSEG_FRAG_ARR   (16 + 3 * FLST_BASE_NODE_SIZE)
 
#define FSEG_FRAG_ARR_N_SLOTS   (FSP_EXTENT_SIZE / 2)
 
#define FSEG_FRAG_SLOT_SIZE
 
#define FSEG_INODE_SIZE   (16 + 3 * FLST_BASE_NODE_SIZE + FSEG_FRAG_ARR_N_SLOTS * FSEG_FRAG_SLOT_SIZE)
 
#define FSP_SEG_INODES_PER_PAGE(page_size)   ((page_size.physical() - FSEG_ARR_OFFSET - 10) / FSEG_INODE_SIZE)
 
#define FSEG_MAGIC_N_VALUE   97937874
 
#define FSEG_FILLFACTOR
 
#define FSEG_FRAG_LIMIT   FSEG_FRAG_ARR_N_SLOTS
 
#define FSEG_FREE_LIST_LIMIT
 
#define FSEG_FREE_LIST_MAX_LEN   4
 
#define XDES_ID
 
#define XDES_FLST_NODE
 
#define XDES_STATE   (FLST_NODE_SIZE + 8)
 
#define XDES_BITMAP   (FLST_NODE_SIZE + 12)
 
#define XDES_BITS_PER_PAGE   2 /* How many bits are there per page */
 
#define XDES_FREE_BIT
 
#define XDES_CLEAN_BIT
 
#define XDES_SIZE   (XDES_BITMAP + UT_BITS_IN_BYTES(FSP_EXTENT_SIZE * XDES_BITS_PER_PAGE))
 File extent data structure size in bytes. More...
 
#define XDES_SIZE_MAX   (XDES_BITMAP + UT_BITS_IN_BYTES(FSP_EXTENT_SIZE_MAX * XDES_BITS_PER_PAGE))
 File extent data structure size in bytes for MAX page size. More...
 
#define XDES_SIZE_MIN   (XDES_BITMAP + UT_BITS_IN_BYTES(FSP_EXTENT_SIZE_MIN * XDES_BITS_PER_PAGE))
 File extent data structure size in bytes for MIN page size. More...
 
#define XDES_ARR_OFFSET   (FSP_HEADER_OFFSET + FSP_HEADER_SIZE)
 Offset of the descriptor array on a descriptor page. More...
 
#define fseg_alloc_free_page(seg_header, hint, direction, mtr)   fseg_alloc_free_page_general(seg_header, hint, direction, FALSE, mtr, mtr)
 Allocates a single free page from a segment. More...
 

Typedefs

typedef byte fsp_header_t
 
typedef byte xdes_t
 
typedef byte fseg_inode_t
 

Enumerations

enum  xdes_state_t {
  XDES_NOT_INITED = 0, XDES_FREE = 1, XDES_FREE_FRAG = 2, XDES_FULL_FRAG = 3,
  XDES_FSEG = 4, XDES_FSEG_FRAG = 5
}
 States of a descriptor. More...
 

Functions

bool xdes_state_is_valid (ulint state)
 Check if the state of extent descriptor is valid. More...
 
std::ostream & operator<< (std::ostream &out, const xdes_mem_t &obj)
 
std::ostream & operator<< (std::ostream &out, const fsp_header_mem_t &obj)
 
void fsp_init (void)
 Initializes the file space system. More...
 
page_no_t fsp_header_get_tablespace_size (void)
 Gets the size of the system tablespace from the tablespace header. More...
 
page_no_t fsp_get_pages_to_extend_ibd (const page_size_t &page_size, page_no_t size)
 Calculate the number of pages to extend a datafile. More...
 
UNIV_INLINE page_no_t fsp_get_extent_size_in_pages (const page_size_t &page_size)
 Calculate the number of physical pages in an extent for this file. More...
 
space_id_t fsp_header_get_space_id (const page_t *page)
 Reads the space id from the first page of a tablespace. More...
 
bool fsp_header_dict_get_server_version (uint *version)
 Read the server version number from the DD tablespace header. More...
 
uint32_t fsp_header_get_field (const page_t *page, ulint field)
 Read a tablespace header field. More...
 
uint32_t fsp_header_get_flags (const page_t *page)
 Read the flags from the tablespace header page. More...
 
page_size_t fsp_header_get_page_size (const page_t *page)
 Reads the page size from the first page of a tablespace. More...
 
bool fsp_header_get_encryption_key (uint32_t fsp_flags, byte *key, byte *iv, page_t *page)
 Reads the encryption key from the first page of a tablespace. More...
 
encryption_op_type fsp_header_encryption_op_type_in_progress (const page_t *page, page_size_t page_size)
 Get encryption operation type in progress from the first page of a tablespace. More...
 
bool fsp_check_tablespace_size (space_id_t space_id)
 Check if the tablespace size information is valid. More...
 
void fsp_header_init_fields (page_t *page, space_id_t space_id, uint32_t flags)
 Writes the space id and flags to a tablespace header. More...
 
ulint fsp_header_get_encryption_offset (const page_size_t &page_size)
 Get the offset of encrytion information in page 0. More...
 
bool fsp_header_write_encryption (space_id_t space_id, uint32_t space_flags, byte *encrypt_info, bool update_fsp_flags, bool rotate_encryption, mtr_t *mtr)
 Write the encryption info into the space header. More...
 
bool fsp_header_write_encryption_progress (space_id_t space_id, ulint space_flags, ulint progress_info, byte operation_type, bool update_operation_type, mtr_t *mtr)
 Write the encryption progress info into the space header. More...
 
bool fsp_header_rotate_encryption (fil_space_t *space, byte *encrypt_info, mtr_t *mtr)
 Rotate the encryption info in the space header. More...
 
bool fsp_header_init (space_id_t space_id, page_no_t size, mtr_t *mtr, bool is_boot)
 Initializes the space header of a new created space and creates also the insert buffer tree root if space == 0. More...
 
void fsp_header_inc_size (space_id_t space_id, page_no_t size_inc, mtr_t *mtr)
 Increases the space size field of a space. More...
 
buf_block_tfseg_create (space_id_t space, page_no_t page, ulint byte_offset, mtr_t *mtr)
 Creates a new segment. More...
 
buf_block_tfseg_create_general (space_id_t space_id, page_no_t page, ulint byte_offset, ibool has_done_reservation, mtr_t *mtr)
 Creates a new segment. More...
 
ulint fseg_n_reserved_pages (fseg_header_t *header, ulint *used, mtr_t *mtr)
 Calculates the number of pages reserved by a segment, and how many pages are currently used. More...
 
buf_block_tfseg_alloc_free_page_general (fseg_header_t *seg_header, page_no_t hint, byte direction, ibool has_done_reservation, mtr_t *mtr, mtr_t *init_mtr)
 Allocates a single free page from a segment. More...
 
bool fsp_reserve_free_extents (ulint *n_reserved, space_id_t space_id, ulint n_ext, fsp_reserve_t alloc_type, mtr_t *mtr, page_no_t n_pages=2)
 Reserves free pages from a tablespace. More...
 
uintmax_t fsp_get_available_space_in_free_extents (space_id_t space_id)
 Calculate how many KiB of new data we will be able to insert to the tablespace without running out of space. More...
 
uintmax_t fsp_get_available_space_in_free_extents (const fil_space_t *space)
 Calculate how many KiB of new data we will be able to insert to the tablespace without running out of space. More...
 
void fseg_free_page (fseg_header_t *seg_header, space_id_t space_id, page_no_t page, bool ahi, mtr_t *mtr)
 Frees a single page of a segment. More...
 
bool fseg_page_is_free (fseg_header_t *seg_header, space_id_t space_id, page_no_t page)
 Checks if a single page of a segment is free. More...
 
ibool fseg_free_step (fseg_header_t *header, bool ahi, mtr_t *mtr)
 Frees part of a segment. More...
 
ibool fseg_free_step_not_header (fseg_header_t *header, bool ahi, mtr_t *mtr)
 Frees part of a segment. More...
 
UNIV_INLINE ibool fsp_descr_page (const page_id_t &page_id, const page_size_t &page_size)
 Checks if a page address is an extent descriptor page address. More...
 
bytefsp_parse_init_file_page (byte *ptr, byte *end_ptr, buf_block_t *block)
 Parses a redo log record of a file page init. More...
 
bool fsp_is_undo_tablespace (space_id_t space_id)
 Check whether a space id is an undo tablespace ID. More...
 
UNIV_INLINE bool fsp_is_system_tablespace (space_id_t space_id)
 
UNIV_INLINE bool fsp_is_system_or_temp_tablespace (space_id_t space_id)
 Check if the space_id is for a system-tablespace (shared + temp). More...
 
UNIV_INLINE bool fsp_is_ibd_tablespace (space_id_t space_id)
 Determine if the space ID is an IBD tablespace, either file_per_table or a general shared tablespace, where user tables exist. More...
 
UNIV_INLINE bool fsp_is_file_per_table (space_id_t space_id, uint32_t fsp_flags)
 Check if tablespace is file-per-table. More...
 
bool fsp_is_dd_tablespace (space_id_t space_id)
 Check if tablespace is dd tablespace. More...
 
UNIV_INLINE bool fsp_flags_is_compressed (uint32_t flags)
 Determine if the tablespace is compressed from tablespace flags. More...
 
UNIV_INLINE bool fsp_flags_are_equal (uint32_t flags1, uint32_t flags2)
 Determine if two tablespaces are equivalent or compatible. More...
 
UNIV_INLINE uint32_t fsp_flags_init (const page_size_t &page_size, bool atomic_blobs, bool has_data_dir, bool is_shared, bool is_temporary, bool is_encrypted=false)
 Initialize an FSP flags integer. More...
 
uint32_t fsp_flags_to_dict_tf (uint32_t fsp_flags, bool compact)
 Convert a 32 bit integer tablespace flags to the 32 bit table flags. More...
 
UNIV_INLINE ulint xdes_calc_descriptor_index (const page_size_t &page_size, ulint offset)
 Calculates the descriptor index within a descriptor page. More...
 
UNIV_INLINE ibool xdes_get_bit (const xdes_t *descr, ulint bit, page_no_t offset)
 Gets a descriptor bit of a page. More...
 
UNIV_INLINE page_no_t xdes_calc_descriptor_page (const page_size_t &page_size, page_no_t offset)
 Calculates the page where the descriptor of a page resides. More...
 
fsp_header_tfsp_get_space_header (space_id_t id, const page_size_t &page_size, mtr_t *mtr)
 Gets a pointer to the space header and x-locks its page. More...
 
page_no_t fsp_sdi_get_root_page_num (space_id_t space, const page_size_t &page_size, mtr_t *mtr)
 Retrieve tablespace dictionary index root page number stored in the page 0. More...
 
void fsp_sdi_write_root_to_page (page_t *page, const page_size_t &page_size, page_no_t root_page_num, mtr_t *mtr)
 Write SDI Index root page num to page 0 of tablespace. More...
 
uint32 fsp_header_get_server_version (const page_t *page)
 Reads the server version from the first page of a tablespace. More...
 
uint32 fsp_header_get_space_version (const page_t *page)
 Reads the server space version from the first page of a tablespace. More...
 
xdes_state_t xdes_get_state (const xdes_t *descr, mtr_t *mtr)
 Get the state of an xdes. More...
 
std::ostream & xdes_page_print (std::ostream &out, const page_t *xdes, page_no_t page_no, mtr_t *mtr)
 Print the extent descriptor page in user-friendly format. More...
 
void fsp_header_size_update (fsp_header_t *header, ulint size, mtr_t *mtr)
 Update the tablespace size information and generate redo log for it. More...
 
bool fsp_is_inode_page (page_no_t page)
 Check if a specified page is inode page or not. More...
 
ulint fsp_header_get_sdi_offset (const page_size_t &page_size)
 Get the offset of SDI root page number in page 0. More...
 
ulint fsp_header_get_encryption_progress_offset (const page_size_t &page_size)
 Get the offset of encrytion progress information in page 0. More...
 
dberr_t fsp_has_sdi (space_id_t space_id)
 Determine if the tablespace has SDI. More...
 
dberr_t fsp_alter_encrypt_tablespace (THD *thd, space_id_t space_id, page_no_t from_page, bool to_encrypt, bool in_recovery, void *dd_space_in)
 Encrypt/Unencrypt a tablespace. More...
 
void fsp_init_resume_alter_encrypt_tablespace ()
 Initiate roll-forward of alter encrypt in background thread. More...
 
std::ostream & operator<< (std::ostream &out, const File_segment_inode &obj)
 The global output stream operator is overloaded to work with an object of type File_segment_inode. More...
 

Variables

std::vector< DDL_Record * > ts_encrypt_ddl_records
 DDL records for tablespace (un)encryption. More...
 
mysql_cond_t resume_encryption_cond
 
mysql_mutex_t resume_encryption_cond_m
 
const ulint XDES_FRAG_N_USED = 2
 The number of reserved pages in a fragment extent. More...
 

Detailed Description

File space management.

Created 12/18/1995 Heikki Tuuri

Macro Definition Documentation

◆ fseg_alloc_free_page

#define fseg_alloc_free_page (   seg_header,
  hint,
  direction,
  mtr 
)    fseg_alloc_free_page_general(seg_header, hint, direction, FALSE, mtr, mtr)

Allocates a single free page from a segment.

This function implements the intelligent allocation strategy which tries to minimize file space fragmentation.

Parameters
[in,out]seg_headersegment header
[in]hinthint of which page would be desirable
[in]directionif the new page is needed because of an index page split, and records are inserted there in order, into which direction they go alphabetically: FSP_DOWN, FSP_UP, FSP_NO_DIR
[in,out]mtrmini-transaction
Returns
X-latched block, or NULL if no page could be allocated

◆ FSEG_ARR_OFFSET

#define FSEG_ARR_OFFSET   (FSEG_PAGE_DATA + FLST_NODE_SIZE)

◆ FSEG_FILLFACTOR

#define FSEG_FILLFACTOR
Value:
8 /* If this value is x, then if \
the number of unused but reserved \
pages in a segment is less than \
reserved pages * 1/x, and there are \
at least FSEG_FRAG_LIMIT used pages, \
then we allow a new empty extent to \
be added to the segment in \
fseg_alloc_free_page. Otherwise, we \
use unused pages of the segment. */

◆ FSEG_FRAG_ARR

#define FSEG_FRAG_ARR   (16 + 3 * FLST_BASE_NODE_SIZE)

◆ FSEG_FRAG_ARR_N_SLOTS

#define FSEG_FRAG_ARR_N_SLOTS   (FSP_EXTENT_SIZE / 2)

◆ FSEG_FRAG_LIMIT

#define FSEG_FRAG_LIMIT   FSEG_FRAG_ARR_N_SLOTS

◆ FSEG_FRAG_SLOT_SIZE

#define FSEG_FRAG_SLOT_SIZE
Value:
4 /* a fragment page slot contains its \
page number within space, FIL_NULL \
means that the slot is not in use */

◆ FSEG_FREE

#define FSEG_FREE   12

◆ FSEG_FREE_LIST_LIMIT

#define FSEG_FREE_LIST_LIMIT
Value:
40 /* If the reserved size of a segment \
is at least this many extents, we \
allow extents to be put to the free \
list of the extent: at most \
FSEG_FREE_LIST_MAX_LEN many */

◆ FSEG_FREE_LIST_MAX_LEN

#define FSEG_FREE_LIST_MAX_LEN   4

◆ FSEG_FULL

#define FSEG_FULL   (12 + 2 * FLST_BASE_NODE_SIZE)

◆ FSEG_ID

#define FSEG_ID
Value:
0 /* 8 bytes of segment id: if this is 0, \
it means that the header is unused */

◆ FSEG_INODE_PAGE_NODE

#define FSEG_INODE_PAGE_NODE   FSEG_PAGE_DATA

◆ FSEG_INODE_SIZE

#define FSEG_INODE_SIZE   (16 + 3 * FLST_BASE_NODE_SIZE + FSEG_FRAG_ARR_N_SLOTS * FSEG_FRAG_SLOT_SIZE)

◆ FSEG_MAGIC_N

#define FSEG_MAGIC_N   (12 + 3 * FLST_BASE_NODE_SIZE)

◆ FSEG_MAGIC_N_VALUE

#define FSEG_MAGIC_N_VALUE   97937874

◆ FSEG_NOT_FULL

#define FSEG_NOT_FULL   (12 + FLST_BASE_NODE_SIZE)

◆ FSEG_NOT_FULL_N_USED

#define FSEG_NOT_FULL_N_USED   8

◆ FSP_FRAG_N_USED

#define FSP_FRAG_N_USED
Value:
20 /* number of used pages in the \
FSP_FREE_FRAG list */

◆ FSP_FREE

#define FSP_FREE   24 /* list of free extents */

◆ FSP_FREE_ADD

#define FSP_FREE_ADD
Value:
4 /* this many free extents are added \
to the free list from above \
FSP_FREE_LIMIT at a time */

◆ FSP_FREE_FRAG

#define FSP_FREE_FRAG   (24 + FLST_BASE_NODE_SIZE)

◆ FSP_FREE_LIMIT

#define FSP_FREE_LIMIT
Value:
12 /* Minimum page number for which the \
free list has not been initialized: \
the pages >= this limit are, by \
definition, free; note that in a \
single-table tablespace where size \
< 64 pages, this number is 64, i.e., \
we have initialized the space \
about the first extent, but have not \
physically allocated those pages to the \
file */

◆ FSP_FULL_FRAG

#define FSP_FULL_FRAG   (24 + 2 * FLST_BASE_NODE_SIZE)

◆ FSP_HEADER_OFFSET

#define FSP_HEADER_OFFSET   FIL_PAGE_DATA

Offset of the space header within a file page.

◆ FSP_HEADER_SIZE

#define FSP_HEADER_SIZE   (32 + 5 * FLST_BASE_NODE_SIZE)

◆ FSP_NOT_USED

#define FSP_NOT_USED
Value:
4 /* this field contained a value up to \
which we know that the modifications \
in the database have been flushed to \
the file space; not used now */

◆ FSP_SDI_HEADER_LEN

#define FSP_SDI_HEADER_LEN   8

The number of bytes required to store SDI root page number(4) and SDI version(4) at Page 0.

◆ FSP_SEG_ID

#define FSP_SEG_ID   (24 + 3 * FLST_BASE_NODE_SIZE)

◆ FSP_SEG_INODES_FREE

#define FSP_SEG_INODES_FREE   (32 + 4 * FLST_BASE_NODE_SIZE)

◆ FSP_SEG_INODES_FULL

#define FSP_SEG_INODES_FULL   (32 + 3 * FLST_BASE_NODE_SIZE)

◆ FSP_SEG_INODES_PER_PAGE

#define FSP_SEG_INODES_PER_PAGE (   page_size)    ((page_size.physical() - FSEG_ARR_OFFSET - 10) / FSEG_INODE_SIZE)

◆ FSP_SIZE

#define FSP_SIZE
Value:
8 /* Current size of the space in \
pages */

◆ FSP_SPACE_FLAGS

#define FSP_SPACE_FLAGS
Value:
16 /* fsp_space_t.flags, similar to \
dict_table_t::flags */

◆ FSP_SPACE_ID

#define FSP_SPACE_ID   0 /* space id */

◆ XDES_ARR_OFFSET

#define XDES_ARR_OFFSET   (FSP_HEADER_OFFSET + FSP_HEADER_SIZE)

Offset of the descriptor array on a descriptor page.

◆ XDES_BITMAP

#define XDES_BITMAP   (FLST_NODE_SIZE + 12)

◆ XDES_BITS_PER_PAGE

#define XDES_BITS_PER_PAGE   2 /* How many bits are there per page */

◆ XDES_CLEAN_BIT

#define XDES_CLEAN_BIT
Value:
1 /* NOTE: currently not used! \
Index of the bit which tells if \
there are old versions of tuples \
on the page */

◆ XDES_FLST_NODE

#define XDES_FLST_NODE
Value:
8 /* The list node data structure \
for the descriptors */

◆ XDES_FREE_BIT

#define XDES_FREE_BIT
Value:
0 /* Index of the bit which tells if \
the page is free */

◆ XDES_ID

#define XDES_ID
Value:
0 /* The identifier of the segment \
to which this extent belongs */

◆ XDES_SIZE

File extent data structure size in bytes.

◆ XDES_SIZE_MAX

File extent data structure size in bytes for MAX page size.

◆ XDES_SIZE_MIN

File extent data structure size in bytes for MIN page size.

◆ XDES_STATE

#define XDES_STATE   (FLST_NODE_SIZE + 8)

Typedef Documentation

◆ fseg_inode_t

typedef byte fseg_inode_t

◆ fsp_header_t

typedef byte fsp_header_t

◆ xdes_t

typedef byte xdes_t

Enumeration Type Documentation

◆ xdes_state_t

States of a descriptor.

Enumerator
XDES_NOT_INITED 

extent descriptor is not initialized

XDES_FREE 

extent is in free list of space

XDES_FREE_FRAG 

extent is in free fragment list of space

XDES_FULL_FRAG 

extent is in full fragment list of space

XDES_FSEG 

extent belongs to a segment

XDES_FSEG_FRAG 

fragment extent leased to segment

Function Documentation

◆ fseg_alloc_free_page_general()

buf_block_t* fseg_alloc_free_page_general ( fseg_header_t seg_header,
page_no_t  hint,
byte  direction,
ibool  has_done_reservation,
mtr_t mtr,
mtr_t init_mtr 
)

Allocates a single free page from a segment.

This function implements the intelligent allocation strategy which tries to minimize file space fragmentation.

Return values
NULLif no page could be allocated
block,rw_lock_x_lock_count(&block->lock)== 1 if allocation succeeded (init_mtr == mtr, or the page was not previously freed in mtr)
block(not allocated or initialized) otherwise
Parameters
seg_headerin/out: segment header
hintin: hint of which page would be desirable
directionin: if the new page is needed because of an index page split, and records are inserted there in order, into which direction they go alphabetically: FSP_DOWN, FSP_UP, FSP_NO_DIR
has_done_reservationin: TRUE if the caller has already done the reservation for the page with fsp_reserve_free_extents, then there is no need to do the check for this individual page
mtrin/out: mini-transaction
init_mtrin/out: mtr or another mini-transaction in which the page should be initialized. If init_mtr!=mtr, but the page is already latched in mtr, do not initialize the page.

◆ fseg_create()

buf_block_t* fseg_create ( space_id_t  space,
page_no_t  page,
ulint  byte_offset,
mtr_t mtr 
)

Creates a new segment.

Returns
the block where the segment header is placed, x-latched, NULL if could not create segment because of lack of space in/out: mini-transaction
the block where the segment header is placed, x-latched, NULL if could not create segment because of lack of space
Parameters
spacein: space id
pagein: page where the segment header is placed: if this is != 0, the page must belong to another segment, if this is 0, a new page will be allocated and it will belong to the created segment
byte_offsetin: byte offset of the created segment header on the page
mtrin/out: mini-transaction

◆ fseg_create_general()

buf_block_t* fseg_create_general ( space_id_t  space_id,
page_no_t  page,
ulint  byte_offset,
ibool  has_done_reservation,
mtr_t mtr 
)

Creates a new segment.

Returns
the block where the segment header is placed, x-latched, NULL if could not create segment because of lack of space in/out: mini-transaction
the block where the segment header is placed, x-latched, NULL if could not create segment because of lack of space
Parameters
space_idin: space id
pagein: page where the segment header is placed: if this is != 0, the page must belong to another segment, if this is 0, a new page will be allocated and it will belong to the created segment
byte_offsetin: byte offset of the created segment header on the page
has_done_reservationin: TRUE if the caller has already done the reservation for the pages with fsp_reserve_free_extents (at least 2 extents: one for the inode and the other for the segment) then there is no need to do the check for this individual operation
mtrin/out: mini-transaction

◆ fseg_free_page()

void fseg_free_page ( fseg_header_t seg_header,
space_id_t  space_id,
page_no_t  page,
bool  ahi,
mtr_t mtr 
)

Frees a single page of a segment.

in/out: mini-transaction

Parameters
seg_headerin: segment header
space_idin: space id
pagein: page offset
ahiin: whether we may need to drop the adaptive hash index
mtrin/out: mini-transaction

◆ fseg_free_step()

ibool fseg_free_step ( fseg_header_t header,
bool  ahi,
mtr_t mtr 
)

Frees part of a segment.

This function can be used to free a segment by repeatedly calling this function in different mini-transactions. Doing the freeing in a single mini-transaction might result in too big a mini-transaction.

Returns
true if freeing completed
Parameters
headerin, own: segment header; NOTE: if the header resides on the first page of the frag list of the segment, this pointer becomes obsolete after the last freeing step
ahiin: whether we may need to drop the adaptive hash index
mtrin/out: mini-transaction

◆ fseg_free_step_not_header()

ibool fseg_free_step_not_header ( fseg_header_t header,
bool  ahi,
mtr_t mtr 
)

Frees part of a segment.

Differs from fseg_free_step because this function leaves the header page unfreed.

Returns
true if freeing completed, except the header page
Parameters
headerin: segment header which must reside on the first fragment page of the segment
ahiin: whether we may need to drop the adaptive hash index
mtrin/out: mini-transaction

◆ fseg_n_reserved_pages()

ulint fseg_n_reserved_pages ( fseg_header_t header,
ulint *  used,
mtr_t mtr 
)

Calculates the number of pages reserved by a segment, and how many pages are currently used.

Returns
number of reserved pages in/out: mini-transaction
number of reserved pages
Parameters
headerin: segment header
usedout: number of pages used (<= reserved)
mtrin/out: mini-transaction

◆ fseg_page_is_free()

bool fseg_page_is_free ( fseg_header_t seg_header,
space_id_t  space_id,
page_no_t  page 
)

Checks if a single page of a segment is free.

Returns
true if free
Parameters
seg_headerin: segment header
space_idin: space id
pagein: page offset

◆ fsp_alter_encrypt_tablespace()

dberr_t fsp_alter_encrypt_tablespace ( THD thd,
space_id_t  space_id,
page_no_t  from_page,
bool  to_encrypt,
bool  in_recovery,
void *  dd_space_in 
)

Encrypt/Unencrypt a tablespace.

Parameters
[in]thdcurrent thread
[in]space_idTablespace id
[in]from_pagepage id from where operation to be done
[in]to_encrypttrue if to encrypt, false if to unencrypt
[in]in_recoverytrue if its called after recovery
[in,out]dd_space_indd tablespace object
Returns
0 for success, otherwise error code
Parameters
[in]thdcurrent thread
[in]space_idTablespace id
[in]from_pagepage id from where operation to be done
[in]to_encrypttrue if to encrypt, false if to unencrypt
[in]in_recoverytrue if its called after recovery
[in,out]dd_space_indd tablespace object
Returns
0 for success, otherwise error code

◆ fsp_check_tablespace_size()

bool fsp_check_tablespace_size ( space_id_t  space_id)

Check if the tablespace size information is valid.

Parameters
[in]space_idthe tablespace identifier
Returns
true if valid, false if invalid.

◆ fsp_descr_page()

UNIV_INLINE ibool fsp_descr_page ( const page_id_t page_id,
const page_size_t page_size 
)

Checks if a page address is an extent descriptor page address.

Parameters
[in]page_idpage id
[in]page_sizepage size
Returns
true if a descriptor page

◆ fsp_flags_are_equal()

UNIV_INLINE bool fsp_flags_are_equal ( uint32_t  flags1,
uint32_t  flags2 
)

Determine if two tablespaces are equivalent or compatible.

Parameters
[in]flags1First tablespace flags
[in]flags2Second tablespace flags
Returns
true the flags are compatible, false if not

◆ fsp_flags_init()

UNIV_INLINE uint32_t fsp_flags_init ( const page_size_t page_size,
bool  atomic_blobs,
bool  has_data_dir,
bool  is_shared,
bool  is_temporary,
bool  is_encrypted = false 
)

Initialize an FSP flags integer.

Parameters
[in]page_sizepage sizes in bytes and compression flag.
[in]atomic_blobsUsed by Dynammic and Compressed.
[in]has_data_dirThis tablespace is in a remote location.
[in]is_sharedThis tablespace can be shared by many tables.
[in]is_temporaryThis tablespace is temporary.
[in]is_encryptedThis tablespace is encrypted.
Returns
tablespace flags after initialization

◆ fsp_flags_is_compressed()

UNIV_INLINE bool fsp_flags_is_compressed ( uint32_t  flags)

Determine if the tablespace is compressed from tablespace flags.

Parameters
[in]flagsTablespace flags
Returns
true if compressed, false if not compressed

◆ fsp_flags_to_dict_tf()

uint32_t fsp_flags_to_dict_tf ( uint32_t  fsp_flags,
bool  compact 
)

Convert a 32 bit integer tablespace flags to the 32 bit table flags.

This can only be done for a tablespace that was built as a file-per-table tablespace. Note that the fsp_flags cannot show the difference between a Compact and Redundant table, so an extra Compact boolean must be supplied. Low order bit | REDUNDANT | COMPACT | COMPRESSED | DYNAMIC fil_space_t::flags | 0 | 0 | 1 | 1 dict_table_t::flags | 0 | 1 | 1 | 1

Parameters
[in]fsp_flagsfil_space_t::flags
[in]compacttrue if not Redundant row format
Returns
tablespace flags (fil_space_t::flags)

◆ fsp_get_available_space_in_free_extents() [1/2]

uintmax_t fsp_get_available_space_in_free_extents ( space_id_t  space_id)

Calculate how many KiB of new data we will be able to insert to the tablespace without running out of space.

Parameters
[in]space_idtablespace ID
Returns
available space in KiB
Return values
UINTMAX_MAXif unknown

◆ fsp_get_available_space_in_free_extents() [2/2]

uintmax_t fsp_get_available_space_in_free_extents ( const fil_space_t space)

Calculate how many KiB of new data we will be able to insert to the tablespace without running out of space.

Start with a space object that has been acquired by the caller who holds it for the calculation,

Parameters
[in]spacetablespace object from fil_space_acquire()
Returns
available space in KiB

◆ fsp_get_extent_size_in_pages()

UNIV_INLINE page_no_t fsp_get_extent_size_in_pages ( const page_size_t page_size)

Calculate the number of physical pages in an extent for this file.

Parameters
[in]page_sizepage_size of the datafile
Returns
number of pages in an extent for this file.

◆ fsp_get_pages_to_extend_ibd()

page_no_t fsp_get_pages_to_extend_ibd ( const page_size_t page_size,
page_no_t  size 
)

Calculate the number of pages to extend a datafile.

We extend single-table and general tablespaces first one extent at a time, but 4 at a time for bigger tablespaces. It is not enough to extend always by one extent, because we need to add at least one extent to FSP_FREE. A single extent descriptor page will track many extents. And the extent that uses its extent descriptor page is put onto the FSP_FREE_FRAG list. Extents that do not use their extent descriptor page are added to FSP_FREE. The physical page size is used to determine how many extents are tracked on one extent descriptor page. See xdes_calc_descriptor_page().

Parameters
[in]page_sizepage_size of the datafile
[in]sizecurrent number of pages in the datafile
Returns
number of pages to extend the file.

◆ fsp_get_space_header()

fsp_header_t* fsp_get_space_header ( space_id_t  id,
const page_size_t page_size,
mtr_t mtr 
)

Gets a pointer to the space header and x-locks its page.

Parameters
[in]idspace id
[in]page_sizepage size
[in,out]mtrmini-transaction
Returns
pointer to the space header, page x-locked

◆ fsp_has_sdi()

dberr_t fsp_has_sdi ( space_id_t  space_id)

Determine if the tablespace has SDI.

Parameters
[in]space_idTablespace id
Returns
DB_SUCCESS if SDI is present else DB_ERROR or DB_TABLESPACE_NOT_FOUND

◆ fsp_header_dict_get_server_version()

bool fsp_header_dict_get_server_version ( uint version)

Read the server version number from the DD tablespace header.

Parameters
[out]versionserver version from tablespace header
Returns
false if success.

◆ fsp_header_encryption_op_type_in_progress()

encryption_op_type fsp_header_encryption_op_type_in_progress ( const page_t page,
page_size_t  page_size 
)

Get encryption operation type in progress from the first page of a tablespace.

Parameters
[in]pagefirst page of a tablespace
[in]page_sizetablespace page size
Returns
operation type
Parameters
[in]pagefirst page of a tablespace
[in]page_sizetablespace page size
Returns
encryption operation

◆ fsp_header_get_encryption_key()

bool fsp_header_get_encryption_key ( uint32_t  fsp_flags,
byte key,
byte iv,
page_t page 
)

Reads the encryption key from the first page of a tablespace.

Parameters
[in]fsp_flagstablespace flags
[in,out]keytablespace key
[in,out]ivtablespace iv
[in]pagefirst page of a tablespace
Returns
true if success

◆ fsp_header_get_encryption_offset()

ulint fsp_header_get_encryption_offset ( const page_size_t page_size)

Get the offset of encrytion information in page 0.

Parameters
[in]page_sizepage size.
Returns
offset on success, otherwise 0.

◆ fsp_header_get_encryption_progress_offset()

ulint fsp_header_get_encryption_progress_offset ( const page_size_t page_size)
inline

Get the offset of encrytion progress information in page 0.

Parameters
[in]page_sizepage size.
Returns
offset on success, otherwise 0.

◆ fsp_header_get_field()

uint32_t fsp_header_get_field ( const page_t page,
ulint  field 
)
inline

Read a tablespace header field.

Parameters
[in]pagefirst page of a tablespace
[in]fieldthe header field
Returns
the contents of the header field

◆ fsp_header_get_flags()

uint32_t fsp_header_get_flags ( const page_t page)
inline

Read the flags from the tablespace header page.

Parameters
[in]pagefirst page of a tablespace
Returns
the contents of FSP_SPACE_FLAGS

◆ fsp_header_get_page_size()

page_size_t fsp_header_get_page_size ( const page_t page)

Reads the page size from the first page of a tablespace.

Parameters
[in]pagefirst page of a tablespace
Returns
page size

◆ fsp_header_get_sdi_offset()

ulint fsp_header_get_sdi_offset ( const page_size_t page_size)
inline

Get the offset of SDI root page number in page 0.

Parameters
[in]page_sizepage size
Returns
offset on success, else 0

◆ fsp_header_get_server_version()

uint32 fsp_header_get_server_version ( const page_t page)
inline

Reads the server version from the first page of a tablespace.

Parameters
[in]pagefirst page of a tablespace
Returns
space server version

◆ fsp_header_get_space_id()

space_id_t fsp_header_get_space_id ( const page_t page)

Reads the space id from the first page of a tablespace.

Returns
space id, ULINT UNDEFINED if error in: first page of a tablespace
space id, ULINT UNDEFINED if error
Parameters
pagein: first page of a tablespace

◆ fsp_header_get_space_version()

uint32 fsp_header_get_space_version ( const page_t page)
inline

Reads the server space version from the first page of a tablespace.

Parameters
[in]pagefirst page of a tablespace
Returns
space server version

◆ fsp_header_get_tablespace_size()

page_no_t fsp_header_get_tablespace_size ( void  )

Gets the size of the system tablespace from the tablespace header.

If we do not have an auto-extending data file, this should be equal to the size of the data files. If there is an auto-extending data file, this can be smaller.

Returns
size in pages

◆ fsp_header_inc_size()

void fsp_header_inc_size ( space_id_t  space_id,
page_no_t  size_inc,
mtr_t mtr 
)

Increases the space size field of a space.

in/out: mini-transaction

Parameters
space_idin: space id
size_incin: size increment in pages
mtrin/out: mini-transaction

◆ fsp_header_init()

bool fsp_header_init ( space_id_t  space_id,
page_no_t  size,
mtr_t mtr,
bool  is_boot 
)

Initializes the space header of a new created space and creates also the insert buffer tree root if space == 0.

Parameters
[in]space_idspace id
[in]sizecurrent size in blocks
[in,out]mtrmin-transaction
[in]is_bootif it's for bootstrap
Returns
true on success, otherwise false.

◆ fsp_header_init_fields()

void fsp_header_init_fields ( page_t page,
space_id_t  space_id,
uint32_t  flags 
)

Writes the space id and flags to a tablespace header.

The flags contain row type, physical/compressed page size, and logical/uncompressed page size of the tablespace. in: tablespace flags (FSP_SPACE_FLAGS): 0, or table->flags if newer than COMPACT

The flags contain row type, physical/compressed page size, and logical/uncompressed page size of the tablespace.

Parameters
pagein/out: first page in the space
space_idin: space id
flagsin: tablespace flags (FSP_SPACE_FLAGS)

◆ fsp_header_rotate_encryption()

bool fsp_header_rotate_encryption ( fil_space_t space,
byte encrypt_info,
mtr_t mtr 
)

Rotate the encryption info in the space header.

Parameters
[in]spacetablespace
[in]encrypt_infobuffer for re-encrypt key.
[in,out]mtrmini-transaction
Returns
true if success.

◆ fsp_header_size_update()

void fsp_header_size_update ( fsp_header_t header,
ulint  size,
mtr_t mtr 
)
inline

Update the tablespace size information and generate redo log for it.

Parameters
[in]headertablespace header.
[in]sizethe new tablespace size in pages.
[in]mtrthe mini-transaction context.

◆ fsp_header_write_encryption()

bool fsp_header_write_encryption ( space_id_t  space_id,
uint32_t  space_flags,
byte encrypt_info,
bool  update_fsp_flags,
bool  rotate_encryption,
mtr_t mtr 
)

Write the encryption info into the space header.

Parameters
[in]space_idtablespace id
[in]space_flagstablespace flags
[in]encrypt_infobuffer for re-encrypt key
[in]update_fsp_flagsif it need to update the space flags
[in,out]mtrmini-transaction
Returns
true if success.
Parameters
[in]space_idtablespace id
[in]space_flagstablespace flags
[in]encrypt_infobuffer for re-encrypt key
[in]update_fsp_flagsif it need to update the space flags
[in]rotate_encryptionif it is called during key rotation
[in,out]mtrmini-transaction
Returns
true if success.

◆ fsp_header_write_encryption_progress()

bool fsp_header_write_encryption_progress ( space_id_t  space_id,
ulint  space_flags,
ulint  progress_info,
byte  operation_type,
bool  update_operation_type,
mtr_t mtr 
)

Write the encryption progress info into the space header.

Parameters
[in]space_idtablespace id
[in]space_flagstablespace flags
[in]progress_infomax pages (un)encrypted
[in]operation_typetyppe of operation
[in]update_operation_typeis operation to be updated
[in,out]mtrmini-transaction
Returns
true if success.

◆ fsp_init()

void fsp_init ( void  )

Initializes the file space system.

Initializes the file space system.

◆ fsp_init_resume_alter_encrypt_tablespace()

void fsp_init_resume_alter_encrypt_tablespace ( )

Initiate roll-forward of alter encrypt in background thread.

◆ fsp_is_dd_tablespace()

bool fsp_is_dd_tablespace ( space_id_t  space_id)

Check if tablespace is dd tablespace.

Parameters
[in]space_idtablespace ID
Returns
true if tablespace is dd tablespace.

◆ fsp_is_file_per_table()

UNIV_INLINE bool fsp_is_file_per_table ( space_id_t  space_id,
uint32_t  fsp_flags 
)

Check if tablespace is file-per-table.

Parameters
[in]space_idtablespace ID
[in]fsp_flagstablespace flags
Returns
true if tablespace is file-per-table.

◆ fsp_is_ibd_tablespace()

UNIV_INLINE bool fsp_is_ibd_tablespace ( space_id_t  space_id)

Determine if the space ID is an IBD tablespace, either file_per_table or a general shared tablespace, where user tables exist.

Parameters
[in]space_idtablespace ID
Returns
true if it is a user tablespace ID

◆ fsp_is_inode_page()

bool fsp_is_inode_page ( page_no_t  page)
inline

Check if a specified page is inode page or not.

This is used for index root pages of core DD table, we can safely assume that the passed in page number is in the range of pages which are only either index root page or inode page

Parameters
[in]pagePage number to check
Returns
true if it's inode page, otherwise false

◆ fsp_is_system_or_temp_tablespace()

UNIV_INLINE bool fsp_is_system_or_temp_tablespace ( space_id_t  space_id)

Check if the space_id is for a system-tablespace (shared + temp).

Parameters
[in]space_idtablespace ID
Returns
true if id is a system tablespace, false if not.

◆ fsp_is_system_tablespace()

UNIV_INLINE bool fsp_is_system_tablespace ( space_id_t  space_id)

◆ fsp_is_undo_tablespace()

bool fsp_is_undo_tablespace ( space_id_t  space_id)

Check whether a space id is an undo tablespace ID.

Parameters
[in]space_idspace id to check
Returns
true if it is undo tablespace else false.

Check whether a space id is an undo tablespace ID.

They are numbered down from this. Since rseg_id=0 always refers to the system tablespace, undo_space_num values start at 1. The current limit is 127. The translation from an undo_space_num is: undo space_id = log_first_space_id - undo_space_num

Parameters
[in]space_idspace id to check
Returns
true if it is undo tablespace else false.

◆ fsp_parse_init_file_page()

byte* fsp_parse_init_file_page ( byte ptr,
byte end_ptr,
buf_block_t block 
)

Parses a redo log record of a file page init.

Returns
end of log record or NULL in: block or NULL
end of log record or NULL
Parameters
ptrin: buffer
end_ptrin: buffer end
blockin: block or NULL

◆ fsp_reserve_free_extents()

bool fsp_reserve_free_extents ( ulint *  n_reserved,
space_id_t  space_id,
ulint  n_ext,
fsp_reserve_t  alloc_type,
mtr_t mtr,
page_no_t  n_pages 
)

Reserves free pages from a tablespace.

All mini-transactions which may use several pages from the tablespace should call this function beforehand and reserve enough free extents so that they certainly will be able to do their operation, like a B-tree page split, fully. Reservations must be released with function fil_space_release_free_extents!

The alloc_type below has the following meaning: FSP_NORMAL means an operation which will probably result in more space usage, like an insert in a B-tree; FSP_UNDO means allocation to undo logs: if we are deleting rows, then this allocation will in the long run result in less space usage (after a purge); FSP_CLEANING means allocation done in a physical record delete (like in a purge) or other cleaning operation which will result in less space usage in the long run. We prefer the latter two types of allocation: when space is scarce, FSP_NORMAL allocations will not succeed, but the latter two allocations will succeed, if possible. The purpose is to avoid dead end where the database is full but the user cannot free any space because these freeing operations temporarily reserve some space.

Single-table tablespaces whose size is < FSP_EXTENT_SIZE pages are a special case. In this function we would liberally reserve several extents for every page split or merge in a B-tree. But we do not want to waste disk space if the table only occupies < FSP_EXTENT_SIZE pages. That is why we apply different rules in that special case, just ensuring that there are n_pages free pages available.

Parameters
[out]n_reservednumber of extents actually reserved; if we return true and the tablespace size is < FSP_EXTENT_SIZE pages, then this can be 0, otherwise it is n_ext
[in]space_idtablespace identifier
[in]n_extnumber of extents to reserve
[in]alloc_typepage reservation type (FSP_BLOB, etc)
[in,out]mtrthe mini transaction
[in]n_pagesfor small tablespaces (tablespace size is less than FSP_EXTENT_SIZE), number of free pages to reserve.
Returns
true if we were able to make the reservation

◆ fsp_sdi_get_root_page_num()

page_no_t fsp_sdi_get_root_page_num ( space_id_t  space,
const page_size_t page_size,
mtr_t mtr 
)

Retrieve tablespace dictionary index root page number stored in the page 0.

Parameters
[in]spacetablespace id
[in]page_sizepage size
[in,out]mtrmini-transaction
Returns
root page num of the tablespace dictionary index copy
Parameters
[in]spacetablespace id
[in]page_sizepage size
[in,out]mtrmini-transaction
Returns
root page num of the tablspace dictionary index copy

◆ fsp_sdi_write_root_to_page()

void fsp_sdi_write_root_to_page ( page_t page,
const page_size_t page_size,
page_no_t  root_page_num,
mtr_t mtr 
)

Write SDI Index root page num to page 0 of tablespace.

Parameters
[in,out]pagepage 0 frame
[in]page_sizesize of page
[in]root_page_numroot page number of SDI
[in,out]mtrmini-transaction

◆ operator<<() [1/3]

std::ostream& operator<< ( std::ostream &  out,
const xdes_mem_t obj 
)
inline

◆ operator<<() [2/3]

std::ostream& operator<< ( std::ostream &  out,
const fsp_header_mem_t obj 
)
inline

◆ operator<<() [3/3]

std::ostream& operator<< ( std::ostream &  out,
const File_segment_inode obj 
)
inline

The global output stream operator is overloaded to work with an object of type File_segment_inode.

Parameters
[in]outthe output stream.
[in]objan object of type File_segment_inode.
Returns
the output stream.

◆ xdes_calc_descriptor_index()

UNIV_INLINE ulint xdes_calc_descriptor_index ( const page_size_t page_size,
ulint  offset 
)

Calculates the descriptor index within a descriptor page.

Parameters
[in]page_sizepage size
[in]offsetpage offset
Returns
descriptor index

◆ xdes_calc_descriptor_page()

UNIV_INLINE page_no_t xdes_calc_descriptor_page ( const page_size_t page_size,
page_no_t  offset 
)

Calculates the page where the descriptor of a page resides.

Parameters
[in]page_sizepage size
[in]offsetpage offset
Returns
descriptor page offset

◆ xdes_get_bit()

UNIV_INLINE ibool xdes_get_bit ( const xdes_t descr,
ulint  bit,
page_no_t  offset 
)

Gets a descriptor bit of a page.

Parameters
[in]descrdescriptor
[in]bitXDES_FREE_BIT or XDES_CLEAN_BIT
[in]offsetpage offset within extent: 0 ... FSP_EXTENT_SIZE - 1
Returns
true if free

◆ xdes_get_state()

xdes_state_t xdes_get_state ( const xdes_t descr,
mtr_t mtr 
)
inline

Get the state of an xdes.

Parameters
[in]descrextent descriptor
[in,out]mtrmini transaction.
Returns
state

◆ xdes_page_print()

std::ostream& xdes_page_print ( std::ostream &  out,
const page_t xdes,
page_no_t  page_no,
mtr_t mtr 
)

Print the extent descriptor page in user-friendly format.

Parameters
[in]outthe output file stream
[in]xdesthe extent descriptor page
[in]page_nothe page number of xdes page
[in]mtrthe mini transaction.
Returns
None.

◆ xdes_state_is_valid()

bool xdes_state_is_valid ( ulint  state)

Check if the state of extent descriptor is valid.

Parameters
[in]statethe extent descriptor state
Returns
true if state is valid, false otherwise

Variable Documentation

◆ resume_encryption_cond

mysql_cond_t resume_encryption_cond

◆ resume_encryption_cond_m

mysql_mutex_t resume_encryption_cond_m

◆ ts_encrypt_ddl_records

std::vector<DDL_Record *> ts_encrypt_ddl_records

DDL records for tablespace (un)encryption.

◆ XDES_FRAG_N_USED

const ulint XDES_FRAG_N_USED = 2

The number of reserved pages in a fragment extent.