summaryrefslogtreecommitdiff
path: root/sql/table.h
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2010-01-17 17:51:10 +0300
committerSergey Petrunya <psergey@askmonty.org>2010-01-17 17:51:10 +0300
commitb83cb52e9e78a0d07c05f6515aa7811deabe434c (patch)
treeaa289e64cb57964bd08fc79d326136cb801e1da7 /sql/table.h
parent1a490f2da492f2e5698b244341696c6dd9d8db4c (diff)
downloadmariadb-git-b83cb52e9e78a0d07c05f6515aa7811deabe434c.tar.gz
Backport of subquery optimizations to 5.3.
There are still test failures because of: - Wrong query results in outer join + semi join - EXPLAIN output differences
Diffstat (limited to 'sql/table.h')
-rw-r--r--sql/table.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/sql/table.h b/sql/table.h
index ffd3ba05fc9..3fd0a0341b4 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -1060,6 +1060,11 @@ public:
};
+class SJ_MATERIALIZATION_INFO;
+class Index_hint;
+class Item_in_subselect;
+
+
/*
Table reference in the FROM clause.
@@ -1122,6 +1127,20 @@ struct TABLE_LIST
char *db, *alias, *table_name, *schema_table_name;
char *option; /* Used by cache index */
Item *on_expr; /* Used with outer join */
+
+ Item *sj_on_expr;
+ /*
+ (Valid only for semi-join nests) Bitmap of tables that are within the
+ semi-join (this is different from bitmap of all nest's children because
+ tables that were pulled out of the semi-join nest remain listed as
+ nest's children).
+ */
+ table_map sj_inner_tables;
+ /* Number of IN-compared expressions */
+ uint sj_in_exprs;
+ Item_in_subselect *sj_subq_pred;
+ SJ_MATERIALIZATION_INFO *sj_mat_info;
+
/*
The structure of ON expression presented in the member above
can be changed during certain optimizations. This member
@@ -1658,6 +1677,14 @@ typedef struct st_nested_join
*/
uint n_tables;
nested_join_map nj_map; /* Bit used to identify this nested join*/
+ /*
+ (Valid only for semi-join nests) Bitmap of tables outside the semi-join
+ that are used within the semi-join's ON condition.
+ */
+ table_map sj_depends_on;
+ /* Outer non-trivially correlated tables */
+ table_map sj_corr_tables;
+ List<Item> sj_outer_expr_list;
} NESTED_JOIN;