#At file:///export/home/didrik/mysqldev-next-mr/next-mr-bf-br2/ based on revid:holyfoot@stripped
2906 Tor Didriksen 2009-11-27
Bug#49165 Remove unused/confusing code/comments in setup_conds()
@ sql/sql_base.cc
Query_arena *arena and backup are both unused.
Removing those, allows us to remove select_lex->conds_processed_with_permanent_arena
@ sql/sql_lex.cc
conds_processed_with_permanent_arena is unused
@ sql/sql_lex.h
conds_processed_with_permanent_arena was unused
modified:
sql/sql_base.cc
sql/sql_lex.cc
sql/sql_lex.h
=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc 2009-11-25 15:03:05 +0000
+++ b/sql/sql_base.cc 2009-11-27 14:23:20 +0000
@@ -8008,7 +8008,6 @@ int setup_conds(THD *thd, TABLE_LIST *ta
COND **conds)
{
SELECT_LEX *select_lex= thd->lex->current_select;
- Query_arena *arena= thd->stmt_arena, backup;
TABLE_LIST *table= NULL; // For HP compilers
/*
it_is_update set to TRUE when tables of primary SELECT_LEX (SELECT_LEX
@@ -8024,10 +8023,6 @@ int setup_conds(THD *thd, TABLE_LIST *ta
select_lex->is_item_list_lookup= 0;
DBUG_ENTER("setup_conds");
- if (select_lex->conds_processed_with_permanent_arena ||
- arena->is_conventional())
- arena= 0; // For easier test
-
thd->mark_used_columns= MARK_COLUMNS_READ;
DBUG_PRINT("info", ("thd->mark_used_columns: %d", thd->mark_used_columns));
select_lex->cond_count= 0;
@@ -8096,7 +8091,6 @@ int setup_conds(THD *thd, TABLE_LIST *ta
We do this ON -> WHERE transformation only once per PS/SP statement.
*/
select_lex->where= *conds;
- select_lex->conds_processed_with_permanent_arena= 1;
}
thd->lex->current_select->is_item_list_lookup= save_is_item_list_lookup;
DBUG_RETURN(test(thd->is_error()));
=== modified file 'sql/sql_lex.cc'
--- a/sql/sql_lex.cc 2009-11-12 12:13:43 +0000
+++ b/sql/sql_lex.cc 2009-11-27 14:23:20 +0000
@@ -1672,7 +1672,6 @@ void st_select_lex::init_query()
parent_lex->push_context(&context);
cond_count= between_count= with_wild= 0;
max_equal_elems= 0;
- conds_processed_with_permanent_arena= 0;
ref_pointer_array= 0;
select_n_where_fields= 0;
select_n_having_items= 0;
=== modified file 'sql/sql_lex.h'
--- a/sql/sql_lex.h 2009-11-12 12:13:43 +0000
+++ b/sql/sql_lex.h 2009-11-27 14:23:20 +0000
@@ -638,11 +638,6 @@ public:
uint select_n_where_fields;
enum_parsing_place parsing_place; /* where we are parsing expression */
bool with_sum_func; /* sum function indicator */
- /*
- PS or SP cond natural joins was alredy processed with permanent
- arena and all additional items which we need alredy stored in it
- */
- bool conds_processed_with_permanent_arena;
ulong table_join_options;
uint in_sum_expr;
Attachment: [text/bzr-bundle] bzr/tor.didriksen@sun.com-20091127142320-vs9wqa8djhkdtbox.bundle