mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Bug#50036: Inconsistent errors when using TIMESTAMP columns/expressions
It was hard to understand what the error really meant. The error checking in partitioning is done in several different parts during the execution of a query which can make it hard to return useful errors. Added a new error for bad VALUES part in the per PARTITION clause. Using the more verbose error that a column is not allowed in the partitioning function instead of just that the function is not allowed.
This commit is contained in:
@@ -166,7 +166,6 @@ public:
|
||||
key_map some_fields_in_PF;
|
||||
|
||||
handlerton *default_engine_type;
|
||||
Item_result part_result_type;
|
||||
partition_type part_type;
|
||||
partition_type subpart_type;
|
||||
|
||||
@@ -226,7 +225,6 @@ public:
|
||||
curr_part_elem(NULL), current_partition(NULL),
|
||||
curr_list_object(0), num_columns(0),
|
||||
default_engine_type(NULL),
|
||||
part_result_type(INT_RESULT),
|
||||
part_type(NOT_A_PARTITION), subpart_type(NOT_A_PARTITION),
|
||||
part_info_len(0),
|
||||
part_func_len(0), subpart_func_len(0),
|
||||
@@ -279,10 +277,10 @@ public:
|
||||
void print_no_partition_found(TABLE *table);
|
||||
void print_debug(const char *str, uint*);
|
||||
Item* get_column_item(Item *item, Field *field);
|
||||
int fix_func_partition(THD *thd,
|
||||
part_elem_value *val,
|
||||
partition_element *part_elem,
|
||||
uint part_id);
|
||||
int fix_partition_values(THD *thd,
|
||||
part_elem_value *val,
|
||||
partition_element *part_elem,
|
||||
uint part_id);
|
||||
bool fix_column_value_functions(THD *thd,
|
||||
part_elem_value *val,
|
||||
uint part_id);
|
||||
@@ -299,6 +297,7 @@ public:
|
||||
bool init_column_part();
|
||||
bool add_column_list_value(THD *thd, Item *item);
|
||||
void set_show_version_string(String *packet);
|
||||
void report_part_expr_error(bool use_subpart_expr);
|
||||
private:
|
||||
static int list_part_cmp(const void* a, const void* b);
|
||||
bool set_up_default_partitions(handler *file, HA_CREATE_INFO *info,
|
||||
|
||||
Reference in New Issue
Block a user