mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 00:54:30 +02:00
BUG#869001: Wrong result with semijoin + materialization + firstmatch + multipart key
- Make advance_sj_state() not to attempt building duplicate removal strategies when we're doing optimization of an SJM-nest.
This commit is contained in:
parent
74497ff265
commit
2160a25adc
5 changed files with 121 additions and 0 deletions
|
|
@ -2179,6 +2179,17 @@ void advance_sj_state(JOIN *join, table_map remaining_tables,
|
|||
pos->sj_strategy= SJ_OPT_NONE;
|
||||
|
||||
pos->prefix_dups_producing_tables= join->cur_dups_producing_tables;
|
||||
|
||||
/* We're performing optimization inside SJ-Materialization nest */
|
||||
if (join->emb_sjm_nest)
|
||||
{
|
||||
pos->invalidate_firstmatch_prefix();
|
||||
pos->first_loosescan_table= MAX_TABLES;
|
||||
pos->dupsweedout_tables= 0;
|
||||
pos->sjm_scan_need_tables= 0;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialize the state or copy it from prev. tables */
|
||||
if (idx == join->const_tables)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue