1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

MWL#90: Non-merged semi-joins

- Take into account that grouping or aggregates decrease join output cardinality.
  (First code, can't make use of index statistics yet)
This commit is contained in:
Sergey Petrunya
2011-05-09 10:35:55 +01:00
parent ea43df7685
commit 524e6aad73
5 changed files with 221 additions and 21 deletions

View File

@@ -6489,7 +6489,7 @@ JOIN_TAB *first_top_level_tab(JOIN *join, enum enum_with_const_tables with_const
JOIN_TAB *next_top_level_tab(JOIN *join, JOIN_TAB *tab)
{
tab= next_breadth_first_tab(join, tab);
if (tab->bush_root_tab)
if (tab && tab->bush_root_tab)
tab= NULL;
return tab;
}
@@ -9262,6 +9262,8 @@ void JOIN::cleanup(bool full)
SELECT * FROM t1,t2 WHERE t1.a=t2.a AND t1.b=t2.b ORDER BY t1.a,t2.c
SELECT * FROM t1,t2 WHERE t1.a=t2.a ORDER BY t2.b,t1.a
@endcode
TODO: this function checks ORDER::used, which can only have a value of 0.
*/
static bool