#include <sstream>
#include <string>
#include <vector>
#include "my_inttypes.h"
#include "mysql_com.h"
Go to the source code of this file.
◆ COMPRESSION_ALGORITHM_COUNT_MAX
#define COMPRESSION_ALGORITHM_COUNT_MAX 3 |
◆ COMPRESSION_ALGORITHM_NAME_BUFFER_SIZE
#define COMPRESSION_ALGORITHM_NAME_BUFFER_SIZE |
Value:
3)
#define COMPRESSION_ALGORITHM_NAME_LENGTH_MAX
Definition: compression.h:40
#define COMPRESSION_ALGORITHM_COUNT_MAX
Definition: compression.h:41
◆ COMPRESSION_ALGORITHM_NAME_LENGTH_MAX
#define COMPRESSION_ALGORITHM_NAME_LENGTH_MAX 32 |
◆ COMPRESSION_ALGORITHM_UNCOMPRESSED
#define COMPRESSION_ALGORITHM_UNCOMPRESSED "uncompressed" |
◆ COMPRESSION_ALGORITHM_ZLIB
#define COMPRESSION_ALGORITHM_ZLIB "zlib" |
◆ COMPRESSION_ALGORITHM_ZSTD
#define COMPRESSION_ALGORITHM_ZSTD "zstd" |
◆ PROTOCOL_COMPRESSION_DEFAULT_VALUE
#define PROTOCOL_COMPRESSION_DEFAULT_VALUE "zlib,zstd,uncompressed" |
◆ get_compression_algorithm()
This function is used to validate compression algorithm specified as part of change replication source to statement.
- Parameters
-
name | compression algorithm name. Name can be either zlib,zstd or empty string. |
- Return values
-
an | enum to represents what algorithm is specified in case it is a valid algorithm else return INVALID. |
◆ get_compression_algorithm_name()
◆ 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
-
level | compression level to be validated against compression name |
- Return values
-
false | if level is not valid. |
true | if 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
-
| name | comma separated list of compression algorithm names |
[out] | list | list 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_names | list of compression algorithm names. |
channel_name | Replication channel name. |
ignore_errors | If set to false, report errors to the client, otherwise do not report errors" |
- Return values
-
0 | success |
1 | error or warnings |
◆ default_zstd_compression_level
constexpr int default_zstd_compression_level = 3 |
|
constexpr |