summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2004-02-03 23:34:31 +0300
committerunknown <konstantin@mysql.com>2004-02-03 23:34:31 +0300
commitfc7a75b0ac00a84e3319dfce53c58cacd20f4ed0 (patch)
tree22a3ec5bd5c72bb334906323290b6c8911aa8d07 /sql
parent1a7af0059d80e83e0bf9b83dca0f02998f7bc74b (diff)
downloadmariadb-git-fc7a75b0ac00a84e3319dfce53c58cacd20f4ed0.tar.gz
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
Diffstat (limited to 'sql')
-rw-r--r--sql/item.cc14
-rw-r--r--sql/item_cmpfunc.cc3
-rw-r--r--sql/sql_parse.cc4
-rw-r--r--sql/sql_select.cc8
4 files changed, 0 insertions, 29 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 09328dfbf07..4d06d0d7765 100644
--- a/sql/item.cc
+++ b/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));
}
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 59fd180c79f..55d511bb39d 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -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)
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 2e728e4ae6d..9d742995976 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -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;
}
}
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 1c734a2b625..aeaad4559e2 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -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;
}