From 3f07afbea005900c185a769ea23381f1bba0ef23 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 6 Nov 2004 09:37:30 +0400 Subject: A fix (bug #6441: Aggregate UDF in multi-table query crashes MySQL when returning multiple rows). sql/item_func.cc: A fix (bug #6441: Aggregate UDF in multi-table query crashes MySQL when returning multiple rows). Do nothing in the udf_handler destructor if not_original flag is set. sql/item_sum.h: A fix (bug #6441: Aggregate UDF in multi-table query crashes MySQL when returning multiple rows). Set udf.not_original flag if we create an Item from the existent one. sql/sql_udf.h: A fix (bug #6441: Aggregate UDF in multi-table query crashes MySQL when returning multiple rows). not_original flag added. --- sql/item_sum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/item_sum.h') diff --git a/sql/item_sum.h b/sql/item_sum.h index 5aa0d37190b..74c28765f8d 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -532,7 +532,7 @@ public: :Item_sum( list ), udf(udf_arg) { quick_group=0;} Item_udf_sum(THD *thd, Item_udf_sum *item) - :Item_sum(thd, item), udf(item->udf) {} + :Item_sum(thd, item), udf(item->udf) { udf.not_original= TRUE; } const char *func_name() const { return udf.name(); } bool fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) { -- cgit v1.2.1