Commit ad5e9f0a authored by Sergey Petrunya's avatar Sergey Petrunya

Code cleanup: move variable into branch that uses it

parent 43b1afb4
...@@ -19895,7 +19895,6 @@ static bool add_ref_to_table_cond(THD *thd, JOIN_TAB *join_tab) ...@@ -19895,7 +19895,6 @@ static bool add_ref_to_table_cond(THD *thd, JOIN_TAB *join_tab)
DBUG_RETURN(FALSE); DBUG_RETURN(FALSE);
Item_cond_and *cond=new Item_cond_and(); Item_cond_and *cond=new Item_cond_and();
Item *cond_copy;
TABLE *table=join_tab->table; TABLE *table=join_tab->table;
int error= 0; int error= 0;
if (!cond) if (!cond)
...@@ -19918,6 +19917,7 @@ static bool add_ref_to_table_cond(THD *thd, JOIN_TAB *join_tab) ...@@ -19918,6 +19917,7 @@ static bool add_ref_to_table_cond(THD *thd, JOIN_TAB *join_tab)
} }
if (join_tab->select) if (join_tab->select)
{ {
Item *cond_copy;
UNINIT_VAR(cond_copy); // used when pre_idx_push_select_cond!=NULL UNINIT_VAR(cond_copy); // used when pre_idx_push_select_cond!=NULL
if (join_tab->select->pre_idx_push_select_cond) if (join_tab->select->pre_idx_push_select_cond)
cond_copy= cond->copy_andor_structure(thd); cond_copy= cond->copy_andor_structure(thd);
......
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