1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00
Files
mariadb/sql
Evgeny Potemkin b5f40f3454 Bug#50539: Wrong result when loose index scan is used for an aggregate
function with distinct.
Loose index scan is used to find MIN/MAX values using appropriate index and
thus allow to avoid grouping. For each found row it updates non-aggregated
fields with values from row with found MIN/MAX value.
Without loose index scan non-aggregated fields are copied by end_send_group
function. With loose index scan there is no need in end_send_group and
end_send is used instead. Non-aggregated fields still need to be copied and
this was wrongly implemented in QUICK_GROUP_MIN_MAX_SELECT::get_next.
WL#3220 added a case when loose index scan can be used with end_send_group to
optimize calculation of aggregate functions with distinct. In this case
the row found by QUICK_GROUP_MIN_MAX_SELECT::get_next might belong to a next
group and copying it will produce wrong result.

Update of non-aggregated fields is moved to the end_send function from
QUICK_GROUP_MIN_MAX_SELECT::get_next.
2010-02-12 11:51:52 +03:00
..
2009-09-29 17:38:40 +02:00
2010-02-03 17:01:48 +03:00
2010-01-30 22:13:36 +03:00
2009-11-06 12:37:00 +03:00
2009-10-14 20:37:38 +04:00
2009-10-14 20:37:38 +04:00
2010-01-13 12:28:42 +02:00
2010-01-13 12:28:42 +02:00
2009-12-11 12:39:38 +03:00
2009-12-11 12:39:38 +03:00
2009-12-19 11:33:33 +03:00
2009-10-14 20:37:38 +04:00
2010-01-30 21:47:11 +03:00
2009-11-05 15:08:37 +03:00
2009-09-10 03:18:29 -06:00
2010-02-03 19:28:40 +03:00
2009-11-02 14:10:04 +03:00
2008-11-22 01:10:38 +01:00
2009-09-28 10:21:25 +03:00
2009-10-28 18:32:48 +01:00
2009-06-01 16:00:38 +04:00
2009-10-28 10:55:44 +03:00
2009-10-28 10:55:44 +03:00
2009-11-06 19:13:33 +03:00
2009-10-14 20:37:38 +04:00
2010-01-31 03:14:29 +08:00
2009-09-26 12:49:49 +08:00
2010-01-28 19:51:40 -02:00
2009-10-14 15:14:58 +04:00
2010-01-28 19:51:40 -02:00
2009-12-11 12:39:38 +03:00
2009-10-14 20:37:38 +04:00
2009-12-11 12:39:38 +03:00
2008-07-03 23:41:22 +04:00
2009-09-10 03:18:29 -06:00
2009-12-18 16:44:24 -02:00
2009-12-11 12:39:38 +03:00
2009-09-10 03:18:29 -06:00
2010-01-30 21:47:11 +03:00
2009-08-28 18:21:54 +02:00
2009-06-17 16:56:44 +02:00
2009-12-11 12:39:38 +03:00
2009-06-17 16:56:44 +02:00
2009-12-11 12:39:38 +03:00
2009-12-11 12:39:38 +03:00
2009-12-11 12:39:38 +03:00
2010-01-30 22:13:36 +03:00
2009-09-10 03:18:29 -06:00
2009-10-23 15:22:21 +04:00
2009-11-03 12:37:02 +01:00
2010-02-03 17:01:48 +03:00
2009-10-22 23:31:06 +04:00
2010-02-05 15:02:03 +03:00
2009-11-02 21:05:42 +01:00
2010-01-24 15:03:23 +08:00
2010-02-05 15:02:03 +03:00
2009-09-10 03:18:29 -06:00
2009-09-10 03:18:29 -06:00
2009-10-28 10:55:44 +03:00
2009-11-03 20:45:52 +03:00
2009-12-11 12:39:38 +03:00
2009-09-10 03:18:29 -06:00
2009-11-06 17:20:27 +03:00
2009-10-14 20:37:38 +04:00
2009-06-17 16:56:44 +02:00