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

Method print_limit

sql/sql_lex.cc:2217–2242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2215
2216
2217void st_select_lex::print_limit(THD *thd,
2218 String *str,
2219 enum_query_type query_type)
2220{
2221 SELECT_LEX_UNIT *unit= master_unit();
2222 Item_subselect *item= unit->item;
2223
2224 if (item && unit->global_parameters == this)
2225 {
2226 Item_subselect::subs_type subs_type= item->substype();
2227 if (subs_type == Item_subselect::EXISTS_SUBS ||
2228 subs_type == Item_subselect::IN_SUBS ||
2229 subs_type == Item_subselect::ALL_SUBS)
2230 return;
2231 }
2232 if (explicit_limit)
2233 {
2234 str->append(STRING_WITH_LEN(" limit "));
2235 if (offset_limit)
2236 {
2237 offset_limit->print(str, query_type);
2238 str->append(',');
2239 }
2240 select_limit->print(str, query_type);
2241 }
2242}
2243
2244
2245/**

Callers 1

printMethod · 0.80

Calls 3

substypeMethod · 0.45
appendMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected