summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 1e57f487f69..ee6a58ed97e 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -359,6 +359,19 @@ typedef struct st_join_table {
return (first_inner && first_inner->last_inner == this) ||
last_sj_inner_tab == this;
}
+ /*
+ Check whether the table belongs to a nest of inner tables of an
+ outer join or to a nest of inner tables of a semi-join
+ */
+ bool is_nested_inner()
+ {
+ if (first_inner &&
+ (first_inner != first_inner->last_inner || first_inner->first_upper))
+ return TRUE;
+ if (first_sj_inner_tab && first_sj_inner_tab != last_sj_inner_tab)
+ return TRUE;
+ return FALSE;
+ }
struct st_join_table *get_first_inner_table()
{
if (first_inner)