summaryrefslogtreecommitdiff
path: root/sql/partition_info.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/partition_info.h')
-rw-r--r--sql/partition_info.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/sql/partition_info.h b/sql/partition_info.h
index 8cc989c0991..91beaf569e0 100644
--- a/sql/partition_info.h
+++ b/sql/partition_info.h
@@ -60,7 +60,17 @@ public:
same in all subpartitions
*/
get_subpart_id_func get_subpartition_id;
-
+
+ /*
+ When we have various string fields we might need some preparation
+ before and clean-up after calling the get_part_id_func's. We need
+ one such method for get_partition_id and one for
+ get_part_partition_id and one for get_subpartition_id.
+ */
+ get_part_id_func get_partition_id_charset;
+ get_part_id_func get_part_partition_id_charset;
+ get_subpart_id_func get_subpartition_id_charset;
+
/* NULL-terminated array of fields used in partitioned expression */
Field **part_field_array;
/* NULL-terminated array of fields used in subpartitioned expression */
@@ -72,6 +82,16 @@ public:
*/
Field **full_part_field_array;
+ /*
+ When we have a field that requires transformation before calling the
+ partition functions we must allocate field buffers for the field of
+ the fields in the partition function.
+ */
+ char **part_field_buffers;
+ char **subpart_field_buffers;
+ char **restore_part_field_ptrs;
+ char **restore_subpart_field_ptrs;
+
Item *part_expr;
Item *subpart_expr;
@@ -188,6 +208,8 @@ public:
bool is_auto_partitioned;
bool from_openfrm;
bool has_null_value;
+ bool includes_charset_field_part;
+ bool includes_charset_field_subpart;
partition_info()
@@ -195,6 +217,8 @@ public:
get_subpartition_id(NULL),
part_field_array(NULL), subpart_field_array(NULL),
full_part_field_array(NULL),
+ part_field_buffers(NULL), subpart_field_buffers(NULL),
+ restore_part_field_ptrs(NULL), restore_subpart_field_ptrs(NULL),
part_expr(NULL), subpart_expr(NULL), item_free_list(NULL),
first_log_entry(NULL), exec_log_entry(NULL), frm_log_entry(NULL),
list_array(NULL),
@@ -217,7 +241,8 @@ public:
list_of_part_fields(FALSE), list_of_subpart_fields(FALSE),
linear_hash_ind(FALSE), fixed(FALSE),
is_auto_partitioned(FALSE), from_openfrm(FALSE),
- has_null_value(FALSE)
+ has_null_value(FALSE), includes_charset_field_part(FALSE),
+ includes_charset_field_subpart(FALSE)
{
all_fields_in_PF.clear_all();
all_fields_in_PPF.clear_all();