diff options
-rw-r--r-- | mysql-test/r/subselect_mat.result | 2 | ||||
-rw-r--r-- | sql/opt_subselect.cc | 11 | ||||
-rw-r--r-- | sql/sql_base.cc | 22 | ||||
-rw-r--r-- | sql/sql_select.cc | 2 |
4 files changed, 2 insertions, 35 deletions
diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result index 8290e3e6f2a..578b79e9518 100644 --- a/mysql-test/r/subselect_mat.result +++ b/mysql-test/r/subselect_mat.result @@ -1,5 +1,7 @@ set @@optimizer_switch='materialization=on,in_to_exists=off,semijoin=off'; drop table if exists t1, t2, t3, t1i, t2i, t3i; +drop table if exists columns; +drop table if exists t1_16, t2_16, t3_16; drop view if exists v1, v2, v1m, v2m; create table t1 (a1 char(8), a2 char(8)); create table t2 (b1 char(8), b2 char(8)); diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 95c30a873b3..9d00b5ba89b 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -890,8 +890,6 @@ void get_delayed_table_estimates(TABLE *table, { Item_in_subselect *item= table->pos_in_table_list->jtbm_subselect; - //psergey-merge: moving off here: item->optimize(&rows, &read_time); - DBUG_ASSERT(item->engine->engine_type() == subselect_engine::HASH_SJ_ENGINE); @@ -1322,12 +1320,9 @@ static bool convert_subq_to_jtbm(JOIN *parent_join, TABLE_LIST *tl; DBUG_ENTER("convert_subq_to_jtbm"); - //if (subq_pred->setup_engine(TRUE)) - // DBUG_RETURN(TRUE); double rows; double read_time; - // psergey-merge: disable IN->EXISTS for JTBM subqueries, for now. subq_pred->in_strategy &= ~SUBS_IN_TO_EXISTS; subq_pred->optimize(&rows, &read_time); @@ -1335,12 +1330,6 @@ static bool convert_subq_to_jtbm(JOIN *parent_join, subq_pred->jtbm_record_count=rows; subq_pred->is_jtbm_merged= TRUE; - //psergey-merge: The following is called inside optimize() call: -#if 0 - if (subq_pred->setup_mat_engine()) - DBUG_RETURN(TRUE); -#endif - if (subq_pred->engine->engine_type() != subselect_engine::HASH_SJ_ENGINE) { *remove_item= FALSE; diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 5de25612585..8e74640606e 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -7816,28 +7816,6 @@ bool setup_tables(THD *thd, Name_resolution_context *context, DBUG_RETURN(1); } DBUG_ASSERT(item == table_list->jtbm_subselect->optimizer); - /* - { - Item_in_subselect *subq_pred= table_list->jtbm_subselect; - double rows; - double read_time; - - // psergey-merge: disable IN->EXISTS for JTBM subqueries, for now. - subq_pred->in_strategy &= ~SUBS_IN_TO_EXISTS; - subq_pred->optimize(&rows, &read_time); - - subq_pred->jtbm_read_time= read_time; - subq_pred->jtbm_record_count=rows; - subq_pred->is_jtbm_merged= TRUE; - } - // The following call should never ever be made on its own anymore: - if (table_list->jtbm_subselect->setup_mat_engine()) // dont_switch_arena=FALSE - DBUG_RETURN(1); - */ - //psergey-merge: fix prepared statements: - //subselect_hash_sj_engine *mat_engine= - // (subselect_hash_sj_engine*)table_list->jtbm_subselect->engine; - //table= table_list->table= mat_engine->tmp_table; } } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index e69b6ce153c..d6d28b5fd0b 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -785,7 +785,6 @@ inject_jtbm_conds(JOIN *join, List<TABLE_LIST> *join_list, Item **join_where) double rows; double read_time; - // psergey-merge: disable IN->EXISTS for JTBM subqueries, for now. subq_pred->in_strategy &= ~SUBS_IN_TO_EXISTS; subq_pred->optimize(&rows, &read_time); @@ -908,7 +907,6 @@ JOIN::optimize() thd->restore_active_arena(arena, &backup); } - //psergey-merge inject_jtbm_conds(this, join_list, &conds); conds= optimize_cond(this, conds, join_list, &cond_value, &cond_equal); |