MCPcopy Create free account
hub / github.com/MariaDB/server / alloc_select

Method alloc_select

sql/sql_lex.cc:6518–6540  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6516
6517
6518SELECT_LEX *LEX::alloc_select(bool select)
6519{
6520 SELECT_LEX *select_lex;
6521 DBUG_ENTER("LEX::alloc_select");
6522 if (!(select_lex= new (thd->mem_root) SELECT_LEX()))
6523 DBUG_RETURN(NULL);
6524 DBUG_PRINT("info", ("Allocate select: %p #%u statement lex: %p",
6525 select_lex, thd->lex->stmt_lex->current_select_number,
6526 thd->lex->stmt_lex));
6527 /*
6528 TODO: move following init to constructor when we get rid of builtin
6529 select
6530 */
6531 select_lex->select_number= ++thd->lex->stmt_lex->current_select_number;
6532 select_lex->parent_lex= this; /* Used in init_query. */
6533 select_lex->init_query();
6534 if (select)
6535 select_lex->init_select();
6536 select_lex->nest_level_base= &this->unit;
6537 select_lex->include_global((st_select_lex_node**)&all_selects_list);
6538 select_lex->context.resolve_in_select_list= TRUE;
6539 DBUG_RETURN(select_lex);
6540}
6541
6542SELECT_LEX_UNIT *
6543LEX::create_unit(SELECT_LEX *first_sel)

Callers

nothing calls this directly

Calls 3

init_queryMethod · 0.80
include_globalMethod · 0.80
init_selectMethod · 0.45

Tested by

no test coverage detected