MySQL 8.0.40
Source Code Documentation
|
#include <algorithm>
#include <current_thd.h>
#include <sql_class.h>
#include <sql_show.h>
#include <sql_table.h>
#include <sql_tablespace.h>
#include "api0api.h"
#include "api0misc.h"
#include "dict0boot.h"
#include "dict0crea.h"
#include "dict0dd.h"
#include "dict0dict.h"
#include "dict0sdi-decompress.h"
#include "dict0sdi.h"
#include "fsp0fsp.h"
#include "ha_innodb.h"
#include "trx0trx.h"
Functions | |
static dberr_t | dict_sdi_exists (const dd::Tablespace &dd_space, uint32_t *space_id) |
Check if SDI Index exists in a tablespace. More... | |
static void | dict_sdi_report_error (int errornum, const char *operation, const dd::Table *table, const dd::Tablespace &tablespace) |
Report error on failure. More... | |
static void | dict_sdi_report_error (const char *operation, const dd::Table *table, const dd::Tablespace &tablespace) |
Report error on failure. More... | |
bool | dict_sdi_create (dd::Tablespace *tablespace) |
Create SDI in a tablespace. More... | |
bool | dict_sdi_drop (dd::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 &, const sdi_key_t *, void *, uint64_t *) |
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... | |
bool dict_sdi_create | ( | dd::Tablespace * | tablespace | ) |
Create SDI in a tablespace.
This API should be used when upgrading a tablespace with no SDI.
[in,out] | tablespace | tablespace object |
false | success |
true | failure |
bool dict_sdi_delete | ( | const dd::Tablespace & | tablespace, |
const dd::Table * | table, | ||
const sdi_key_t * | sdi_key | ||
) |
Delete SDI from tablespace.
[in] | tablespace | tablespace object |
[in] | table | table object |
[in] | sdi_key | SDI key to uniquely identify the tablespace object |
false | success |
true | failure |
bool dict_sdi_drop | ( | dd::Tablespace * | tablespace | ) |
Drop SDI in a tablespace.
This API should be used only when SDI is corrupted.
[in,out] | tablespace | tablespace object |
false | success |
true | failure |
|
static |
Check if SDI Index exists in a tablespace.
[in] | dd_space | DD tablespace object |
[in,out] | space_id | space_id from tablespace object |
bool dict_sdi_get | ( | const dd::Tablespace & | tablespace, |
const sdi_key_t * | sdi_key, | ||
void * | sdi, | ||
uint64_t * | sdi_len | ||
) |
Retrieve SDI from tablespace.
[in] | tablespace | tablespace object |
[in] | sdi_key | SDI key |
[in,out] | sdi | SDI retrieved from tablespace |
[in,out] | sdi_len | in: size of memory allocated out: actual length of SDI |
false | success |
true | in case of failures like record not found, sdi_len is UINT64MAX_T, else sdi_len is actual length of SDI |
bool dict_sdi_get_keys | ( | const dd::Tablespace & | tablespace, |
sdi_vector_t & | vector | ||
) |
Get the SDI keys in a tablespace into the vector provided.
[in] | tablespace | tablespace object |
[in,out] | vector | vector to hold SDI keys |
false | success |
true | failure |
|
static |
Report error on failure.
Calls dict_sdi_report_error(int errornum, const char *operation, const dd::Table *table, const dd::Tablespace &tablespace) with errornum=SDI_OPERATION_FAILED (for compatibility with existing code).
[in] | operation | SDI set or delete |
[in] | table | table object for which SDI is serialized |
[in] | tablespace | tablespace where SDI is stored |
|
static |
Report error on failure.
[in] | errornum | MySQL error number (for my_error()) (Must take 4 string arguments, in the same way as ER_SDI_OPERATION_FAILED) |
[in] | operation | SDI set or delete |
[in] | table | table object for which SDI is serialized |
[in] | tablespace | tablespace where SDI is stored |
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.
[in] | hton | handlerton object |
[in] | tablespace | tablespace object |
[in] | table | table object |
[in] | sdi_key | SDI key to uniquely identify the tablespace object |
[in] | sdi | SDI to be stored in tablespace |
[in] | sdi_len | SDI length |
false | success |
true | failure |