summaryrefslogtreecommitdiff
path: root/sql/opt_subselect.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2011-11-12 20:50:11 +0200
committerSergey Petrunya <psergey@askmonty.org>2011-11-12 20:50:11 +0200
commit7f746fbe74e08d79217bdf7c7cba628e3b6bef85 (patch)
tree22d81f8ab235b54ce29fb53e24a5bd7f923e0f45 /sql/opt_subselect.cc
parentb91a6bd88b7ae0db674b60e9b0415f3656b7471d (diff)
downloadmariadb-git-7f746fbe74e08d79217bdf7c7cba628e3b6bef85.tar.gz
BUG#887468: Second assertion `keypart_map' failed in maria_rkey with semijoin
- in advance_sj_state: Do not try to construct LooseScan strategy if we're already behind the last LooseScan table.
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r--sql/opt_subselect.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index aa0a8152bbb..fdda502e706 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -2339,7 +2339,8 @@ void advance_sj_state(JOIN *join, table_map remaining_tables,
}
if ((pos->first_loosescan_table != MAX_TABLES) &&
- !(remaining_tables & pos->loosescan_need_tables))
+ !(remaining_tables & pos->loosescan_need_tables) &&
+ (pos->table->table->map & pos->loosescan_need_tables))
{
/*
Ok we have LooseScan plan and also have all LooseScan sj-nest's