diff options
author | unknown <sergefp@mysql.com> | 2004-12-13 20:06:06 +0300 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2004-12-13 20:06:06 +0300 |
commit | 6d7fe8520a938d92a6a7b0e569e8f56d926936ac (patch) | |
tree | 64511cf791534c9423364cdf49dc849d5c6dc032 /sql/item_func.cc | |
parent | 35217aeade288b054c95d4b5bd4dfb9674e2af08 (diff) | |
download | mariadb-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_func.cc')
-rw-r--r-- | sql/item_func.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 98b204d1809..af53a771720 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -349,7 +349,7 @@ void Item_func::split_sum_func(THD *thd, Item **ref_pointer_array, else if (item->used_tables() || item->type() == SUM_FUNC_ITEM) { uint el= fields.elements; - Item *new_item= new Item_ref(ref_pointer_array + el, 0, item->name); + Item *new_item= new Item_ref(ref_pointer_array + el, 0, item->name, item); new_item->collation.set(item->collation); fields.push_front(item); ref_pointer_array[el]= item; |