summaryrefslogtreecommitdiff
path: root/sql/partition_info.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-12-12 10:48:53 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-12-12 10:48:53 +0200
commitf77f8f6d1a5f4846766a8aab00a9e1e5f41909a1 (patch)
tree96a2c880e1756bba3e7350cd2adfd404d176d002 /sql/partition_info.cc
parentecd3a7e00de28d279ef180e1d4defa979e80f9e4 (diff)
parentd956709b4be67f96a869d0854c75d10cd502172b (diff)
downloadmariadb-git-f77f8f6d1a5f4846766a8aab00a9e1e5f41909a1.tar.gz
Merge 10.0 into 10.1
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 df0a733f121..74a1c2a267a 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -3143,6 +3143,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