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

Method invalidate_and_restore_select_lex

sql/item_subselect.cc:316–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316st_select_lex *
317Item_singlerow_subselect::invalidate_and_restore_select_lex()
318{
319 DBUG_ENTER("Item_singlerow_subselect::invalidate_and_restore_select_lex");
320 st_select_lex *result= unit->first_select();
321
322 DBUG_ASSERT(result);
323
324 /*
325 This code restore the parse tree in it's state before the execution of
326 Item_singlerow_subselect::Item_singlerow_subselect(),
327 and in particular decouples this object from the SELECT_LEX,
328 so that the SELECT_LEX can be used with a different flavor
329 or Item_subselect instead, as part of query rewriting.
330 */
331 unit->item= NULL;
332
333 DBUG_RETURN(result);
334}
335
336Item_maxmin_subselect::Item_maxmin_subselect(THD *thd_param,
337 Item_subselect *parent,

Callers

nothing calls this directly

Calls 1

first_selectMethod · 0.80

Tested by

no test coverage detected