mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed LP bug #889750.
If the optimizer switch 'semijoin_with_cache' is set to 'off' then join cache cannot be used to join inner tables of a semijoin. Also fixed a bug in the function check_join_cache_usage() that led to wrong output of the EXPLAIN commands for some test cases.
This commit is contained in:
@ -9025,7 +9025,7 @@ uint check_join_cache_usage(JOIN_TAB *tab,
|
||||
if (tab->inside_loosescan_range)
|
||||
goto no_join_cache;
|
||||
|
||||
if (tab->is_inner_table_of_semi_join_with_first_match() &&
|
||||
if (tab->is_inner_table_of_semijoin() &&
|
||||
!join->allowed_semijoin_with_cache)
|
||||
goto no_join_cache;
|
||||
if (tab->is_inner_table_of_outer_join() &&
|
||||
@ -9172,7 +9172,10 @@ uint check_join_cache_usage(JOIN_TAB *tab,
|
||||
|
||||
no_join_cache:
|
||||
if (tab->type != JT_ALL && tab->is_ref_for_hash_join())
|
||||
{
|
||||
tab->type= JT_ALL;
|
||||
tab->ref.key_parts= 0;
|
||||
}
|
||||
revise_cache_usage(tab);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user