MCPcopy Create free account
hub / github.com/MariaDB/server / optimize_out_order_list

Method optimize_out_order_list

sql/sql_lex.cc:13921–13949  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13919
13920
13921void st_select_lex::optimize_out_order_list()
13922{
13923 /* Cleanup first related window funcs */
13924 for (ORDER *ord= order_list.first; ord; ord= ord->next)
13925 {
13926 if (ord->window_funcs.is_empty())
13927 continue;
13928
13929 List_iterator<Item_window_func> it_sl(window_funcs);
13930 List_iterator<Item_window_func> it_ord(ord->window_funcs);
13931 Item_window_func *wf_sl, *wf_ord;
13932 while ((wf_sl= it_sl++))
13933 {
13934 it_ord.rewind();
13935 while ((wf_ord= it_ord++))
13936 {
13937 if (wf_ord == wf_sl)
13938 {
13939 it_sl.remove();
13940 it_ord.remove();
13941 break;
13942 }
13943 }
13944 if (ord->window_funcs.is_empty())
13945 break;
13946 }
13947 }
13948 order_list.empty();
13949}
13950
13951
13952/*

Callers 2

mysql_make_viewFunction · 0.80
prepareMethod · 0.80

Calls 4

is_emptyMethod · 0.45
rewindMethod · 0.45
removeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected