Commit fc7a75b0 authored by unknown's avatar unknown

cleanup: #ifdef DELETE_ITEMS removed


sql/item.cc:
  #ifdef DELETE_ITEMS removed
sql/item_cmpfunc.cc:
  #ifdef DELETE_ITEMS removed
sql/sql_parse.cc:
  #ifdef DELETE_ITEMS removed
sql/sql_select.cc:
  #ifdef DELETE_ITEMS removed
parent 1a7af005
......@@ -1779,17 +1779,9 @@ Item *resolve_const_item(Item *item,Item *comp_item)
String tmp(buff,sizeof(buff),&my_charset_bin),*result;
result=item->val_str(&tmp);
if (item->null_value)
{
#ifdef DELETE_ITEMS
delete item;
#endif
return new Item_null(name);
}
uint length=result->length();
char *tmp_str=sql_strmake(result->ptr(),length);
#ifdef DELETE_ITEMS
delete item;
#endif
return new Item_string(name,tmp_str,length,result->charset());
}
if (res_type == INT_RESULT)
......@@ -1797,9 +1789,6 @@ Item *resolve_const_item(Item *item,Item *comp_item)
longlong result=item->val_int();
uint length=item->max_length;
bool null_value=item->null_value;
#ifdef DELETE_ITEMS
delete item;
#endif
return (null_value ? (Item*) new Item_null(name) :
(Item*) new Item_int(name,result,length));
}
......@@ -1808,9 +1797,6 @@ Item *resolve_const_item(Item *item,Item *comp_item)
double result=item->val();
uint length=item->max_length,decimals=item->decimals;
bool null_value=item->null_value;
#ifdef DELETE_ITEMS
delete item;
#endif
return (null_value ? (Item*) new Item_null(name) :
(Item*) new Item_real(name,result,decimals,length));
}
......
......@@ -1703,9 +1703,6 @@ Item_cond::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
{ // Identical function
li.replace(((Item_cond*) item)->list);
((Item_cond*) item)->list.empty();
#ifdef DELETE_ITEMS
delete (Item_cond*) item;
#endif
item= *li.ref(); // new current item
}
if (abort_on_null)
......
......@@ -1899,10 +1899,6 @@ mysql_execute_command(THD *thd)
if (!(result=new select_send()))
{
res= -1;
#ifdef DELETE_ITEMS
delete select_lex->having;
delete select_lex->where;
#endif
break;
}
}
......
......@@ -4395,17 +4395,9 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value)
{
Item *new_item=remove_eq_conds(item,&tmp_cond_value);
if (!new_item)
{
#ifdef DELETE_ITEMS
delete item; // This may be shared
#endif
li.remove();
}
else if (item != new_item)
{
#ifdef DELETE_ITEMS
delete item; // This may be shared
#endif
VOID(li.replace(new_item));
should_fix_fields=1;
}
......
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