summaryrefslogtreecommitdiff
path: root/sql/partition_info.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-12-12 13:46:06 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-12-12 13:46:06 +0200
commit839cf16bb2de078d5000bcb2f9b3151f1ebda708 (patch)
tree52deb93bd818156b0168601aefc9afbc537b1dbf /sql/partition_info.cc
parentdce2cc1c6a82d1ed9f4db9c39bc9cb1d3815a019 (diff)
parent91173f986373e4f5f134a2351a80d8763e5157e8 (diff)
downloadmariadb-git-839cf16bb2de078d5000bcb2f9b3151f1ebda708.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/partition_info.cc')
-rw-r--r--sql/partition_info.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index f09bde6a965..e24038f96ab 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -2626,6 +2626,23 @@ void partition_info::print_debug(const char *str, uint *value)
DBUG_PRINT("info", ("parser: %s", str));
DBUG_VOID_RETURN;
}
+
+bool partition_info::field_in_partition_expr(Field *field) const
+{
+ uint i;
+ for (i= 0; i < num_part_fields; i++)
+ {
+ if (field->eq(part_field_array[i]))
+ return TRUE;
+ }
+ for (i= 0; i < num_subpart_fields; i++)
+ {
+ if (field->eq(subpart_field_array[i]))
+ return TRUE;
+ }
+ return FALSE;
+}
+
#else /* WITH_PARTITION_STORAGE_ENGINE */
/*
For builds without partitioning we need to define these functions