summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2004-12-13 20:06:06 +0300
committerunknown <sergefp@mysql.com>2004-12-13 20:06:06 +0300
commit6d7fe8520a938d92a6a7b0e569e8f56d926936ac (patch)
tree64511cf791534c9423364cdf49dc849d5c6dc032 /sql/item.cc
parent35217aeade288b054c95d4b5bd4dfb9674e2af08 (diff)
downloadmariadb-git-6d7fe8520a938d92a6a7b0e569e8f56d926936ac.tar.gz
Merging fix for BUG#6976 from 4.0 to 4.1
The problem in 4.1 was the same as in 4.0 - fix_fields() not called for created Item_ref. The fix is similar too - initialize Item_refs in ctor (but don't interfere with cases when Item_ref is used by subselects). sql/item.cc: Fix for BUG#6976 ported from 4.0 sql/item_cmpfunc.cc: Fix for BUG#6976 ported from 4.0 sql/item_func.cc: Fix for BUG#6976 ported from 4.0 sql/item_row.cc: Fix for BUG#6976 ported from 4.0 sql/item_strfunc.cc: Fix for BUG#6976 ported from 4.0
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 31c35e87cd4..85e200920f1 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1488,9 +1488,9 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
"forward reference in item list");
return -1;
}
-
Item_ref *rf= new Item_ref(last->ref_pointer_array + counter,
- (char *)table_name, (char *)field_name);
+ (char *)table_name, (char *)field_name,
+ this);
if (!rf)
return 1;
thd->change_item_tree(ref, rf);