MySQL  8.0.21
Source Code Documentation
fsp0types.h File Reference
#include "univ.i"

Go to the source code of this file.

Classes

class  fseg_header
 A wrapper class to print the file segment header information. More...
 

Macros

#define FSP_EXTENT_SIZE
 File space extent size in pages page size | file space extent size -------—+--------------------— 4 KiB | 256 pages = 1 MiB 8 KiB | 128 pages = 1 MiB 16 KiB | 64 pages = 1 MiB 32 KiB | 64 pages = 2 MiB 64 KiB | 64 pages = 4 MiB. More...
 
#define FSP_EXTENT_SIZE_MAX   (4194304 / UNIV_PAGE_SIZE_MAX)
 File space extent size (four megabyte) in pages for MAX page size. More...
 
#define FSP_EXTENT_SIZE_MIN   (1048576 / UNIV_PAGE_SIZE_MIN)
 File space extent size (one megabyte) in pages for MIN page size. More...
 
#define FSEG_PAGE_DATA   FIL_PAGE_DATA
 On a page of any file segment, data may be put starting from this offset. More...
 
#define FSP_FLAGS_WIDTH_POST_ANTELOPE   1
 Width of the POST_ANTELOPE flag. More...
 
#define FSP_FLAGS_WIDTH_ZIP_SSIZE   4
 Number of flag bits used to indicate the tablespace zip page size. More...
 
#define FSP_FLAGS_WIDTH_ATOMIC_BLOBS   1
 Width of the ATOMIC_BLOBS flag. More...
 
#define FSP_FLAGS_WIDTH_PAGE_SSIZE   4
 Number of flag bits used to indicate the tablespace page size. More...
 
#define FSP_FLAGS_WIDTH_DATA_DIR   1
 Width of the DATA_DIR flag. More...
 
#define FSP_FLAGS_WIDTH_SHARED   1
 Width of the SHARED flag. More...
 
#define FSP_FLAGS_WIDTH_TEMPORARY   1
 Width of the TEMPORARY flag. More...
 
#define FSP_FLAGS_WIDTH_ENCRYPTION   1
 Width of the encryption flag. More...
 
#define FSP_FLAGS_WIDTH_SDI   1
 Width of the SDI flag. More...
 
#define FSP_FLAGS_WIDTH
 Width of all the currently known tablespace flags. More...
 
#define FSP_FLAGS_MASK   (~(~0U << FSP_FLAGS_WIDTH))
 A mask of all the known/used bits in tablespace flags. More...
 
#define FSP_FLAGS_POS_POST_ANTELOPE   0
 Zero relative shift position of the POST_ANTELOPE field. More...
 
#define FSP_FLAGS_POS_ZIP_SSIZE   (FSP_FLAGS_POS_POST_ANTELOPE + FSP_FLAGS_WIDTH_POST_ANTELOPE)
 Zero relative shift position of the ZIP_SSIZE field. More...
 
#define FSP_FLAGS_POS_ATOMIC_BLOBS   (FSP_FLAGS_POS_ZIP_SSIZE + FSP_FLAGS_WIDTH_ZIP_SSIZE)
 Zero relative shift position of the ATOMIC_BLOBS field. More...
 
#define FSP_FLAGS_POS_PAGE_SSIZE   (FSP_FLAGS_POS_ATOMIC_BLOBS + FSP_FLAGS_WIDTH_ATOMIC_BLOBS)
 Zero relative shift position of the PAGE_SSIZE field. More...
 
#define FSP_FLAGS_POS_DATA_DIR   (FSP_FLAGS_POS_PAGE_SSIZE + FSP_FLAGS_WIDTH_PAGE_SSIZE)
 Zero relative shift position of the start of the DATA_DIR bit. More...
 
#define FSP_FLAGS_POS_SHARED   (FSP_FLAGS_POS_DATA_DIR + FSP_FLAGS_WIDTH_DATA_DIR)
 Zero relative shift position of the start of the SHARED bit. More...
 
#define FSP_FLAGS_POS_TEMPORARY   (FSP_FLAGS_POS_SHARED + FSP_FLAGS_WIDTH_SHARED)
 Zero relative shift position of the start of the TEMPORARY bit. More...
 
#define FSP_FLAGS_POS_ENCRYPTION   (FSP_FLAGS_POS_TEMPORARY + FSP_FLAGS_WIDTH_TEMPORARY)
 Zero relative shift position of the start of the ENCRYPTION bit. More...
 
#define FSP_FLAGS_POS_SDI   (FSP_FLAGS_POS_ENCRYPTION + FSP_FLAGS_WIDTH_ENCRYPTION)
 Zero relative shift position of the start of the SDI bits. More...
 
#define FSP_FLAGS_POS_UNUSED   (FSP_FLAGS_POS_SDI + FSP_FLAGS_WIDTH_SDI)
 Zero relative shift position of the start of the UNUSED bits. More...
 
#define FSP_FLAGS_MASK_POST_ANTELOPE   ((~(~0U << FSP_FLAGS_WIDTH_POST_ANTELOPE)) << FSP_FLAGS_POS_POST_ANTELOPE)
 Bit mask of the POST_ANTELOPE field. More...
 
#define FSP_FLAGS_MASK_ZIP_SSIZE   ((~(~0U << FSP_FLAGS_WIDTH_ZIP_SSIZE)) << FSP_FLAGS_POS_ZIP_SSIZE)
 Bit mask of the ZIP_SSIZE field. More...
 
#define FSP_FLAGS_MASK_ATOMIC_BLOBS   ((~(~0U << FSP_FLAGS_WIDTH_ATOMIC_BLOBS)) << FSP_FLAGS_POS_ATOMIC_BLOBS)
 Bit mask of the ATOMIC_BLOBS field. More...
 
#define FSP_FLAGS_MASK_PAGE_SSIZE   ((~(~0U << FSP_FLAGS_WIDTH_PAGE_SSIZE)) << FSP_FLAGS_POS_PAGE_SSIZE)
 Bit mask of the PAGE_SSIZE field. More...
 
#define FSP_FLAGS_MASK_DATA_DIR   ((~(~0U << FSP_FLAGS_WIDTH_DATA_DIR)) << FSP_FLAGS_POS_DATA_DIR)
 Bit mask of the DATA_DIR field. More...
 
#define FSP_FLAGS_MASK_SHARED   ((~(~0U << FSP_FLAGS_WIDTH_SHARED)) << FSP_FLAGS_POS_SHARED)
 Bit mask of the SHARED field. More...
 
#define FSP_FLAGS_MASK_TEMPORARY   ((~(~0U << FSP_FLAGS_WIDTH_TEMPORARY)) << FSP_FLAGS_POS_TEMPORARY)
 Bit mask of the TEMPORARY field. More...
 
#define FSP_FLAGS_MASK_ENCRYPTION   ((~(~0U << FSP_FLAGS_WIDTH_ENCRYPTION)) << FSP_FLAGS_POS_ENCRYPTION)
 Bit mask of the ENCRYPTION field. More...
 
#define FSP_FLAGS_MASK_SDI   ((~(~0U << FSP_FLAGS_WIDTH_SDI)) << FSP_FLAGS_POS_SDI)
 Bit mask of the SDI field. More...
 
#define FSP_FLAGS_GET_POST_ANTELOPE(flags)   ((flags & FSP_FLAGS_MASK_POST_ANTELOPE) >> FSP_FLAGS_POS_POST_ANTELOPE)
 Return the value of the POST_ANTELOPE field. More...
 
#define FSP_FLAGS_GET_ZIP_SSIZE(flags)   ((flags & FSP_FLAGS_MASK_ZIP_SSIZE) >> FSP_FLAGS_POS_ZIP_SSIZE)
 Return the value of the ZIP_SSIZE field. More...
 
#define FSP_FLAGS_HAS_ATOMIC_BLOBS(flags)   ((flags & FSP_FLAGS_MASK_ATOMIC_BLOBS) >> FSP_FLAGS_POS_ATOMIC_BLOBS)
 Return the value of the ATOMIC_BLOBS field. More...
 
#define FSP_FLAGS_GET_PAGE_SSIZE(flags)   ((flags & FSP_FLAGS_MASK_PAGE_SSIZE) >> FSP_FLAGS_POS_PAGE_SSIZE)
 Return the value of the PAGE_SSIZE field. More...
 
#define FSP_FLAGS_HAS_DATA_DIR(flags)   ((flags & FSP_FLAGS_MASK_DATA_DIR) >> FSP_FLAGS_POS_DATA_DIR)
 Return the value of the DATA_DIR field. More...
 
#define FSP_FLAGS_GET_SHARED(flags)   ((flags & FSP_FLAGS_MASK_SHARED) >> FSP_FLAGS_POS_SHARED)
 Return the contents of the SHARED field. More...
 
#define FSP_FLAGS_GET_TEMPORARY(flags)   ((flags & FSP_FLAGS_MASK_TEMPORARY) >> FSP_FLAGS_POS_TEMPORARY)
 Return the contents of the TEMPORARY field. More...
 
#define FSP_FLAGS_GET_ENCRYPTION(flags)   ((flags & FSP_FLAGS_MASK_ENCRYPTION) >> FSP_FLAGS_POS_ENCRYPTION)
 Return the contents of the ENCRYPTION field. More...
 
#define FSP_FLAGS_HAS_SDI(flags)   ((flags & FSP_FLAGS_MASK_SDI) >> FSP_FLAGS_POS_SDI)
 Return the value of the SDI field. More...
 
#define FSP_FLAGS_GET_UNUSED(flags)   (flags >> FSP_FLAGS_POS_UNUSED)
 Return the contents of the UNUSED bits. More...
 
#define FSP_FLAGS_ARE_NOT_SET(flags)   ((flags & FSP_FLAGS_MASK) == 0)
 Return true if flags are not set. More...
 
#define fsp_is_shared_tablespace   FSP_FLAGS_GET_SHARED
 Use an alias in the code for FSP_FLAGS_GET_SHARED() More...
 
Flags for inserting records in order

If records are inserted in order, there are the following flags to tell this (their type is made byte for the compiler to warn if direction and hint parameters are switched in fseg_alloc_free_page)

#define FSP_UP   ((byte)111)
 alphabetically upwards More...
 
#define FSP_DOWN   ((byte)112)
 alphabetically downwards More...
 
#define FSP_NO_DIR   ((byte)113)
 no order More...
 
The space low address page map

The pages at FSP_XDES_OFFSET and FSP_IBUF_BITMAP_OFFSET are repeated every XDES_DESCRIBED_PER_PAGE pages in every tablespace.

#define FSP_XDES_OFFSET   0 /* !< extent descriptor */
 
#define FSP_IBUF_BITMAP_OFFSET   1 /* !< insert buffer bitmap */
 
#define FSP_FIRST_INODE_PAGE_NO   2
 in every tablespace More...
 
#define FSP_IBUF_HEADER_PAGE_NO   3
 insert buffer \ header page, in \ tablespace 0 More...
 
#define FSP_IBUF_TREE_ROOT_PAGE_NO   4
 insert buffer \ B-tree root page in \ tablespace 0 More...
 
#define FSP_TRX_SYS_PAGE_NO   5
 transaction \ system header, in \ tablespace 0 More...
 
#define FSP_FIRST_RSEG_PAGE_NO   6
 first rollback segment \ page, in tablespace 0 More...
 
#define FSP_DICT_HDR_PAGE_NO   7
 data dictionary header \ page, in tablespace 0 More...
 
#define FSP_RSEG_ARRAY_PAGE_NO   3
 rollback segment directory \ page number in each undo tablespace More...
 

Enumerations

enum  fsp_reserve_t { FSP_NORMAL, FSP_UNDO, FSP_CLEANING, FSP_BLOB }
 Flags for fsp_reserve_free_extents. More...
 

Functions

std::ostream & operator<< (std::ostream &out, const fseg_header &header)
 
bool fsp_flags_is_valid (uint32_t flags)
 Validate the tablespace flags. More...
 
bool fsp_is_system_temporary (space_id_t space_id)
 Check if a space_id is the system temporary space ID. More...
 
bool fsp_is_session_temporary (space_id_t space_id)
 Check if a space_id is the system temporary space ID. More...
 
bool fsp_is_global_temporary (space_id_t space_id)
 Check if a space_id is the system temporary space ID. More...
 
bool fsp_is_checksum_disabled (space_id_t space_id)
 Check if checksum is disabled for the given space. More...
 
bool fsp_skip_sanity_check (space_id_t space_id)
 Skip some of the sanity checks that are time consuming even in debug mode and can affect frequent verification runs that are done to ensure stability of the product. More...
 
UNIV_INLINE void fsp_flags_set_encryption (uint32_t &flags)
 Set ENCRYPTION bit in tablespace flags. More...
 
UNIV_INLINE void fsp_flags_unset_encryption (uint32_t &flags)
 Set ENCRYPTION bit in tablespace flags. More...
 
UNIV_INLINE void fsp_flags_set_sdi (uint32_t &flags)
 Set SDI Index bit in tablespace flags. More...
 
UNIV_INLINE void fsp_flags_unset_sdi (uint32_t &flags)
 Set SDI Index bit in tablespace flags. More...
 

Variables

constexpr size_t TRX_SYS_N_RSEGS = 128
 Max number of rollback segments: the number of segment specification slots in the transaction system array; rollback segment id must fit in one (signed) byte, therefore 128; each slot is currently 8 bytes in size. More...
 
constexpr size_t FSP_MIN_UNDO_TABLESPACES = 2
 Minimum and Maximum number of implicit undo tablespaces. More...
 
constexpr size_t FSP_MAX_UNDO_TABLESPACES = TRX_SYS_N_RSEGS - 1
 
constexpr size_t FSP_IMPLICIT_UNDO_TABLESPACES = 2
 
constexpr size_t FSP_MAX_ROLLBACK_SEGMENTS = TRX_SYS_N_RSEGS
 

File segment header

The file segment header points to the inode describing the file segment.

#define FSEG_HDR_SPACE   0
 space id of the inode More...
 
#define FSEG_HDR_PAGE_NO   4
 page number of the inode More...
 
#define FSEG_HDR_OFFSET   8
 byte offset of the inode More...
 
#define FSEG_HEADER_SIZE   10
 Length of the file system \ header, in bytes. More...
 
typedef byte fseg_header_t
 Data type for file segment header. More...
 

Macro Definition Documentation

◆ FSEG_HDR_OFFSET

#define FSEG_HDR_OFFSET   8

byte offset of the inode

◆ FSEG_HDR_PAGE_NO

#define FSEG_HDR_PAGE_NO   4

page number of the inode

◆ FSEG_HDR_SPACE

#define FSEG_HDR_SPACE   0

space id of the inode

◆ FSEG_HEADER_SIZE

#define FSEG_HEADER_SIZE   10

Length of the file system \ header, in bytes.

◆ FSEG_PAGE_DATA

#define FSEG_PAGE_DATA   FIL_PAGE_DATA

On a page of any file segment, data may be put starting from this offset.

◆ FSP_DICT_HDR_PAGE_NO

#define FSP_DICT_HDR_PAGE_NO   7

data dictionary header \ page, in tablespace 0

◆ FSP_DOWN

#define FSP_DOWN   ((byte)112)

alphabetically downwards

◆ FSP_EXTENT_SIZE

#define FSP_EXTENT_SIZE
Value:
static_cast<page_no_t>( \
((UNIV_PAGE_SIZE <= (16384) \
? (1048576 / UNIV_PAGE_SIZE) \
: ((UNIV_PAGE_SIZE <= (32768)) ? (2097152 / UNIV_PAGE_SIZE) \
: (4194304 / UNIV_PAGE_SIZE)))))
uint32 page_no_t
Page number.
Definition: api0api.h:57

File space extent size in pages page size | file space extent size -------—+--------------------— 4 KiB | 256 pages = 1 MiB 8 KiB | 128 pages = 1 MiB 16 KiB | 64 pages = 1 MiB 32 KiB | 64 pages = 2 MiB 64 KiB | 64 pages = 4 MiB.

◆ FSP_EXTENT_SIZE_MAX

#define FSP_EXTENT_SIZE_MAX   (4194304 / UNIV_PAGE_SIZE_MAX)

File space extent size (four megabyte) in pages for MAX page size.

◆ FSP_EXTENT_SIZE_MIN

#define FSP_EXTENT_SIZE_MIN   (1048576 / UNIV_PAGE_SIZE_MIN)

File space extent size (one megabyte) in pages for MIN page size.

◆ FSP_FIRST_INODE_PAGE_NO

#define FSP_FIRST_INODE_PAGE_NO   2

in every tablespace

◆ FSP_FIRST_RSEG_PAGE_NO

#define FSP_FIRST_RSEG_PAGE_NO   6

first rollback segment \ page, in tablespace 0

◆ FSP_FLAGS_ARE_NOT_SET

#define FSP_FLAGS_ARE_NOT_SET (   flags)    ((flags & FSP_FLAGS_MASK) == 0)

Return true if flags are not set.

◆ FSP_FLAGS_GET_ENCRYPTION

#define FSP_FLAGS_GET_ENCRYPTION (   flags)    ((flags & FSP_FLAGS_MASK_ENCRYPTION) >> FSP_FLAGS_POS_ENCRYPTION)

Return the contents of the ENCRYPTION field.

◆ FSP_FLAGS_GET_PAGE_SSIZE

#define FSP_FLAGS_GET_PAGE_SSIZE (   flags)    ((flags & FSP_FLAGS_MASK_PAGE_SSIZE) >> FSP_FLAGS_POS_PAGE_SSIZE)

Return the value of the PAGE_SSIZE field.

◆ FSP_FLAGS_GET_POST_ANTELOPE

#define FSP_FLAGS_GET_POST_ANTELOPE (   flags)    ((flags & FSP_FLAGS_MASK_POST_ANTELOPE) >> FSP_FLAGS_POS_POST_ANTELOPE)

Return the value of the POST_ANTELOPE field.

◆ FSP_FLAGS_GET_SHARED

#define FSP_FLAGS_GET_SHARED (   flags)    ((flags & FSP_FLAGS_MASK_SHARED) >> FSP_FLAGS_POS_SHARED)

Return the contents of the SHARED field.

◆ FSP_FLAGS_GET_TEMPORARY

#define FSP_FLAGS_GET_TEMPORARY (   flags)    ((flags & FSP_FLAGS_MASK_TEMPORARY) >> FSP_FLAGS_POS_TEMPORARY)

Return the contents of the TEMPORARY field.

◆ FSP_FLAGS_GET_UNUSED

#define FSP_FLAGS_GET_UNUSED (   flags)    (flags >> FSP_FLAGS_POS_UNUSED)

Return the contents of the UNUSED bits.

◆ FSP_FLAGS_GET_ZIP_SSIZE

#define FSP_FLAGS_GET_ZIP_SSIZE (   flags)    ((flags & FSP_FLAGS_MASK_ZIP_SSIZE) >> FSP_FLAGS_POS_ZIP_SSIZE)

Return the value of the ZIP_SSIZE field.

◆ FSP_FLAGS_HAS_ATOMIC_BLOBS

#define FSP_FLAGS_HAS_ATOMIC_BLOBS (   flags)    ((flags & FSP_FLAGS_MASK_ATOMIC_BLOBS) >> FSP_FLAGS_POS_ATOMIC_BLOBS)

Return the value of the ATOMIC_BLOBS field.

◆ FSP_FLAGS_HAS_DATA_DIR

#define FSP_FLAGS_HAS_DATA_DIR (   flags)    ((flags & FSP_FLAGS_MASK_DATA_DIR) >> FSP_FLAGS_POS_DATA_DIR)

Return the value of the DATA_DIR field.

◆ FSP_FLAGS_HAS_SDI

#define FSP_FLAGS_HAS_SDI (   flags)    ((flags & FSP_FLAGS_MASK_SDI) >> FSP_FLAGS_POS_SDI)

Return the value of the SDI field.

◆ FSP_FLAGS_MASK

#define FSP_FLAGS_MASK   (~(~0U << FSP_FLAGS_WIDTH))

A mask of all the known/used bits in tablespace flags.

◆ FSP_FLAGS_MASK_ATOMIC_BLOBS

#define FSP_FLAGS_MASK_ATOMIC_BLOBS   ((~(~0U << FSP_FLAGS_WIDTH_ATOMIC_BLOBS)) << FSP_FLAGS_POS_ATOMIC_BLOBS)

Bit mask of the ATOMIC_BLOBS field.

◆ FSP_FLAGS_MASK_DATA_DIR

#define FSP_FLAGS_MASK_DATA_DIR   ((~(~0U << FSP_FLAGS_WIDTH_DATA_DIR)) << FSP_FLAGS_POS_DATA_DIR)

Bit mask of the DATA_DIR field.

◆ FSP_FLAGS_MASK_ENCRYPTION

#define FSP_FLAGS_MASK_ENCRYPTION   ((~(~0U << FSP_FLAGS_WIDTH_ENCRYPTION)) << FSP_FLAGS_POS_ENCRYPTION)

Bit mask of the ENCRYPTION field.

◆ FSP_FLAGS_MASK_PAGE_SSIZE

#define FSP_FLAGS_MASK_PAGE_SSIZE   ((~(~0U << FSP_FLAGS_WIDTH_PAGE_SSIZE)) << FSP_FLAGS_POS_PAGE_SSIZE)

Bit mask of the PAGE_SSIZE field.

◆ FSP_FLAGS_MASK_POST_ANTELOPE

#define FSP_FLAGS_MASK_POST_ANTELOPE   ((~(~0U << FSP_FLAGS_WIDTH_POST_ANTELOPE)) << FSP_FLAGS_POS_POST_ANTELOPE)

Bit mask of the POST_ANTELOPE field.

◆ FSP_FLAGS_MASK_SDI

#define FSP_FLAGS_MASK_SDI   ((~(~0U << FSP_FLAGS_WIDTH_SDI)) << FSP_FLAGS_POS_SDI)

Bit mask of the SDI field.

◆ FSP_FLAGS_MASK_SHARED

#define FSP_FLAGS_MASK_SHARED   ((~(~0U << FSP_FLAGS_WIDTH_SHARED)) << FSP_FLAGS_POS_SHARED)

Bit mask of the SHARED field.

◆ FSP_FLAGS_MASK_TEMPORARY

#define FSP_FLAGS_MASK_TEMPORARY   ((~(~0U << FSP_FLAGS_WIDTH_TEMPORARY)) << FSP_FLAGS_POS_TEMPORARY)

Bit mask of the TEMPORARY field.

◆ FSP_FLAGS_MASK_ZIP_SSIZE

#define FSP_FLAGS_MASK_ZIP_SSIZE   ((~(~0U << FSP_FLAGS_WIDTH_ZIP_SSIZE)) << FSP_FLAGS_POS_ZIP_SSIZE)

Bit mask of the ZIP_SSIZE field.

◆ FSP_FLAGS_POS_ATOMIC_BLOBS

#define FSP_FLAGS_POS_ATOMIC_BLOBS   (FSP_FLAGS_POS_ZIP_SSIZE + FSP_FLAGS_WIDTH_ZIP_SSIZE)

Zero relative shift position of the ATOMIC_BLOBS field.

◆ FSP_FLAGS_POS_DATA_DIR

#define FSP_FLAGS_POS_DATA_DIR   (FSP_FLAGS_POS_PAGE_SSIZE + FSP_FLAGS_WIDTH_PAGE_SSIZE)

Zero relative shift position of the start of the DATA_DIR bit.

◆ FSP_FLAGS_POS_ENCRYPTION

#define FSP_FLAGS_POS_ENCRYPTION   (FSP_FLAGS_POS_TEMPORARY + FSP_FLAGS_WIDTH_TEMPORARY)

Zero relative shift position of the start of the ENCRYPTION bit.

◆ FSP_FLAGS_POS_PAGE_SSIZE

#define FSP_FLAGS_POS_PAGE_SSIZE   (FSP_FLAGS_POS_ATOMIC_BLOBS + FSP_FLAGS_WIDTH_ATOMIC_BLOBS)

Zero relative shift position of the PAGE_SSIZE field.

◆ FSP_FLAGS_POS_POST_ANTELOPE

#define FSP_FLAGS_POS_POST_ANTELOPE   0

Zero relative shift position of the POST_ANTELOPE field.

◆ FSP_FLAGS_POS_SDI

#define FSP_FLAGS_POS_SDI   (FSP_FLAGS_POS_ENCRYPTION + FSP_FLAGS_WIDTH_ENCRYPTION)

Zero relative shift position of the start of the SDI bits.

◆ FSP_FLAGS_POS_SHARED

#define FSP_FLAGS_POS_SHARED   (FSP_FLAGS_POS_DATA_DIR + FSP_FLAGS_WIDTH_DATA_DIR)

Zero relative shift position of the start of the SHARED bit.

◆ FSP_FLAGS_POS_TEMPORARY

#define FSP_FLAGS_POS_TEMPORARY   (FSP_FLAGS_POS_SHARED + FSP_FLAGS_WIDTH_SHARED)

Zero relative shift position of the start of the TEMPORARY bit.

◆ FSP_FLAGS_POS_UNUSED

#define FSP_FLAGS_POS_UNUSED   (FSP_FLAGS_POS_SDI + FSP_FLAGS_WIDTH_SDI)

Zero relative shift position of the start of the UNUSED bits.

◆ FSP_FLAGS_POS_ZIP_SSIZE

#define FSP_FLAGS_POS_ZIP_SSIZE   (FSP_FLAGS_POS_POST_ANTELOPE + FSP_FLAGS_WIDTH_POST_ANTELOPE)

Zero relative shift position of the ZIP_SSIZE field.

◆ FSP_FLAGS_WIDTH

#define FSP_FLAGS_WIDTH
Value:
FSP_FLAGS_WIDTH_ATOMIC_BLOBS + FSP_FLAGS_WIDTH_PAGE_SSIZE + \
FSP_FLAGS_WIDTH_DATA_DIR + FSP_FLAGS_WIDTH_SHARED + \
FSP_FLAGS_WIDTH_TEMPORARY + FSP_FLAGS_WIDTH_ENCRYPTION + \
FSP_FLAGS_WIDTH_SDI)
#define FSP_FLAGS_WIDTH_POST_ANTELOPE
Width of the POST_ANTELOPE flag.
Definition: fsp0types.h:241
#define FSP_FLAGS_WIDTH_SHARED
Width of the SHARED flag.
Definition: fsp0types.h:255
#define FSP_FLAGS_WIDTH_ENCRYPTION
Width of the encryption flag.
Definition: fsp0types.h:262
#define FSP_FLAGS_WIDTH_ZIP_SSIZE
Number of flag bits used to indicate the tablespace zip page size.
Definition: fsp0types.h:243
#define FSP_FLAGS_WIDTH_PAGE_SSIZE
Number of flag bits used to indicate the tablespace page size.
Definition: fsp0types.h:249

Width of all the currently known tablespace flags.

◆ FSP_FLAGS_WIDTH_ATOMIC_BLOBS

#define FSP_FLAGS_WIDTH_ATOMIC_BLOBS   1

Width of the ATOMIC_BLOBS flag.

The ability to break up a long column into an in-record prefix and an externally stored part is available to ROW_FORMAT=REDUNDANT and ROW_FORMAT=COMPACT.

◆ FSP_FLAGS_WIDTH_DATA_DIR

#define FSP_FLAGS_WIDTH_DATA_DIR   1

Width of the DATA_DIR flag.

This flag indicates that the tablespace is found in a remote location, not the default data directory.

◆ FSP_FLAGS_WIDTH_ENCRYPTION

#define FSP_FLAGS_WIDTH_ENCRYPTION   1

Width of the encryption flag.

This flag indicates that the tablespace is a tablespace with encryption.

◆ FSP_FLAGS_WIDTH_PAGE_SSIZE

#define FSP_FLAGS_WIDTH_PAGE_SSIZE   4

Number of flag bits used to indicate the tablespace page size.

◆ FSP_FLAGS_WIDTH_POST_ANTELOPE

#define FSP_FLAGS_WIDTH_POST_ANTELOPE   1

Width of the POST_ANTELOPE flag.

◆ FSP_FLAGS_WIDTH_SDI

#define FSP_FLAGS_WIDTH_SDI   1

Width of the SDI flag.

This flag indicates the presence of tablespace dictionary.

◆ FSP_FLAGS_WIDTH_SHARED

#define FSP_FLAGS_WIDTH_SHARED   1

Width of the SHARED flag.

This flag indicates that the tablespace was created with CREATE TABLESPACE and can be shared by multiple tables.

◆ FSP_FLAGS_WIDTH_TEMPORARY

#define FSP_FLAGS_WIDTH_TEMPORARY   1

Width of the TEMPORARY flag.

This flag indicates that the tablespace is a temporary tablespace and everything in it is temporary, meaning that it is for a single client and should be deleted upon startup if it exists.

◆ FSP_FLAGS_WIDTH_ZIP_SSIZE

#define FSP_FLAGS_WIDTH_ZIP_SSIZE   4

Number of flag bits used to indicate the tablespace zip page size.

◆ FSP_IBUF_BITMAP_OFFSET

#define FSP_IBUF_BITMAP_OFFSET   1 /* !< insert buffer bitmap */

◆ FSP_IBUF_HEADER_PAGE_NO

#define FSP_IBUF_HEADER_PAGE_NO   3

insert buffer \ header page, in \ tablespace 0

◆ FSP_IBUF_TREE_ROOT_PAGE_NO

#define FSP_IBUF_TREE_ROOT_PAGE_NO   4

insert buffer \ B-tree root page in \ tablespace 0

◆ fsp_is_shared_tablespace

#define fsp_is_shared_tablespace   FSP_FLAGS_GET_SHARED

Use an alias in the code for FSP_FLAGS_GET_SHARED()

◆ FSP_NO_DIR

#define FSP_NO_DIR   ((byte)113)

no order

◆ FSP_RSEG_ARRAY_PAGE_NO

#define FSP_RSEG_ARRAY_PAGE_NO   3

rollback segment directory \ page number in each undo tablespace

◆ FSP_TRX_SYS_PAGE_NO

#define FSP_TRX_SYS_PAGE_NO   5

transaction \ system header, in \ tablespace 0

◆ FSP_UP

#define FSP_UP   ((byte)111)

alphabetically upwards

◆ FSP_XDES_OFFSET

#define FSP_XDES_OFFSET   0 /* !< extent descriptor */

Typedef Documentation

◆ fseg_header_t

Data type for file segment header.

Enumeration Type Documentation

◆ fsp_reserve_t

Flags for fsp_reserve_free_extents.

Enumerator
FSP_NORMAL 
FSP_UNDO 
FSP_CLEANING 
FSP_BLOB 

Function Documentation

◆ fsp_flags_is_valid()

bool fsp_flags_is_valid ( uint32_t  flags)

Validate the tablespace flags.

These flags are stored in the tablespace header at offset FSP_SPACE_FLAGS. They should be 0 for ROW_FORMAT=COMPACT and ROW_FORMAT=REDUNDANT. The newer row formats, COMPRESSED and DYNAMIC, will have at least the DICT_TF_COMPACT bit set.

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

◆ fsp_flags_set_encryption()

UNIV_INLINE void fsp_flags_set_encryption ( uint32_t &  flags)

Set ENCRYPTION bit in tablespace flags.

◆ fsp_flags_set_sdi()

UNIV_INLINE void fsp_flags_set_sdi ( uint32_t &  flags)

Set SDI Index bit in tablespace flags.

◆ fsp_flags_unset_encryption()

UNIV_INLINE void fsp_flags_unset_encryption ( uint32_t &  flags)

Set ENCRYPTION bit in tablespace flags.

◆ fsp_flags_unset_sdi()

UNIV_INLINE void fsp_flags_unset_sdi ( uint32_t &  flags)

Set SDI Index bit in tablespace flags.

◆ fsp_is_checksum_disabled()

bool fsp_is_checksum_disabled ( space_id_t  space_id)

Check if checksum is disabled for the given space.

Parameters
[in]space_idverify is checksum is enabled for given space.
Returns
true if checksum is disabled for given space.
Parameters
[in]space_idtablespace ID
Returns
true if checksum is disabled for given space.

◆ fsp_is_global_temporary()

bool fsp_is_global_temporary ( space_id_t  space_id)

Check if a space_id is the system temporary space ID.

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

Check if a space_id is the system temporary space ID.

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

◆ fsp_is_session_temporary()

bool fsp_is_session_temporary ( space_id_t  space_id)

Check if a space_id is the system temporary space ID.

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

Check if a space_id is the system temporary space ID.

Parameters
[in]space_idtablespace ID
Returns
true if tablespace is a session temporary tablespace.

◆ fsp_is_system_temporary()

bool fsp_is_system_temporary ( space_id_t  space_id)

Check if a space_id is the system temporary space ID.

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

Check if a space_id is the system temporary space ID.

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

◆ fsp_skip_sanity_check()

bool fsp_skip_sanity_check ( space_id_t  space_id)

Skip some of the sanity checks that are time consuming even in debug mode and can affect frequent verification runs that are done to ensure stability of the product.

Returns
true if check should be skipped for given space.

◆ operator<<()

std::ostream& operator<< ( std::ostream &  out,
const fseg_header header 
)
inline

Variable Documentation

◆ FSP_IMPLICIT_UNDO_TABLESPACES

constexpr size_t FSP_IMPLICIT_UNDO_TABLESPACES = 2

◆ FSP_MAX_ROLLBACK_SEGMENTS

constexpr size_t FSP_MAX_ROLLBACK_SEGMENTS = TRX_SYS_N_RSEGS

◆ FSP_MAX_UNDO_TABLESPACES

constexpr size_t FSP_MAX_UNDO_TABLESPACES = TRX_SYS_N_RSEGS - 1

◆ FSP_MIN_UNDO_TABLESPACES

constexpr size_t FSP_MIN_UNDO_TABLESPACES = 2

Minimum and Maximum number of implicit undo tablespaces.

This kind of undo tablespace is always created and found in –innodb-undo-directory.

◆ TRX_SYS_N_RSEGS

constexpr size_t TRX_SYS_N_RSEGS = 128

Max number of rollback segments: the number of segment specification slots in the transaction system array; rollback segment id must fit in one (signed) byte, therefore 128; each slot is currently 8 bytes in size.

If you want to raise the level to 256 then you will need to fix some assertions that impose the 7 bit restriction. e.g., mach_write_to_3()