MySQL 8.4.3
Source Code Documentation
|
#include "sql/partition_info.h"
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <memory>
#include <string>
#include <utility>
#include "lex_string.h"
#include "map_helpers.h"
#include "my_compiler.h"
#include "my_dbug.h"
#include "my_sqlcommand.h"
#include "my_sys.h"
#include "mysql/components/services/bits/psi_bits.h"
#include "mysql/plugin.h"
#include "mysql/strings/int2str.h"
#include "mysql/strings/m_ctype.h"
#include "mysql/udf_registration_types.h"
#include "mysqld_error.h"
#include "sql/auth/auth_acls.h"
#include "sql/auth/auth_common.h"
#include "sql/create_field.h"
#include "sql/derror.h"
#include "sql/field.h"
#include "sql/handler.h"
#include "sql/item.h"
#include "sql/partitioning/partition_handler.h"
#include "sql/set_var.h"
#include "sql/sql_base.h"
#include "sql/sql_class.h"
#include "sql/sql_const.h"
#include "sql/sql_error.h"
#include "sql/sql_lex.h"
#include "sql/sql_parse.h"
#include "sql/sql_partition.h"
#include "sql/sql_tablespace.h"
#include "sql/system_variables.h"
#include "sql/table.h"
#include "sql/table_trigger_dispatcher.h"
#include "sql/thr_malloc.h"
#include "sql/trigger_chain.h"
#include "sql/trigger_def.h"
#include "sql_string.h"
#include "string_with_len.h"
Macros | |
#define | MAX_PART_NAME_SIZE 8 |
Functions | |
static bool | check_engine_condition (partition_element *p_elem, bool table_engine_set, handlerton **engine_type, bool *first) |
static int | partition_info_compare_column_values (const part_column_list_val *first, const part_column_list_val *second) |
static void | warn_if_dir_in_part_elem (THD *thd, partition_element *part_elem) |
Check if we allow DATA/INDEX DIRECTORY, if not warn and set them to NULL. More... | |
bool | check_partition_dirs (partition_info *part_info) |
static bool | strcmp_null (const char *a, const char *b) |
helper function to compare strings that can also be a NULL pointer. More... | |
static bool | has_same_column_order (List< Create_field > *create_list, Field **field_array) |
bool | has_external_data_or_index_dir (partition_info &pi) |
Predicate which returns true if any partition or subpartition uses an external data directory or external index directory. More... | |
bool | fill_partition_tablespace_names (partition_info *part_info, Tablespace_hash_set *tablespace_set) |
Fill the Tablespace_hash_set with the tablespace names used by the partitions on the table. More... | |
bool | validate_partition_tablespace_name_lengths (partition_info *part_info) |
Check if all tablespace names specified for partitions have a valid length. More... | |
bool | validate_partition_tablespace_names (partition_info *part_info, const handlerton *default_engine) |
Check if all tablespace names specified for partitions are valid. More... | |
#define MAX_PART_NAME_SIZE 8 |
|
static |
bool check_partition_dirs | ( | partition_info * | part_info | ) |
bool fill_partition_tablespace_names | ( | partition_info * | part_info, |
Tablespace_hash_set * | tablespace_set | ||
) |
Fill the Tablespace_hash_set with the tablespace names used by the partitions on the table.
part_info | - Partition info that could be using tablespaces. |
tablespace_set | - (OUT) Tablespace_hash_set where tablespace names are collected. |
bool has_external_data_or_index_dir | ( | partition_info & | pi | ) |
Predicate which returns true if any partition or subpartition uses an external data directory or external index directory.
pi | partitioning information |
true | if any partition or subpartition has an external data directory or external index directory. |
false | otherwise |
|
static |
|
static |
|
static |
helper function to compare strings that can also be a NULL pointer.
a | char pointer (can be NULL). |
b | char pointer (can be NULL). |
true | strings differs |
false | strings is equal |
bool validate_partition_tablespace_name_lengths | ( | partition_info * | part_info | ) |
Check if all tablespace names specified for partitions have a valid length.
part_info | Partition info that could be using tablespaces. |
bool validate_partition_tablespace_names | ( | partition_info * | part_info, |
const handlerton * | default_engine | ||
) |
Check if all tablespace names specified for partitions are valid.
Do the validation by invoking the SE specific validation function.
part_info | Partition info that could be using tablespaces. |
default_engine | Table level engine. |
|
static |
Check if we allow DATA/INDEX DIRECTORY, if not warn and set them to NULL.
thd | THD also containing sql_mode (looks from MODE_NO_DIR_IN_CREATE). |
part_elem | partition_element to check. |