| 2215 | |
| 2216 | |
| 2217 | void 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 | /** |