summaryrefslogtreecommitdiff
path: root/sql/table.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-08-13 23:49:10 +0400
committerAlexander Barkov <bar@mariadb.com>2019-08-13 23:49:10 +0400
commitc1599821a55ac4f59c5c799480a07913e1c26daa (patch)
tree0c064252ad3959fcd53b0f06a40b98d691fe070e /sql/table.h
parent624dd71b9419555eca8baadc695e3376de72286f (diff)
parentc4fd167d5a740f67ee5287a9b05b5383403b9ed0 (diff)
downloadmariadb-git-c1599821a55ac4f59c5c799480a07913e1c26daa.tar.gz
Merge remote-tracking branch 'origin/10.4' into 10.5
Diffstat (limited to 'sql/table.h')
-rw-r--r--sql/table.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/sql/table.h b/sql/table.h
index b256df25a80..2b866159fe0 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -59,6 +59,7 @@ class SEQUENCE;
class Range_rowid_filter_cost_info;
class derived_handler;
class Pushdown_derived;
+struct Name_resolution_context;
/*
Used to identify NESTED_JOIN structures within a join (applicable only to
@@ -2009,6 +2010,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;
/*
@@ -2770,9 +2772,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.