summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2012-01-25 22:05:20 +0400
committerSergey Petrunya <psergey@askmonty.org>2012-01-25 22:05:20 +0400
commit424f56b3bae1e45c2956bfcd8d92f43569471415 (patch)
treed77529df6eedb547a99358e41ade6efb2ca3fc55 /sql/sql_select.h
parent364c07934cca9cdb0cc5fab9213e68b9d9964878 (diff)
downloadmariadb-git-424f56b3bae1e45c2956bfcd8d92f43569471415.tar.gz
BUG#920713: Wrong result (missing rows) with firstmatch+BNL, IN subquery, ...
- Disable use of join cache when we're using FirstMatch strategy, and the join order is such that subquery's inner tables are interleaved with outer. Join buffering code is incapable of handling such join orders. - The testcase requires use of @@debug_optimizer_prefer_join_prefix to hit the bug, but I'm pushing it anyway (including the mention of the variable in .test file), so that it can be found and enabled when/if we get something comparable in the main tree.
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 185bf90ea17..002c5a2df5a 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -995,6 +995,13 @@ public:
/* We also maintain a stack of join optimization states in * join->positions[] */
/******* Join optimization state members end *******/
+
+ /*
+ Tables within complex firstmatch ranges (i.e. those where inner tables are
+ interleaved with outer tables). Join buffering cannot be used for these.
+ */
+ table_map complex_firstmatch_tables;
+
/*
The cost of best complete join plan found so far during optimization,
after optimization phase - cost of picked join order (not taking into