Commit 5fc53b7c authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-8202 - st_select_lex::master_unit() takes 0.17% in OLTP RO

To make st_select_lex::master_unit() inlinable:
- moved it's definition to sql_lex.h
- removed base class virtual master_unit() declaration since this method is
  specific to st_select_lex

Overhead change:
st_select_lex::master_unit()      0.17% -> out of radar
execute_sqlcom_select()           0.13% -> 0.12%
JOIN::save_explain_data_intern()  0.27% -> 0.23%
JOIN::optimize_inner()            0.76% -> 0.72%
JOIN::exec_inner()                0.30% -> 0.24%
JOIN::prepare()                   0.30% -> 0.29%
JOIN::optimize()                  0.05% -> 0.05%
parent adb952f5
......@@ -2232,12 +2232,6 @@ bool st_select_lex::test_limit()
st_select_lex_unit* st_select_lex_unit::master_unit()
{
return this;
}
st_select_lex* st_select_lex_unit::outer_select()
{
return (st_select_lex*) master;
......@@ -2345,12 +2339,6 @@ bool st_select_lex::add_ftfunc_to_list(Item_func_match *func)
}
st_select_lex_unit* st_select_lex::master_unit()
{
return (st_select_lex_unit*) master;
}
st_select_lex* st_select_lex::outer_select()
{
return (st_select_lex*) master->get_master();
......
......@@ -526,7 +526,6 @@ class st_select_lex_node {
void exclude();
void exclude_from_tree();
virtual st_select_lex_unit* master_unit()= 0;
virtual st_select_lex* outer_select()= 0;
virtual st_select_lex* return_after_parsing()= 0;
......@@ -668,7 +667,6 @@ class st_select_lex_unit: public st_select_lex_node {
TABLE *insert_table_with_stored_vcol;
void init_query();
st_select_lex_unit* master_unit();
st_select_lex* outer_select();
st_select_lex* first_select()
{
......@@ -898,7 +896,7 @@ class st_select_lex: public st_select_lex_node
void init_query();
void init_select();
st_select_lex_unit* master_unit();
st_select_lex_unit* master_unit() { return (st_select_lex_unit*) master; }
st_select_lex_unit* first_inner_unit()
{
return (st_select_lex_unit*) slave;
......
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