diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/item.cc b/sql/item.cc index 1dd4fc2909f..132cfa2846a 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -885,20 +885,20 @@ Item_ident::Item_ident(THD *thd, Item_ident *item) void Item_ident::cleanup() { DBUG_ENTER("Item_ident::cleanup"); -#ifdef CANT_BE_USED_AS_MEMORY_IS_FREED - db_name ? db_name : "(null)", - orig_db_name ? orig_db_name : "(null)", - table_name ? table_name : "(null)", - orig_table_name ? orig_table_name : "(null)", - field_name ? field_name : "(null)", - orig_field_name ? orig_field_name : "(null)")); -#endif + bool was_fixed= fixed; Item::cleanup(); db_name= orig_db_name; table_name= orig_table_name; field_name= orig_field_name; /* Store if this Item was depended */ - can_be_depended= MY_TEST(depended_from); + if (was_fixed) + { + /* + We can trust that depended_from set correctly only if this item + was fixed + */ + can_be_depended= MY_TEST(depended_from); + } DBUG_VOID_RETURN; } |