mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Fixed LP bug #887479.
The function setup_semijoin_dups_elimination erroneously assumed that if join_cache_level is set to 3 or 4 then the type of the access to a table cannot be JT_REF or JT_EQ_REF. This could lead to wrong query result sets.
This commit is contained in:
@@ -3921,7 +3921,7 @@ int setup_semijoin_dups_elimination(JOIN *join, ulonglong options,
|
||||
if (j != join->const_tables && js_tab->use_quick != 2 &&
|
||||
j <= no_jbuf_after &&
|
||||
((js_tab->type == JT_ALL && join_cache_level != 0) ||
|
||||
(join_cache_level > 4 && (tab->type == JT_REF ||
|
||||
(join_cache_level > 2 && (tab->type == JT_REF ||
|
||||
tab->type == JT_EQ_REF))))
|
||||
{
|
||||
/* Looks like we'll be using join buffer */
|
||||
|
Reference in New Issue
Block a user