remove dead code (#450)
* remove dead code * rename method to reduce confusion
This commit is contained in:
parent
7e4a3c29e1
commit
d176be8aea
@ -681,7 +681,6 @@ void LEX::start(THD *thd_arg)
|
||||
|
||||
context_stack.empty();
|
||||
unit.init_query();
|
||||
unit.init_select();
|
||||
select_lex.linkage= UNSPECIFIED_TYPE;
|
||||
/* 'parent_lex' is used in init_query() so it must be before it. */
|
||||
select_lex.parent_lex= this;
|
||||
@ -2137,7 +2136,7 @@ void trim_whitespace(CHARSET_INFO *cs, LEX_CSTRING *str, uint *prefix_length)
|
||||
st_select_lex structures initialisations
|
||||
*/
|
||||
|
||||
void st_select_lex_node::init_query()
|
||||
void st_select_lex_node::init_query_common()
|
||||
{
|
||||
options= 0;
|
||||
sql_cache= SQL_CACHE_UNSPECIFIED;
|
||||
@ -2146,13 +2145,9 @@ void st_select_lex_node::init_query()
|
||||
uncacheable= 0;
|
||||
}
|
||||
|
||||
void st_select_lex_node::init_select()
|
||||
{
|
||||
}
|
||||
|
||||
void st_select_lex_unit::init_query()
|
||||
{
|
||||
st_select_lex_node::init_query();
|
||||
init_query_common();
|
||||
linkage= GLOBAL_OPTIONS_TYPE;
|
||||
select_limit_cnt= HA_POS_ERROR;
|
||||
offset_limit_cnt= 0;
|
||||
@ -2178,7 +2173,7 @@ void st_select_lex_unit::init_query()
|
||||
|
||||
void st_select_lex::init_query()
|
||||
{
|
||||
st_select_lex_node::init_query();
|
||||
init_query_common();
|
||||
table_list.empty();
|
||||
top_join_list.empty();
|
||||
join_list= &top_join_list;
|
||||
@ -2233,7 +2228,6 @@ void st_select_lex::init_query()
|
||||
|
||||
void st_select_lex::init_select()
|
||||
{
|
||||
st_select_lex_node::init_select();
|
||||
sj_nests.empty();
|
||||
sj_subselects.empty();
|
||||
group_list.empty();
|
||||
@ -2556,15 +2550,6 @@ bool st_select_lex::mark_as_dependent(THD *thd, st_select_lex *last,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool st_select_lex_node::inc_in_sum_expr() { return 1; }
|
||||
uint st_select_lex_node::get_in_sum_expr() { return 0; }
|
||||
TABLE_LIST* st_select_lex_node::get_table_list() { return 0; }
|
||||
List<Item>* st_select_lex_node::get_item_list() { return 0; }
|
||||
ulong st_select_lex_node::get_table_join_options()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
prohibit using LIMIT clause
|
||||
*/
|
||||
|
@ -550,6 +550,8 @@ protected:
|
||||
st_select_lex_node *next, **prev, /* neighbor list */
|
||||
*master, *slave, /* vertical links */
|
||||
*link_next, **link_prev; /* list of whole SELECT_LEX */
|
||||
|
||||
void init_query_common();
|
||||
public:
|
||||
|
||||
ulonglong options;
|
||||
@ -587,11 +589,8 @@ public:
|
||||
linkage(UNSPECIFIED_TYPE)
|
||||
{
|
||||
}
|
||||
virtual ~st_select_lex_node() {}
|
||||
|
||||
inline st_select_lex_node* get_master() { return master; }
|
||||
virtual void init_query();
|
||||
virtual void init_select();
|
||||
void include_down(st_select_lex_node *upper);
|
||||
void add_slave(st_select_lex_node *slave_arg);
|
||||
void include_neighbour(st_select_lex_node *before);
|
||||
@ -600,15 +599,6 @@ public:
|
||||
void exclude();
|
||||
void exclude_from_tree();
|
||||
|
||||
virtual st_select_lex* outer_select()= 0;
|
||||
virtual st_select_lex* return_after_parsing()= 0;
|
||||
|
||||
virtual bool inc_in_sum_expr();
|
||||
virtual uint get_in_sum_expr();
|
||||
virtual TABLE_LIST* get_table_list();
|
||||
virtual List<Item>* get_item_list();
|
||||
virtual ulong get_table_join_options();
|
||||
virtual void set_lock_for_tables(thr_lock_type lock_type) {}
|
||||
void set_slave(st_select_lex_node *slave_arg) { slave= slave_arg; }
|
||||
void move_node(st_select_lex_node *where_to_move)
|
||||
{
|
||||
|
@ -7600,7 +7600,6 @@ mysql_new_select(LEX *lex, bool move_down, SELECT_LEX *select_lex)
|
||||
DBUG_RETURN(1);
|
||||
|
||||
unit->init_query();
|
||||
unit->init_select();
|
||||
unit->thd= thd;
|
||||
unit->include_down(lex->current_select);
|
||||
unit->link_next= 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user