1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed LP bug #899509.

The optimizer must ignore any possible hash join key when looking for the 
query execution plan with join_cache_level set to 0.
This commit is contained in:
Igor Babaev
2011-12-06 02:46:42 -08:00
parent 62e4c73ebb
commit b4c9fa321d
6 changed files with 75 additions and 6 deletions

View File

@ -5381,7 +5381,9 @@ best_access_path(JOIN *join,
(1) s is inner table of semi-join -> join cache is allowed for semijoins
(2) s is inner table of outer join -> join cache is allowed for outer joins
*/
if (idx > join->const_tables && best_key == 0 &&
if (idx > join->const_tables && best_key == 0 &&
(join->allowed_join_cache_types & JOIN_CACHE_HASHED_BIT) &&
join->max_allowed_join_cache_level > 2 &&
!bitmap_is_clear_all(eq_join_set) && !disable_jbuf &&
(!s->emb_sj_nest ||
join->allowed_semijoin_with_cache) && // (1)