Commit 21223c04 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-29988 group by fix

parent 908c48a3
drop table if exists t1,t2,t3,t4,t5,t6;
set @sav_dpi= @@div_precision_increment;
set div_precision_increment= 5;
show variables like 'div_precision_increment';
......@@ -2566,5 +2565,15 @@ stddev_samp(i) stddev_pop(i) stddev(i) std(i)
drop view v1;
drop table t1;
#
# MDEV-29988: Major performance regression with 10.6.11
#
create table t1 (a varchar(10) charset utf8mb4, b int, c int);
insert t1 values (1,2,3),(4,5,6),(1,7,8);
select concat(a,":",group_concat(b)) from t1 group by a;
concat(a,":",group_concat(b))
1:2,7
4:5
drop table t1;
#
# End of 10.3 tests
#
......@@ -2,10 +2,6 @@
# simple test of all group functions
#
--disable_warnings
drop table if exists t1,t2,t3,t4,t5,t6;
--enable_warnings
set @sav_dpi= @@div_precision_increment;
set div_precision_increment= 5;
show variables like 'div_precision_increment';
......@@ -1800,6 +1796,14 @@ select * from v1;
drop view v1;
drop table t1;
--echo #
--echo # MDEV-29988: Major performance regression with 10.6.11
--echo #
create table t1 (a varchar(10) charset utf8mb4, b int, c int);
insert t1 values (1,2,3),(4,5,6),(1,7,8);
select concat(a,":",group_concat(b)) from t1 group by a;
drop table t1;
--echo #
--echo # End of 10.3 tests
--echo #
......@@ -6976,6 +6976,11 @@ class Item_direct_ref_to_item : public Item_direct_ref
bool is_expensive() { return m_item->is_expensive(); }
Item* build_clone(THD *thd) { return get_copy(thd); }
void split_sum_func(THD *thd, Ref_ptr_array ref_pointer_array,
List<Item> &fields, uint flags)
{
m_item->split_sum_func(thd, ref_pointer_array, fields, flags);
}
/*
This processor states that this is safe for virtual columns
(because this Item transparency)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment