summaryrefslogtreecommitdiff
path: root/sql/partition_element.h
diff options
context:
space:
mode:
authorEugene Kosov <claprix@yandex.ru>2017-12-12 22:01:39 +0300
committerAleksey Midenkov <midenok@gmail.com>2017-12-12 22:01:39 +0300
commitc66a20b494a391626c21907b42d515db66963787 (patch)
treef54eae22a72144464b7651871b289c9ddeeac9ad /sql/partition_element.h
parent74cc9ec14257275a0cd22a8f1d53353c6d039da1 (diff)
downloadmariadb-git-c66a20b494a391626c21907b42d515db66963787.tar.gz
SQL: better check for partition engine [#366]
Cleaned up by @midenok.
Diffstat (limited to 'sql/partition_element.h')
-rw-r--r--sql/partition_element.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/partition_element.h b/sql/partition_element.h
index da08a15b2ce..9785789d3eb 100644
--- a/sql/partition_element.h
+++ b/sql/partition_element.h
@@ -231,6 +231,21 @@ public:
DBUG_ASSERT(ev->col_val_array);
return ev->col_val_array[idx];
}
+
+ bool find_engine_flag(uint32 flag)
+ {
+ if (ha_check_storage_engine_flag(engine_type, flag))
+ return true;
+
+ List_iterator_fast<partition_element> it(subpartitions);
+ while (partition_element *element= it++)
+ {
+ if (element->find_engine_flag(flag))
+ return true;
+ }
+
+ return false;
+ }
};
#endif /* PARTITION_ELEMENT_INCLUDED */