summaryrefslogtreecommitdiff
path: root/storage/innobase/include/dyn0buf.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/include/dyn0buf.h')
-rw-r--r--storage/innobase/include/dyn0buf.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/storage/innobase/include/dyn0buf.h b/storage/innobase/include/dyn0buf.h
index be263e04e15..bd883eb796c 100644
--- a/storage/innobase/include/dyn0buf.h
+++ b/storage/innobase/include/dyn0buf.h
@@ -331,6 +331,24 @@ public:
}
/**
+ Iterate over each block and call the functor.
+ @return false if iteration was terminated. */
+ template <typename Functor>
+ bool for_each_block(const Functor& functor) const
+ {
+ for (typename list_t::iterator it = m_list.begin(),
+ end = m_list.end();
+ it != end; ++it) {
+
+ if (!functor(&*it)) {
+ return false;
+ }
+ }
+
+ return(true);
+ }
+
+ /**
Iterate over all the blocks in reverse and call the iterator
@return false if iteration was terminated. */
template <typename Functor>