1#ifndef SQL_PARTITION_INCLUDED
2#define SQL_PARTITION_INCLUDED
64#define HA_CAN_UPDATE_PARTITION_KEY (1 << 1)
70#define HA_CAN_PARTITION_UNIQUE (1 << 2)
72#define HA_USE_AUTO_PARTITION (1 << 3)
77#define HA_CAN_EXCHANGE_PARTITION (1 << 4)
81#define HA_CANNOT_PARTITION_FK (1 << 5)
86#define HA_TRUNCATE_PARTITION_PRECLOSE (1 << 6)
117 bool *work_part_info_used);
136 bool include_subpartitions);
147 bool use_sql_alloc,
bool show_partition_options,
149 const char *current_comment_start);
app_data_ptr new_data(u_int n, char *val, cons_type consensus)
Data describing the table being created by CREATE TABLE or altered by ALTER TABLE.
Definition: sql_alter.h:205
Runtime context for ALTER TABLE.
Definition: sql_alter.h:509
Create_field is a description a field/column that may or may not exists in a table.
Definition: create_field.h:51
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:936
Definition: sql_list.h:467
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:167
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: partition_element.h:108
Definition: partition_info.h:209
This file includes constants used by all storage engines.
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:52
long long int longlong
Definition: my_inttypes.h:55
uint32_t uint32
Definition: my_inttypes.h:67
static char * path
Definition: mysqldump.cc:149
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1081
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Definition: buf0block_hint.cc:30
Definition: commit_order_queue.h:34
size_t size(const char *const c)
Definition: base64.h:46
partition_state
Definition: partition_element.h:35
bool make_used_partitions_str(partition_info *part_info, List< const char > *parts)
Return comma-separated list of used partitions in the provided given string.
Definition: sql_partition.cc:5284
uint get_partition_field_store_length(Field *field)
Definition: sql_partition.cc:6125
bool compare_partition_options(HA_CREATE_INFO *table_create_info, partition_element *part_elem)
Check if partition is exchangeable with table by checking table options.
Definition: sql_partition.cc:4212
char * generate_partition_syntax(partition_info *part_info, uint *buf_length, bool use_sql_alloc, bool show_partition_options, bool print_expr, const char *current_comment_start)
Generate the partition syntax from the partition data structure.
Definition: sql_partition.cc:2295
bool field_is_partition_charset(Field *field)
Definition: sql_partition.cc:1397
void set_linear_hash_mask(partition_info *part_info, uint num_parts)
Definition: sql_partition.cc:1345
bool verify_data_with_partition(TABLE *table, TABLE *part_table, uint32 part_id)
Verify that all rows in a table is in the given partition.
Definition: sql_partition.cc:3540
bool set_part_state(Alter_info *alter_info, partition_info *tab_part_info, enum partition_state part_state, bool include_subpartitions)
Sets which partitions to be used in the command.
Definition: sql_partition.cc:4152
int expr_to_string(String *val_conv, Item *item_expr, Field *field, const char *field_name, const HA_CREATE_INFO *create_info, List< Create_field > *create_fields)
Definition: sql_partition.cc:2025
void append_row_to_str(String &str, const uchar *row, TABLE *table)
Append all fields in read_set to string.
Definition: sql_partition.cc:5215
bool get_cs_converted_part_value_from_string(THD *thd, Item *item, String *input_str, String *output_str, const CHARSET_INFO *cs, bool use_hex)
Definition: sql_show.cc:4439
const LEX_CSTRING partition_keywords[]
Definition: sql_partition.cc:117
void get_full_part_id_from_key(const TABLE *table, uchar *buf, KEY *key_info, const key_range *key_spec, part_id_range *part_spec)
Definition: sql_partition.cc:3504
int get_parts_for_update(const uchar *old_data, const uchar *new_data, const uchar *rec0, partition_info *part_info, uint32 *old_part_id, uint32 *new_part_id, longlong *func_value)
Definition: sql_partition.cc:318
bool partition_key_modified(TABLE *table, const MY_BITMAP *fields)
Definition: sql_partition.cc:2476
uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info, HA_CREATE_INFO *create_info, Alter_table_ctx *alter_ctx, bool *partition_changed, partition_info **new_part_info)
Definition: sql_partition.cc:4267
void mem_alloc_error(size_t size)
Definition: sql_partition.cc:5265
void get_partition_set(const TABLE *table, uchar *buf, const uint index, const key_range *key_spec, part_id_range *part_spec)
Definition: sql_partition.cc:3674
void truncate_partition_filename(MEM_ROOT *root, const char **path)
Truncate the partition file name from a path if it exists.
Definition: sql_partition.cc:1797
void set_all_part_state(partition_info *tab_part_info, enum partition_state part_state)
Set part_state for all partitions to given state.
Definition: sql_partition.cc:4121
void prune_partition_set(const TABLE *table, part_id_range *part_spec)
Definition: sql_partition.cc:3621
Item * convert_charset_partition_constant(Item *item, const CHARSET_INFO *cs)
Definition: sql_partition.cc:214
key_range key_range
Definition: sql_partition.h:49
bool check_part_func_fields(Field **ptr, bool ok_with_charsets)
Definition: sql_partition.cc:1429
int get_part_for_delete(const uchar *buf, const uchar *rec0, partition_info *part_info, uint32 *part_id)
Definition: sql_partition.cc:365
bool fix_partition_func(THD *thd, TABLE *table, bool create_table_ind)
Definition: sql_partition.cc:1476
enum_partition_keywords
Definition: sql_partition.h:155
@ PKW_COLUMNS
Definition: sql_partition.h:162
@ PKW_KEY
Definition: sql_partition.h:159
@ PKW_LINEAR
Definition: sql_partition.h:161
@ PKW_LIST
Definition: sql_partition.h:158
@ PKW_RANGE
Definition: sql_partition.h:157
@ PKW_ALGORITHM
Definition: sql_partition.h:163
@ PKW_MAXVALUE
Definition: sql_partition.h:160
@ PKW_HASH
Definition: sql_partition.h:156
bool mysql_unpack_partition(THD *thd, char *part_buf, uint part_info_len, TABLE *table, bool is_create_table_ind, handlerton *default_db_type, bool *work_part_info_used)
Definition: sql_partition.cc:3875
Definition: m_ctype.h:423
Struct to hold information about the table that should be created.
Definition: handler.h:3202
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
Definition: mysql_lex_string.h:40
Definition: my_bitmap.h:43
handlerton is a singleton structure - one instance per storage engine - to provide access to storage ...
Definition: handler.h:2734
Definition: my_base.h:1125
Definition: sql_partition.h:88
uint32 start_part
Definition: sql_partition.h:89
uint32 end_part
Definition: sql_partition.h:90