1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Window functions: moving ahead

Disable the code that attempts to group window functions together
by their PARTITION BY / ORDER BY clauses, because
1. It doesn't work: when I issue a query with just one window function,
  and no indexes on the table, filesort is not invoked at all.
2. It is not possible to check that it works currently.

Add my own code that does invoke filesort() for each window function.
- Hopefully the sort criteria is right
- Debugging shows that filesort operates on {sort_key, rowid} pairs (OK)
- We can read the filesort rowid result in order.
This commit is contained in:
Sergei Petrunia
2016-02-04 18:41:50 +03:00
parent c17f1df87b
commit 426cd232a7
2 changed files with 95 additions and 8 deletions

View File

@ -1519,7 +1519,7 @@ public:
int init_execution();
void exec();
void process_window_functions(List<Item> *curr_fields_list);
bool process_window_functions(List<Item> *curr_fields_list);
void exec_inner();
bool prepare_result(List<Item> **columns_list);