MySQL  8.0.27
Source Code Documentation
sdi_utils.h File Reference
#include <stddef.h>
#include "my_inttypes.h"

Go to the source code of this file.

Functions

bool create_serialized_meta_data (const char *schema_name, const char *table_name, uchar **meta_data, size_t *meta_data_length)
 This function retrieves serialized meta data from the data dictionary for the given schema and table. More...
 
bool import_serialized_meta_data (const uchar *meta_data, size_t meta_data_length, bool readonly)
 This function takes the submitted serialized meta data, de-serializes and analyzes it, and merges it into the data dictionary. More...
 
bool different_serialized_meta_data (const uchar *a_meta_data, size_t a_meta_data_length, const uchar *b_meta_data, size_t b_meta_data_length)
 This function takes the two submitted serialized meta data blobs, and compares them. More...
 

Function Documentation

◆ create_serialized_meta_data()

bool create_serialized_meta_data ( const char *  schema_name,
const char *  table_name,
uchar **  meta_data,
size_t *  meta_data_length 
)

This function retrieves serialized meta data from the data dictionary for the given schema and table.

The serialized meta data may be used for various purposes, such as writing it to a file, shipping it to other processes, etc.

Parameters
[in]schema_nameName of the schema
[in]table_nameName of the table
[out]meta_dataThe serialized meta data of the table
[out]meta_data_lengthThe size of the meta data blob
Return values
falseSuccess
trueError, e.g. the table was not found in the data dictionary. In this case, the values of 'meta_data_length' and 'meta_data' are not defined.

◆ different_serialized_meta_data()

bool different_serialized_meta_data ( const uchar a_meta_data,
size_t  a_meta_data_length,
const uchar b_meta_data,
size_t  b_meta_data_length 
)

This function takes the two submitted serialized meta data blobs, and compares them.

Parameters
[in]a_meta_dataFirst serialized meta data blob
[in]a_meta_data_lengthSize of the first meta data blob
[in]b_meta_dataSecond serialized meta data blob
[in]b_meta_data_lengthSize of the second meta data blob
Return values
falseThe two blobs are identical
trueThe two blobs are different

◆ import_serialized_meta_data()

bool import_serialized_meta_data ( const uchar meta_data,
size_t  meta_data_length,
bool  readonly 
)

This function takes the submitted serialized meta data, de-serializes and analyzes it, and merges it into the data dictionary.

Parameters
[in]meta_dataThe serialized meta data
[in]meta_data_lengthThe size of the meta data blob
[in]readonlyDisallow conflict resolution affecting the imported meta data
Return values
falseSuccess
trueError, e.g. a conflict was detected while 'readonly' is set to 'true'.