summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorigor@olga.mysql.com <>2007-01-26 17:10:45 -0800
committerigor@olga.mysql.com <>2007-01-26 17:10:45 -0800
commite897780919fff10981f123b3f4e1f754aa431518 (patch)
treec6913f1f16af767947932cddd38f22dc4edfaebb /sql/item.cc
parent1ad63bdfecc37c7d0990d39fe969f99cbc5af26d (diff)
downloadmariadb-git-e897780919fff10981f123b3f4e1f754aa431518.tar.gz
Fixed bug #24420.
Objects of the classes Item_func_is_not_null_test and Item_func_trig_cond must be transparent for the method Item::split_sum_func2 as these classes are pure helpers. It means that the method Item::split_sum_func2 should look at those objects as at pure wrappers.
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 0017b64ba0d..9a55eb25e2c 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1242,7 +1242,10 @@ void Item::split_sum_func2(THD *thd, Item **ref_pointer_array,
if (type() == SUM_FUNC_ITEM && skip_registered &&
((Item_sum *) this)->ref_by)
return;
- if (type() != SUM_FUNC_ITEM && with_sum_func)
+ if ((type() != SUM_FUNC_ITEM && with_sum_func) ||
+ (type() == FUNC_ITEM &&
+ (((Item_func *) this)->functype() == Item_func::ISNOTNULLTEST_FUNC ||
+ ((Item_func *) this)->functype() == Item_func::TRIG_COND_FUNC)))
{
/* Will split complicated items and ignore simple ones */
split_sum_func(thd, ref_pointer_array, fields);