summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <igor@olga.mysql.com>2007-01-26 17:10:45 -0800
committerunknown <igor@olga.mysql.com>2007-01-26 17:10:45 -0800
commit1495924319c1b6fab0261a7206e872f43f0c4857 (patch)
treec6913f1f16af767947932cddd38f22dc4edfaebb /sql
parent4f118f1d76948b7f84f4497297d6f3b1f91b8fd2 (diff)
downloadmariadb-git-1495924319c1b6fab0261a7206e872f43f0c4857.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. mysql-test/r/subselect3.result: Added a test case for bug #24420. mysql-test/t/subselect3.test: Added a test case for bug #24420.
Diffstat (limited to 'sql')
-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);