diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-07-26 22:42:35 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-07-26 22:42:35 +0200 |
commit | d97342b6f2cfdd55eb0f82b390ebc89c5997c382 (patch) | |
tree | 238dbb11c51a2352c99de198586b84f260b3aad9 /sql/table.h | |
parent | 00a254cc069e77f2088f6fbf8c367f247cfdd0dc (diff) | |
parent | 32c6f40a6319d493e5270c72ac5d27dc99d1b242 (diff) | |
download | mariadb-git-d97342b6f2cfdd55eb0f82b390ebc89c5997c382.tar.gz |
Merge branch '10.2' into 10.3
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sql/table.h b/sql/table.h index fa6cb707efb..17c4719a3fa 100644 --- a/sql/table.h +++ b/sql/table.h @@ -55,6 +55,7 @@ class Virtual_column_info; class Table_triggers_list; class TMP_TABLE_PARAM; class SEQUENCE; +struct Name_resolution_context; /* Used to identify NESTED_JOIN structures within a join (applicable only to @@ -2001,6 +2002,7 @@ struct TABLE_LIST LEX_CSTRING alias; const char *option; /* Used by cache index */ Item *on_expr; /* Used with outer join */ + Name_resolution_context *on_context; /* For ON expressions */ Item *sj_on_expr; /* @@ -2746,9 +2748,31 @@ public: }; +#define JOIN_OP_NEST 1 +#define REBALANCED_NEST 2 + typedef struct st_nested_join { List<TABLE_LIST> join_list; /* list of elements in the nested join */ + /* + Currently the valid values for nest type are: + JOIN_OP_NEST - for nest created for JOIN operation used as an operand in + a join expression, contains 2 elements; + JOIN_OP_NEST | REBALANCED_NEST - nest created after tree re-balancing + in st_select_lex::add_cross_joined_table(), contains 1 element; + 0 - for all other nests. + Examples: + 1. SELECT * FROM t1 JOIN t2 LEFT JOIN t3 ON t2.a=t3.a; + Here the nest created for LEFT JOIN at first has nest_type==JOIN_OP_NEST. + After re-balancing in st_select_lex::add_cross_joined_table() this nest + has nest_type==JOIN_OP_NEST | REBALANCED_NEST. The nest for JOIN created + in st_select_lex::add_cross_joined_table() has nest_type== JOIN_OP_NEST. + 2. SELECT * FROM t1 JOIN (t2 LEFT JOIN t3 ON t2.a=t3.a) + Here the nest created for LEFT JOIN has nest_type==0, because it's not + an operand in a join expression. The nest created for JOIN has nest_type + set to JOIN_OP_NEST. + */ + uint nest_type; /* Bitmap of tables within this nested join (including those embedded within its children), including tables removed by table elimination. |