Hello,
Jorgen Loland a écrit, Le 19.11.2010 13:19:
> #At file:///export/home/jl208045/mysql/mysql-next-mr-opt-backporting-54641-2/ based
> on revid:tor.didriksen@stripped
>
> 3287 Jorgen Loland 2010-11-19
> Bug#54641: semijoin loosescan gives duplicate rows
>
> The loosescan semijoin strategy does not handle join buffering
> on any of the tables in the loosescan range. Prior to this bug
> fix, check_join_cache_usage() would not do join buffering on a
> join table if the loosescan_match_tab pointer was set for it.
>
> However, loosescan_match_tab is a pointer from the first to the
> last join table handled by the loosescan strategy. Join
> buffering could therefore be used on all join tables except
> the first in the loosescan range.
>
> The fix is to skip join buffering if the join table is in
> the loosescan range, i.e., if
> join_tab->get_sj_strategy() == SJ_OPT_LOOSE_SCAN,
> instead of checking loosescan_match_tab.
The limitation is written in clear text in the WL which implemented
semijoin loosescan (WL#3751):
"2.3.2 SJ-nest range, FirstMatch part
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We can reuse the results of WL#3741:
* none of the tables must use join buffering"
so there is probably nothing better to do in the scope of a bugfix, than
properly enforcing the limitation. Ok to push.