Commit d176be8a authored by Eugene Kosov's avatar Eugene Kosov Committed by Sergey Vojtovich

remove dead code (#450)

* remove dead code

* rename method to reduce confusion
parent 7e4a3c29
...@@ -681,7 +681,6 @@ void LEX::start(THD *thd_arg) ...@@ -681,7 +681,6 @@ void LEX::start(THD *thd_arg)
context_stack.empty(); context_stack.empty();
unit.init_query(); unit.init_query();
unit.init_select();
select_lex.linkage= UNSPECIFIED_TYPE; select_lex.linkage= UNSPECIFIED_TYPE;
/* 'parent_lex' is used in init_query() so it must be before it. */ /* 'parent_lex' is used in init_query() so it must be before it. */
select_lex.parent_lex= this; select_lex.parent_lex= this;
...@@ -2137,7 +2136,7 @@ void trim_whitespace(CHARSET_INFO *cs, LEX_CSTRING *str, uint *prefix_length) ...@@ -2137,7 +2136,7 @@ void trim_whitespace(CHARSET_INFO *cs, LEX_CSTRING *str, uint *prefix_length)
st_select_lex structures initialisations st_select_lex structures initialisations
*/ */
void st_select_lex_node::init_query() void st_select_lex_node::init_query_common()
{ {
options= 0; options= 0;
sql_cache= SQL_CACHE_UNSPECIFIED; sql_cache= SQL_CACHE_UNSPECIFIED;
...@@ -2146,13 +2145,9 @@ void st_select_lex_node::init_query() ...@@ -2146,13 +2145,9 @@ void st_select_lex_node::init_query()
uncacheable= 0; uncacheable= 0;
} }
void st_select_lex_node::init_select()
{
}
void st_select_lex_unit::init_query() void st_select_lex_unit::init_query()
{ {
st_select_lex_node::init_query(); init_query_common();
linkage= GLOBAL_OPTIONS_TYPE; linkage= GLOBAL_OPTIONS_TYPE;
select_limit_cnt= HA_POS_ERROR; select_limit_cnt= HA_POS_ERROR;
offset_limit_cnt= 0; offset_limit_cnt= 0;
...@@ -2178,7 +2173,7 @@ void st_select_lex_unit::init_query() ...@@ -2178,7 +2173,7 @@ void st_select_lex_unit::init_query()
void st_select_lex::init_query() void st_select_lex::init_query()
{ {
st_select_lex_node::init_query(); init_query_common();
table_list.empty(); table_list.empty();
top_join_list.empty(); top_join_list.empty();
join_list= &top_join_list; join_list= &top_join_list;
...@@ -2233,7 +2228,6 @@ void st_select_lex::init_query() ...@@ -2233,7 +2228,6 @@ void st_select_lex::init_query()
void st_select_lex::init_select() void st_select_lex::init_select()
{ {
st_select_lex_node::init_select();
sj_nests.empty(); sj_nests.empty();
sj_subselects.empty(); sj_subselects.empty();
group_list.empty(); group_list.empty();
...@@ -2556,15 +2550,6 @@ bool st_select_lex::mark_as_dependent(THD *thd, st_select_lex *last, ...@@ -2556,15 +2550,6 @@ bool st_select_lex::mark_as_dependent(THD *thd, st_select_lex *last,
return FALSE; 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 prohibit using LIMIT clause
*/ */
......
...@@ -550,6 +550,8 @@ class st_select_lex_node { ...@@ -550,6 +550,8 @@ class st_select_lex_node {
st_select_lex_node *next, **prev, /* neighbor list */ st_select_lex_node *next, **prev, /* neighbor list */
*master, *slave, /* vertical links */ *master, *slave, /* vertical links */
*link_next, **link_prev; /* list of whole SELECT_LEX */ *link_next, **link_prev; /* list of whole SELECT_LEX */
void init_query_common();
public: public:
ulonglong options; ulonglong options;
...@@ -587,11 +589,8 @@ class st_select_lex_node { ...@@ -587,11 +589,8 @@ class st_select_lex_node {
linkage(UNSPECIFIED_TYPE) linkage(UNSPECIFIED_TYPE)
{ {
} }
virtual ~st_select_lex_node() {}
inline st_select_lex_node* get_master() { return master; } 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 include_down(st_select_lex_node *upper);
void add_slave(st_select_lex_node *slave_arg); void add_slave(st_select_lex_node *slave_arg);
void include_neighbour(st_select_lex_node *before); void include_neighbour(st_select_lex_node *before);
...@@ -600,15 +599,6 @@ class st_select_lex_node { ...@@ -600,15 +599,6 @@ class st_select_lex_node {
void exclude(); void exclude();
void exclude_from_tree(); 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 set_slave(st_select_lex_node *slave_arg) { slave= slave_arg; }
void move_node(st_select_lex_node *where_to_move) 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) ...@@ -7600,7 +7600,6 @@ mysql_new_select(LEX *lex, bool move_down, SELECT_LEX *select_lex)
DBUG_RETURN(1); DBUG_RETURN(1);
unit->init_query(); unit->init_query();
unit->init_select();
unit->thd= thd; unit->thd= thd;
unit->include_down(lex->current_select); unit->include_down(lex->current_select);
unit->link_next= 0; unit->link_next= 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment