summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorigor@rurik.mysql.com <>2004-08-12 00:02:29 -0700
committerigor@rurik.mysql.com <>2004-08-12 00:02:29 -0700
commitf2b9c5f491dfc373112e01f18dd7ce2b7bae3003 (patch)
treeec0b9895a13bfd75cd3675d8e53a52bb082390ea /sql/sql_select.cc
parent39614a3ab3f37247979cbcbe6c489c097290e8ba (diff)
downloadmariadb-git-f2b9c5f491dfc373112e01f18dd7ce2b7bae3003.tar.gz
olap.test, olap.result:
Added test case for bug #4767. item_sum.cc: Added a correct setting of the maybe_null flag for a copy of an Item_sum object where the argument was a field of an inner table in an outer join read from a temporary table. It's part of the fix for bug #4767. sql_select.cc: Made change_refs_to_tmp_fields work correctly for test case of bug #4767 where Item_sum::get_tmp_table_item failed to build a correct copy of an Item_sum object referring to a field in a temporary table. It looks like a hack yet.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index f8bc6210a2f..87b869df658 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -4995,6 +4995,8 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
blob_count++;
}
((Item_sum*) item)->args[i]= new Item_field(new_field);
+ if (((Item_sum*) item)->arg_count == 1)
+ ((Item_sum*) item)->result_field= new_field;
}
}
}