summaryrefslogtreecommitdiff
path: root/include/mysql/service_json.h
diff options
context:
space:
mode:
authorNayuta Yanagisawa <nayuta.yanagisawa@hey.com>2021-07-13 07:53:19 +0000
committerNayuta Yanagisawa <nayuta.yanagisawa@hey.com>2021-07-22 10:05:46 +0000
commitaafb88865796bf5d3aa8f131aba67adbec3694ce (patch)
treee82da6456508f14c699f7c1c2f6c6b626e0df729 /include/mysql/service_json.h
parent7ffa801cf2a7d0a4e55b84908dede6493c7ae73d (diff)
downloadmariadb-git-aafb88865796bf5d3aa8f131aba67adbec3694ce.tar.gz
MDEV-26013 distinct not work properly in some cases for spider tables
The bug is caused by the following reasons: * spider_group_by_handler::init_scan() generates a query for a data node. * The function adds DISTINCT if and only if spider_group_by_handler::query::distinct is TRUE. * spider_group_by_handler::query::distinct is set to the value of JOIN::select_distinct in JOIN::make_aggr_tables_info(). * In the test case, DISTINCT is not added because JOIN::select_distinct is FALSE at the call of JOIN::make_aggr_tables_info(). Why JOIN::select_distinct is set to FALSE? That is because the function JOIN::optimize_stage2() convert DISTINCT into GROUP BY and then optimizes away GROUP BY.
Diffstat (limited to 'include/mysql/service_json.h')
0 files changed, 0 insertions, 0 deletions