summaryrefslogtreecommitdiff
path: root/sql/sql_list.h
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2016-04-05 19:10:44 +0300
committerSergei Petrunia <psergey@askmonty.org>2016-04-05 19:10:44 +0300
commit9bd194b1b701bdbe6bb9202463df43511de14525 (patch)
tree71d29ea731931d7f697d17e3de64e762d848c00e /sql/sql_list.h
parente30bd913aea50ae405483bedd6ca47c1a93fd6a9 (diff)
downloadmariadb-git-9bd194b1b701bdbe6bb9202463df43511de14525.tar.gz
MDEV-9848: Window functions: reuse sorting and/or scanning
- Rename Window_funcs_computation to Window_funcs_computation_step - Introduce Window_func_sort which invokes filesort and then invokes computation of all window functions that use this ordering. - Expose Window functions' sort operations in EXPLAIN|ANALYZE FORMAT=JSON
Diffstat (limited to 'sql/sql_list.h')
-rw-r--r--sql/sql_list.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_list.h b/sql/sql_list.h
index 078a1c413d1..94e97e55aa7 100644
--- a/sql/sql_list.h
+++ b/sql/sql_list.h
@@ -451,6 +451,11 @@ public:
el= &current->next;
return current->info;
}
+ /* Get what calling next() would return, without moving the iterator */
+ inline void *peek()
+ {
+ return (*el)->info;
+ }
inline void *next_fast(void)
{
list_node *tmp;
@@ -503,6 +508,10 @@ public:
{
return el == &list->last_ref()->next;
}
+ inline bool at_end()
+ {
+ return current == &end_of_list;
+ }
friend class error_list_iterator;
};
@@ -550,6 +559,7 @@ public:
List_iterator() : base_list_iterator() {}
inline void init(List<T> &a) { base_list_iterator::init(a); }
inline T* operator++(int) { return (T*) base_list_iterator::next(); }
+ inline T* peek() { return (T*) base_list_iterator::peek(); }
inline T *replace(T *a) { return (T*) base_list_iterator::replace(a); }
inline T *replace(List<T> &a) { return (T*) base_list_iterator::replace(a); }
inline void rewind(void) { base_list_iterator::rewind(); }