Fixed bug#20825: rollup puts non-equal values together
Fix for bug 7894 replaces a field(s) in a non-aggregate function with a item reference if such a field was specified in the GROUP BY clause in order to get a correct result. When ROLLUP is involved this lead to a wrong result due to value of a such field is got through a copy function and copying happens after the function evaluation. Such replacement isn't needed if grouping is also done by such a function. The change_group_ref() function now isn't called for a function present in the group list. mysql-test/t/olap.test: Added the test case for the bug#20825: rollup puts non-equal values together mysql-test/r/olap.result: Added the test case for the bug#20825: rollup puts non-equal values together sql/sql_select.cc: Fixed bug#20825: rollup puts non-equal values together The change_group_ref() function now isn't called for a function present in the group list.
Showing
Please register or sign in to comment