MySQL 8.4.2
Source Code Documentation
compression.cc File Reference
#include "compression.h"
#include "my_dbug.h"
#include "my_sys.h"
#include "mysql/strings/m_ctype.h"
#include "mysqld_error.h"

Functions

enum_compression_algorithm get_compression_algorithm (std::string name)
 This function is used to validate compression algorithm specified as part of change replication source to statement. More...
 
void parse_compression_algorithms_list (std::string name, std::vector< std::string > &list)
 This function is used to parse comma separated list of compression algorithm names and return a list containing every algorithm name. More...
 
bool is_zstd_compression_level_valid (uint level)
 This function is used to validate compression level for zstd compression. More...
 
bool validate_compression_attributes (std::string algorithm_names, std::string channel_name, bool ignore_errors)
 This function is used to validate compression algorithm names and maximum names is not more than 3. More...
 

Function Documentation

◆ get_compression_algorithm()

enum_compression_algorithm get_compression_algorithm ( std::string  name)

This function is used to validate compression algorithm specified as part of change replication source to statement.

Parameters
namecompression algorithm name. Name can be either zlib,zstd or empty string.
Return values
anenum to represents what algorithm is specified in case it is a valid algorithm else return INVALID.

◆ is_zstd_compression_level_valid()

bool is_zstd_compression_level_valid ( uint  level)

This function is used to validate compression level for zstd compression.

Parameters
levelcompression level to be validated against compression name
Return values
falseif level is not valid.
trueif level is valid.

◆ parse_compression_algorithms_list()

void parse_compression_algorithms_list ( std::string  name,
std::vector< std::string > &  list 
)

This function is used to parse comma separated list of compression algorithm names and return a list containing every algorithm name.

Parameters
namecomma separated list of compression algorithm names
[out]listlist containing algorithm names

◆ validate_compression_attributes()

bool validate_compression_attributes ( std::string  algorithm_names,
std::string  channel_name,
bool  ignore_errors 
)

This function is used to validate compression algorithm names and maximum names is not more than 3.

Parameters
algorithm_nameslist of compression algorithm names.
channel_nameReplication channel name.
ignore_errorsIf set to false, report errors to the client, otherwise do not report errors"
Return values
0success
1error or warnings