diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2011-09-26 13:56:09 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2011-09-26 13:56:09 +0400 |
commit | 4908d27b57ee00dba3694e300a858b0fcdb224ee (patch) | |
tree | 893ad6d892fc772b47b41fe5f1b6991eff15c939 /sql | |
parent | 9ea133fb3be4c46741e059ab78118f75afe791a1 (diff) | |
download | mariadb-git-4908d27b57ee00dba3694e300a858b0fcdb224ee.tar.gz |
BUG#858732: Wrong result with semijoin + loosescan + comma join
- Fix wrong loop bounds in setup_semijoin_dups_elimination()
Diffstat (limited to 'sql')
-rw-r--r-- | sql/opt_subselect.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index beeb0ac878e..7ac09eaa434 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -3834,7 +3834,7 @@ int setup_semijoin_dups_elimination(JOIN *join, ulonglong options, { /* We jump from the last table to the first one */ tab->loosescan_match_tab= tab + pos->n_sj_tables - 1; - for (uint j= i; j < pos->n_sj_tables; j++) + for (uint j= i; j < i + pos->n_sj_tables; j++) join->join_tab[j].inside_loosescan_range= TRUE; /* Calculate key length */ |