mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Fixed LP bug #664508.
When join buffers are employed no index scan for the first table with grouping columns can be used. mysql-test/r/join_cache.result: Added a test case for bug #664508. Sorted results for some other test cases. mysql-test/t/join_cache.test: Added a test case for bug #664508. Sorted results for some other test cases.
This commit is contained in:
@@ -7980,8 +7980,11 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
|
||||
JOIN_TAB *tab=join->join_tab+i;
|
||||
if (tab->use_join_cache)
|
||||
{
|
||||
JOIN_TAB *sort_by_tab= join->get_sort_by_join_tab();
|
||||
if (sort_by_tab && !join->need_tmp)
|
||||
JOIN_TAB *sort_by_tab= join->group && join->simple_group &&
|
||||
join->group_list ?
|
||||
join->join_tab+join->const_tables :
|
||||
join->get_sort_by_join_tab();
|
||||
if (sort_by_tab)
|
||||
{
|
||||
join->need_tmp= 1;
|
||||
join->simple_order= join->simple_group= 0;
|
||||
|
||||
Reference in New Issue
Block a user