mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
cleanup: #ifdef DELETE_ITEMS removed
This commit is contained in:
parent
8f1b5b48cc
commit
7e9944d3d5
4 changed files with 0 additions and 29 deletions
14
sql/item.cc
14
sql/item.cc
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue