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

Method print_order

sql/sql_lex.cc:2195–2214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2193
2194
2195void st_select_lex::print_order(String *str,
2196 ORDER *order,
2197 enum_query_type query_type)
2198{
2199 for (; order; order= order->next)
2200 {
2201 if (order->counter_used)
2202 {
2203 char buffer[20];
2204 size_t length= my_snprintf(buffer, 20, "%d", order->counter);
2205 str->append(buffer, (uint) length);
2206 }
2207 else
2208 (*order->item)->print_for_order(str, query_type, order->used_alias);
2209 if (order->direction == ORDER::ORDER_DESC)
2210 str->append(STRING_WITH_LEN(" desc"));
2211 if (order->next)
2212 str->append(',');
2213 }
2214}
2215
2216
2217void st_select_lex::print_limit(THD *thd,

Callers 1

printMethod · 0.80

Calls 3

my_snprintfFunction · 0.85
print_for_orderMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected