summaryrefslogtreecommitdiff
path: root/sql/table.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/table.h')
-rw-r--r--sql/table.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/table.h b/sql/table.h
index c9095ad48f6..d7c14e1938a 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -602,6 +602,8 @@ typedef struct st_table_list
st_table_list *first_leaf_for_name_resolution();
st_table_list *last_leaf_for_name_resolution();
bool is_leaf_for_name_resolution();
+ inline st_table_list *top_table()
+ { return belong_to_view ? belong_to_view : this; }
inline bool prepare_check_option(THD *thd)
{
bool res= FALSE;