diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-12-18 16:30:26 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2023-01-02 00:04:03 +0100 |
commit | 21223c0461455b4175bae91aee7e3525a51c6d70 (patch) | |
tree | fa0d2d2b6ddf4befe1b3081528bfe92d47b167ef | |
parent | 908c48a34dd94350c87c89a32937bf32399c3ab4 (diff) | |
download | mariadb-git-21223c0461455b4175bae91aee7e3525a51c6d70.tar.gz |
MDEV-29988 group by fix
-rw-r--r-- | mysql-test/main/func_group.result | 11 | ||||
-rw-r--r-- | mysql-test/main/func_group.test | 12 | ||||
-rw-r--r-- | sql/item.h | 5 |
3 files changed, 23 insertions, 5 deletions
diff --git a/mysql-test/main/func_group.result b/mysql-test/main/func_group.result index 0f80d14b603..6617d21a197 100644 --- a/mysql-test/main/func_group.result +++ b/mysql-test/main/func_group.result @@ -1,4 +1,3 @@ -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 # diff --git a/mysql-test/main/func_group.test b/mysql-test/main/func_group.test index 6b3a15fd45e..5693940dda6 100644 --- a/mysql-test/main/func_group.test +++ b/mysql-test/main/func_group.test @@ -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'; @@ -1801,5 +1797,13 @@ 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 # diff --git a/sql/item.h b/sql/item.h index e0bcaf41eac..35428b30252 100644 --- a/sql/item.h +++ b/sql/item.h @@ -6976,6 +6976,11 @@ public: 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) |