diff options
author | unknown <serg@serg.mylan> | 2004-11-28 15:53:17 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-11-28 15:53:17 +0100 |
commit | b7c31a9e21feff876c57dacfec4ac42514e4823e (patch) | |
tree | 46d7ffed3e41aa68db463fe32568cb1f56dc23f2 /sql/sql_parse.cc | |
parent | 9bdc86738000c785e931654e99bb8ace2edc6334 (diff) | |
download | mariadb-git-b7c31a9e21feff876c57dacfec4ac42514e4823e.tar.gz |
protection: TRASH in delete
fixed a bug that it discovered
include/my_sys.h:
move TRASH to my_sys.h from sql_list.h
sql/field.h:
use TRASH macro
sql/item.h:
TRASH in delete
sql/item_func.h:
never delete item's manually!
sql/opt_range.cc:
TRASH in delete
sql/sql_lex.h:
TRASH in delete
sql/sql_list.h:
move TRASH to my_sys.h from sql_list.h
sql/sql_parse.cc:
don't use properties of deleted objects (even when it's safe)
sql/sql_select.cc:
TRASH in delete
sql/sql_show.cc:
TRASH in delete
sql/sql_string.h:
TRASH in delete
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 785d5a329ba..c04312f6ded 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1175,9 +1175,13 @@ end: void free_items(Item *item) { + Item *next; DBUG_ENTER("free_items"); - for (; item ; item=item->next) + for (; item ; item=next) + { + next=item->next; item->delete_self(); + } DBUG_VOID_RETURN; } |