20
20
#ifndef DRIZZLED_NESTED_JOIN_H
21
21
#define DRIZZLED_NESTED_JOIN_H
23
#include <drizzled/sql_list.h>
24
#include <drizzled/sql_bitmap.h>
25
#include <drizzled/item.h>
26
#include <drizzled/table_list.h>
23
28
struct nested_join_st
25
List<TableList> join_list; /* list of elements in the nested join */
26
table_map used_tables; /* bitmap of tables in the nested join */
27
table_map not_null_tables; /* tables that rejects nulls */
28
struct st_join_table *first_nested;/* the first nested table in the plan */
30
/* list of elements in the nested join */
31
List<TableList> join_list;
33
/* bitmap of tables in the nested join */
34
table_map used_tables;
36
/* tables that rejects nulls */
37
table_map not_null_tables;
39
/* the first nested table in the plan */
40
struct st_join_table *first_nested;
30
43
Used to count tables in the nested join in 2 isolated places:
31
1. In make_outerjoin_info().
44
1. In make_outerjoin_info().
32
45
2. check_interleaving_with_nj/restore_prev_nj_state (these are called
33
by the join optimizer.
46
by the join optimizer.
34
47
Before each use the counters are zeroed by reset_nj_counters.
37
nested_join_map nj_map; /* Bit used to identify this nested join*/
51
/* Bit used to identify this nested join*/
52
nested_join_map nj_map;
39
55
(Valid only for semi-join nests) Bitmap of tables outside the semi-join
40
56
that are used within the semi-join's ON condition.
42
table_map sj_depends_on;
58
table_map sj_depends_on;
43
59
/* Outer non-trivially correlated tables */
44
table_map sj_corr_tables;
45
List<Item> sj_outer_expr_list;
60
table_map sj_corr_tables;
62
List<Item> sj_outer_expr_list;
48
65
#endif /* DRIZZLED_NESTED_JOIN_H */