Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
629f9fea
Commit
629f9fea
authored
Apr 04, 2016
by
Vicențiu Ciorbaru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix post review comments regarding the usage of List<>.
parent
162ea7c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
sql/sql_window.cc
sql/sql_window.cc
+11
-14
No files found.
sql/sql_window.cc
View file @
629f9fea
...
...
@@ -1527,13 +1527,11 @@ void add_extra_frame_cursors(List<Frame_cursor> *cursors,
}
}
List
<
Frame_cursor
>
get_window_func_required_cursors
(
const
Item_window_func
*
item_win
)
void
get_window_func_required_cursors
(
List
<
Frame_cursor
>
*
result
,
const
Item_window_func
*
item_win
)
{
List
<
Frame_cursor
>
result
;
if
(
item_win
->
requires_partition_size
())
result
.
push_back
(
new
Frame_unbounded_following_set_count
);
result
->
push_back
(
new
Frame_unbounded_following_set_count
);
/*
If it is not a regular window function that follows frame specifications,
...
...
@@ -1541,17 +1539,15 @@ List<Frame_cursor> get_window_func_required_cursors(
*/
if
(
item_win
->
is_frame_prohibited
())
{
add_extra_frame_cursors
(
&
result
,
item_win
->
window_func
());
return
result
;
add_extra_frame_cursors
(
result
,
item_win
->
window_func
());
return
;
}
/* A regular window function follows the frame specification. */
result
.
push_back
(
get_frame_cursor
(
item_win
->
window_spec
->
window_frame
,
false
));
result
.
push_back
(
get_frame_cursor
(
item_win
->
window_spec
->
window_frame
,
true
));
return
result
;
result
->
push_back
(
get_frame_cursor
(
item_win
->
window_spec
->
window_frame
,
false
));
result
->
push_back
(
get_frame_cursor
(
item_win
->
window_spec
->
window_frame
,
true
));
}
/*
...
...
@@ -1600,7 +1596,8 @@ bool compute_window_func_with_frames(Item_window_func *item_win,
/* This algorithm doesn't support DISTINCT aggregator */
sum_func
->
set_aggregator
(
Aggregator
::
SIMPLE_AGGREGATOR
);
List
<
Frame_cursor
>
cursors
=
get_window_func_required_cursors
(
item_win
);
List
<
Frame_cursor
>
cursors
;
get_window_func_required_cursors
(
&
cursors
,
item_win
);
List_iterator_fast
<
Frame_cursor
>
it
(
cursors
);
Frame_cursor
*
c
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment