MySQL 8.0.31
Source Code Documentation
dict0sdi.h File Reference
#include <zconf.h>
#include <zlib.h>

Go to the source code of this file.

Classes

class  Sdi_Compressor
 Compress SDI using zlib. More...
 

Functions

bool dict_sdi_create (dd::Tablespace *tablespace)
 Create SDI in a tablespace. More...
 
bool dict_sdi_drop (dd::Tablespace *tablespace)
 Drop SDI in a tablespace. More...
 
bool dict_sdi_get_keys (const dd::Tablespace &tablespace, sdi_vector_t &vector)
 Get the SDI keys in a tablespace into the vector provided. More...
 
bool dict_sdi_get (const dd::Tablespace &tablespace, const sdi_key_t *sdi_key, void *sdi, uint64_t *sdi_len)
 Retrieve SDI from tablespace. More...
 
bool dict_sdi_set (handlerton *hton, const dd::Tablespace &tablespace, const dd::Table *table, const sdi_key_t *sdi_key, const void *sdi, uint64_t sdi_len)
 Insert/Update SDI in tablespace. More...
 
bool dict_sdi_delete (const dd::Tablespace &tablespace, const dd::Table *table, const sdi_key_t *sdi_key)
 Delete SDI from tablespace. More...
 

Variables

constexpr const uint32_t SDI_TYPE_LEN = 4
 Size of sdi_key_t::type. More...
 
constexpr const uint32_t SDI_KEY_LEN = 8
 Size of sdi_key_t::id. More...
 

Function Documentation

◆ dict_sdi_create()

bool dict_sdi_create ( dd::Tablespace tablespace)

Create SDI in a tablespace.

This API should be used when upgrading a tablespace with no SDI.

Parameters
[in,out]tablespacetablespace object
Return values
falsesuccess
truefailure

◆ dict_sdi_delete()

bool dict_sdi_delete ( const dd::Tablespace tablespace,
const dd::Table table,
const sdi_key_t sdi_key 
)

Delete SDI from tablespace.

Parameters
[in]tablespacetablespace object
[in]tabletable object
[in]sdi_keySDI key to uniquely identify the tablespace object
Return values
falsesuccess
truefailure

◆ dict_sdi_drop()

bool dict_sdi_drop ( dd::Tablespace tablespace)

Drop SDI in a tablespace.

This API should be used only when SDI is corrupted.

Parameters
[in,out]tablespacetablespace object
Return values
falsesuccess
truefailure

◆ dict_sdi_get()

bool dict_sdi_get ( const dd::Tablespace tablespace,
const sdi_key_t sdi_key,
void *  sdi,
uint64_t *  sdi_len 
)

Retrieve SDI from tablespace.

Parameters
[in]tablespacetablespace object
[in]sdi_keySDI key
[in,out]sdiSDI retrieved from tablespace
[in,out]sdi_lenin: size of memory allocated out: actual length of SDI
Return values
falsesuccess
truein case of failures like record not found, sdi_len is UINT64MAX_T, else sdi_len is actual length of SDI

◆ dict_sdi_get_keys()

bool dict_sdi_get_keys ( const dd::Tablespace tablespace,
sdi_vector_t vector 
)

Get the SDI keys in a tablespace into the vector provided.

Parameters
[in]tablespacetablespace object
[in,out]vectorvector to hold SDI keys
Return values
falsesuccess
truefailure

◆ dict_sdi_set()

bool dict_sdi_set ( handlerton hton,
const dd::Tablespace tablespace,
const dd::Table table,
const sdi_key_t sdi_key,
const void *  sdi,
uint64_t  sdi_len 
)

Insert/Update SDI in tablespace.

Parameters
[in]htonhandlerton object
[in]tablespacetablespace object
[in]tabletable object
[in]sdi_keySDI key to uniquely identify the tablespace object
[in]sdiSDI to be stored in tablespace
[in]sdi_lenSDI length
Return values
falsesuccess
truefailure

Variable Documentation

◆ SDI_KEY_LEN

constexpr const uint32_t SDI_KEY_LEN = 8
constexpr

Size of sdi_key_t::id.

◆ SDI_TYPE_LEN

constexpr const uint32_t SDI_TYPE_LEN = 4
constexpr

Size of sdi_key_t::type.