MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / walk_body

Method walk_body

sql/item_subselect.cc:128–170  ·  view source on GitHub ↗

Workaround for bug in gcc 4.1. @See Item_in_subselect::walk() */

Source from the content-addressed store, hash-verified

126 Workaround for bug in gcc 4.1. @See Item_in_subselect::walk()
127*/
128bool Item_subselect::walk_body(Item_processor processor, bool walk_subquery,
129 uchar *argument)
130{
131 if (walk_subquery)
132 {
133 for (SELECT_LEX *lex= unit->first_select(); lex; lex= lex->next_select())
134 {
135 List_iterator<Item> li(lex->item_list);
136 Item *item;
137 ORDER *order;
138
139 while ((item=li++))
140 {
141 if (item->walk(processor, walk_subquery, argument))
142 return true;
143 }
144
145 if (lex->join_list != NULL &&
146 walk_join_condition(lex->join_list, processor, walk_subquery, argument))
147 return true;
148
149 if (lex->where && (lex->where)->walk(processor, walk_subquery, argument))
150 return true;
151
152 for (order= lex->group_list.first ; order; order= order->next)
153 {
154 if ((*order->item)->walk(processor, walk_subquery, argument))
155 return true;
156 }
157
158 if (lex->having && (lex->having)->walk(processor, walk_subquery,
159 argument))
160 return true;
161
162 for (order= lex->order_list.first ; order; order= order->next)
163 {
164 if ((*order->item)->walk(processor, walk_subquery, argument))
165 return true;
166 }
167 }
168 }
169 return (this->*processor)(argument);
170}
171
172bool Item_subselect::walk(Item_processor processor, bool walk_subquery,
173 uchar *argument)

Callers

nothing calls this directly

Calls 3

first_selectMethod · 0.80
next_selectMethod · 0.80
walkMethod · 0.45

Tested by

no test coverage detected