summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/item.cc2
-rw-r--r--sql/item.h2
-rw-r--r--sql/mysql_priv.h6
-rw-r--r--sql/sql_base.cc2
-rw-r--r--sql/sql_lex.cc2
-rw-r--r--sql/sql_lex.h2
-rw-r--r--sql/sql_select.cc4
-rw-r--r--sql/sql_show.cc14
-rw-r--r--sql/sql_udf.h1
-rw-r--r--sql/table.cc92
-rw-r--r--sql/table.h60
11 files changed, 93 insertions, 94 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 52389eece10..2fc58eebe75 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -5807,7 +5807,7 @@ bool Item_insert_value::fix_fields(THD *thd, Item **items)
if (!arg->fixed)
{
bool res;
- st_table_list *orig_next_table= context->last_name_resolution_table;
+ TABLE_LIST *orig_next_table= context->last_name_resolution_table;
context->last_name_resolution_table= context->first_name_resolution_table;
res= arg->fix_fields(thd, &arg);
context->last_name_resolution_table= orig_next_table;
diff --git a/sql/item.h b/sql/item.h
index fdb85b131c1..58e3ec439b4 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -19,7 +19,7 @@
#endif
class Protocol;
-struct st_table_list;
+struct TABLE_LIST;
void item_init(void); /* Init item functions */
class Item_field;
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 0aaa1744fe1..bbcf2ed8adf 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -455,9 +455,9 @@ void debug_sync_point(const char* lock_name, uint lock_timeout);
#define SHOW_LOG_STATUS_FREE "FREE"
#define SHOW_LOG_STATUS_INUSE "IN USE"
-struct st_table_list;
+struct TABLE_LIST;
class String;
-void view_store_options(THD *thd, st_table_list *table, String *buff);
+void view_store_options(THD *thd, TABLE_LIST *table, String *buff);
/* Options to add_table_to_list() */
#define TL_OPTION_UPDATING 1
@@ -1104,7 +1104,7 @@ bool close_thread_table(THD *thd, TABLE **table_ptr);
void close_temporary_tables(THD *thd);
void close_tables_for_reopen(THD *thd, TABLE_LIST **tables);
TABLE_LIST *find_table_in_list(TABLE_LIST *table,
- st_table_list *TABLE_LIST::*link,
+ TABLE_LIST *TABLE_LIST::*link,
const char *db_name,
const char *table_name);
TABLE_LIST *unique_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list,
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index ed006714143..bf1c6d7cb0d 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -848,7 +848,7 @@ void close_temporary_tables(THD *thd)
*/
TABLE_LIST *find_table_in_list(TABLE_LIST *table,
- st_table_list *TABLE_LIST::*link,
+ TABLE_LIST *TABLE_LIST::*link,
const char *db_name,
const char *table_name)
{
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index cbfba3d4d80..4084c67098e 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -1965,7 +1965,7 @@ bool st_lex::need_correct_ident()
VIEW_CHECK_CASCADED CHECK OPTION CASCADED
*/
-uint8 st_lex::get_effective_with_check(st_table_list *view)
+uint8 st_lex::get_effective_with_check(TABLE_LIST *view)
{
if (view->select_lex->master_unit() == &unit &&
which_check_option_applicable())
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index f8405ef14ca..fbbb620fbd6 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -1198,7 +1198,7 @@ typedef struct st_lex : public Query_tables_list
bool can_not_use_merged();
bool only_view_structure();
bool need_correct_ident();
- uint8 get_effective_with_check(st_table_list *view);
+ uint8 get_effective_with_check(TABLE_LIST *view);
/*
Is this update command where 'WHITH CHECK OPTION' clause is important
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 9d27ab4bb4e..6e0640d2cd4 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -15395,11 +15395,11 @@ static void print_join(THD *thd, String *str, List<TABLE_LIST> *tables)
Print table as it should be in join list
SYNOPSIS
- st_table_list::print();
+ TABLE_LIST::print();
str string where table should bbe printed
*/
-void st_table_list::print(THD *thd, String *str)
+void TABLE_LIST::print(THD *thd, String *str)
{
if (nested_join)
{
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 902b298e423..dd2c95842dc 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -2429,7 +2429,7 @@ int fill_schema_shemata(THD *thd, TABLE_LIST *tables, COND *cond)
}
-static int get_schema_tables_record(THD *thd, struct st_table_list *tables,
+static int get_schema_tables_record(THD *thd, TABLE_LIST *tables,
TABLE *table, bool res,
const char *base_name,
const char *file_name)
@@ -2619,7 +2619,7 @@ static int get_schema_tables_record(THD *thd, struct st_table_list *tables,
}
-static int get_schema_column_record(THD *thd, struct st_table_list *tables,
+static int get_schema_column_record(THD *thd, TABLE_LIST *tables,
TABLE *table, bool res,
const char *base_name,
const char *file_name)
@@ -3061,7 +3061,7 @@ err:
}
-static int get_schema_stat_record(THD *thd, struct st_table_list *tables,
+static int get_schema_stat_record(THD *thd, TABLE_LIST *tables,
TABLE *table, bool res,
const char *base_name,
const char *file_name)
@@ -3151,7 +3151,7 @@ static int get_schema_stat_record(THD *thd, struct st_table_list *tables,
}
-static int get_schema_views_record(THD *thd, struct st_table_list *tables,
+static int get_schema_views_record(THD *thd, TABLE_LIST *tables,
TABLE *table, bool res,
const char *base_name,
const char *file_name)
@@ -3263,7 +3263,7 @@ bool store_constraints(THD *thd, TABLE *table, const char *db,
}
-static int get_schema_constraints_record(THD *thd, struct st_table_list *tables,
+static int get_schema_constraints_record(THD *thd, TABLE_LIST *tables,
TABLE *table, bool res,
const char *base_name,
const char *file_name)
@@ -3359,7 +3359,7 @@ static bool store_trigger(THD *thd, TABLE *table, const char *db,
}
-static int get_schema_triggers_record(THD *thd, struct st_table_list *tables,
+static int get_schema_triggers_record(THD *thd, TABLE_LIST *tables,
TABLE *table, bool res,
const char *base_name,
const char *file_name)
@@ -3426,7 +3426,7 @@ void store_key_column_usage(TABLE *table, const char*db, const char *tname,
static int get_schema_key_column_usage_record(THD *thd,
- struct st_table_list *tables,
+ TABLE_LIST *tables,
TABLE *table, bool res,
const char *base_name,
const char *file_name)
diff --git a/sql/sql_udf.h b/sql/sql_udf.h
index 3cd9343610c..4b8b492698e 100644
--- a/sql/sql_udf.h
+++ b/sql/sql_udf.h
@@ -47,7 +47,6 @@ typedef struct st_udf_func
} udf_func;
class Item_result_field;
-struct st_table_list;
class udf_handler :public Sql_alloc
{
diff --git a/sql/table.cc b/sql/table.cc
index 4e0f2b5d287..899d0ab2ed0 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1780,11 +1780,11 @@ void st_table::reset_item_list(List<Item> *item_list) const
calculate md5 of query
SYNOPSIS
- st_table_list::calc_md5()
+ TABLE_LIST::calc_md5()
buffer buffer for md5 writing
*/
-void st_table_list::calc_md5(char *buffer)
+void TABLE_LIST::calc_md5(char *buffer)
{
my_MD5_CTX context;
uchar digest[16];
@@ -1809,10 +1809,10 @@ void st_table_list::calc_md5(char *buffer)
it (it is a kind of optimisation)
SYNOPSIS
- st_table_list::set_underlying_merge()
+ TABLE_LIST::set_underlying_merge()
*/
-void st_table_list::set_underlying_merge()
+void TABLE_LIST::set_underlying_merge()
{
TABLE_LIST *tbl;
@@ -1847,7 +1847,7 @@ void st_table_list::set_underlying_merge()
setup fields of placeholder of merged VIEW
SYNOPSIS
- st_table_list::setup_underlying()
+ TABLE_LIST::setup_underlying()
thd - thread handler
DESCRIPTION
@@ -1860,9 +1860,9 @@ void st_table_list::set_underlying_merge()
TRUE - error
*/
-bool st_table_list::setup_underlying(THD *thd)
+bool TABLE_LIST::setup_underlying(THD *thd)
{
- DBUG_ENTER("st_table_list::setup_underlying");
+ DBUG_ENTER("TABLE_LIST::setup_underlying");
if (!field_translation && merge_underlying_list)
{
@@ -1925,7 +1925,7 @@ bool st_table_list::setup_underlying(THD *thd)
Prepare where expression of view
SYNOPSIS
- st_table_list::prep_where()
+ TABLE_LIST::prep_where()
thd - thread handler
conds - condition of this JOIN
no_where_clause - do not build WHERE or ON outer qwery do not need it
@@ -1939,10 +1939,10 @@ bool st_table_list::setup_underlying(THD *thd)
TRUE - error
*/
-bool st_table_list::prep_where(THD *thd, Item **conds,
+bool TABLE_LIST::prep_where(THD *thd, Item **conds,
bool no_where_clause)
{
- DBUG_ENTER("st_table_list::prep_where");
+ DBUG_ENTER("TABLE_LIST::prep_where");
for (TABLE_LIST *tbl= merge_underlying_list; tbl; tbl= tbl->next_local)
{
@@ -2042,7 +2042,7 @@ merge_on_conds(THD *thd, TABLE_LIST *table, bool is_cascaded)
Prepare check option expression of table
SYNOPSIS
- st_table_list::prep_check_option()
+ TABLE_LIST::prep_check_option()
thd - thread handler
check_opt_type - WITH CHECK OPTION type (VIEW_CHECK_NONE,
VIEW_CHECK_LOCAL, VIEW_CHECK_CASCADED)
@@ -2057,16 +2057,16 @@ merge_on_conds(THD *thd, TABLE_LIST *table, bool is_cascaded)
This method builds check option condition to use it later on
every call (usual execution or every SP/PS call).
This method have to be called after WHERE preparation
- (st_table_list::prep_where)
+ (TABLE_LIST::prep_where)
RETURN
FALSE - OK
TRUE - error
*/
-bool st_table_list::prep_check_option(THD *thd, uint8 check_opt_type)
+bool TABLE_LIST::prep_check_option(THD *thd, uint8 check_opt_type)
{
- DBUG_ENTER("st_table_list::prep_check_option");
+ DBUG_ENTER("TABLE_LIST::prep_check_option");
bool is_cascaded= check_opt_type == VIEW_CHECK_CASCADED;
for (TABLE_LIST *tbl= merge_underlying_list; tbl; tbl= tbl->next_local)
@@ -2125,12 +2125,12 @@ bool st_table_list::prep_check_option(THD *thd, uint8 check_opt_type)
Hide errors which show view underlying table information
SYNOPSIS
- st_table_list::hide_view_error()
+ TABLE_LIST::hide_view_error()
thd thread handler
*/
-void st_table_list::hide_view_error(THD *thd)
+void TABLE_LIST::hide_view_error(THD *thd)
{
/* Hide "Unknown column" or "Unknown function" error */
if (thd->net.last_errno == ER_BAD_FIELD_ERROR ||
@@ -2161,7 +2161,7 @@ void st_table_list::hide_view_error(THD *thd)
table_to_find (TABLE)
SYNOPSIS
- st_table_list::find_underlying_table()
+ TABLE_LIST::find_underlying_table()
table_to_find table to find
RETURN
@@ -2169,7 +2169,7 @@ void st_table_list::hide_view_error(THD *thd)
found table reference
*/
-st_table_list *st_table_list::find_underlying_table(TABLE *table_to_find)
+TABLE_LIST *TABLE_LIST::find_underlying_table(TABLE *table_to_find)
{
/* is this real table and table which we are looking for? */
if (table == table_to_find && merge_underlying_list == 0)
@@ -2188,10 +2188,10 @@ st_table_list *st_table_list::find_underlying_table(TABLE *table_to_find)
cleunup items belonged to view fields translation table
SYNOPSIS
- st_table_list::cleanup_items()
+ TABLE_LIST::cleanup_items()
*/
-void st_table_list::cleanup_items()
+void TABLE_LIST::cleanup_items()
{
if (!field_translation)
return;
@@ -2207,7 +2207,7 @@ void st_table_list::cleanup_items()
check CHECK OPTION condition
SYNOPSIS
- st_table_list::view_check_option()
+ TABLE_LIST::view_check_option()
ignore_failure ignore check option fail
RETURN
@@ -2216,7 +2216,7 @@ void st_table_list::cleanup_items()
VIEW_CHECK_SKIP FAILED, but continue
*/
-int st_table_list::view_check_option(THD *thd, bool ignore_failure)
+int TABLE_LIST::view_check_option(THD *thd, bool ignore_failure)
{
if (check_option && check_option->val_int() == 0)
{
@@ -2241,7 +2241,7 @@ int st_table_list::view_check_option(THD *thd, bool ignore_failure)
table belong to given mask
SYNOPSIS
- st_table_list::check_single_table()
+ TABLE_LIST::check_single_table()
table_arg reference on variable where to store found table
(should be 0 on call, to find table, or point to table for
unique test)
@@ -2253,9 +2253,9 @@ int st_table_list::view_check_option(THD *thd, bool ignore_failure)
TRUE found several tables
*/
-bool st_table_list::check_single_table(st_table_list **table_arg,
+bool TABLE_LIST::check_single_table(TABLE_LIST **table_arg,
table_map map,
- st_table_list *view_arg)
+ TABLE_LIST *view_arg)
{
for (TABLE_LIST *tbl= merge_underlying_list; tbl; tbl= tbl->next_local)
{
@@ -2288,7 +2288,7 @@ bool st_table_list::check_single_table(st_table_list **table_arg,
TRUE - out of memory
*/
-bool st_table_list::set_insert_values(MEM_ROOT *mem_root)
+bool TABLE_LIST::set_insert_values(MEM_ROOT *mem_root)
{
if (table)
{
@@ -2312,7 +2312,7 @@ bool st_table_list::set_insert_values(MEM_ROOT *mem_root)
Test if this is a leaf with respect to name resolution.
SYNOPSIS
- st_table_list::is_leaf_for_name_resolution()
+ TABLE_LIST::is_leaf_for_name_resolution()
DESCRIPTION
A table reference is a leaf with respect to name resolution if
@@ -2324,7 +2324,7 @@ bool st_table_list::set_insert_values(MEM_ROOT *mem_root)
RETURN
TRUE if a leaf, FALSE otherwise.
*/
-bool st_table_list::is_leaf_for_name_resolution()
+bool TABLE_LIST::is_leaf_for_name_resolution()
{
return (view || is_natural_join || is_join_columns_complete ||
!nested_join);
@@ -2336,7 +2336,7 @@ bool st_table_list::is_leaf_for_name_resolution()
respect to name resolution.
SYNOPSIS
- st_table_list::first_leaf_for_name_resolution()
+ TABLE_LIST::first_leaf_for_name_resolution()
DESCRIPTION
Given that 'this' is a nested table reference, recursively walk
@@ -2354,7 +2354,7 @@ bool st_table_list::is_leaf_for_name_resolution()
else return 'this'
*/
-TABLE_LIST *st_table_list::first_leaf_for_name_resolution()
+TABLE_LIST *TABLE_LIST::first_leaf_for_name_resolution()
{
TABLE_LIST *cur_table_ref;
NESTED_JOIN *cur_nested_join;
@@ -2394,7 +2394,7 @@ TABLE_LIST *st_table_list::first_leaf_for_name_resolution()
respect to name resolution.
SYNOPSIS
- st_table_list::last_leaf_for_name_resolution()
+ TABLE_LIST::last_leaf_for_name_resolution()
DESCRIPTION
Given that 'this' is a nested table reference, recursively walk
@@ -2412,7 +2412,7 @@ TABLE_LIST *st_table_list::first_leaf_for_name_resolution()
- else - 'this'
*/
-TABLE_LIST *st_table_list::last_leaf_for_name_resolution()
+TABLE_LIST *TABLE_LIST::last_leaf_for_name_resolution()
{
TABLE_LIST *cur_table_ref= this;
NESTED_JOIN *cur_nested_join;
@@ -2454,7 +2454,7 @@ TABLE_LIST *st_table_list::last_leaf_for_name_resolution()
want_access Acess which we require
*/
-void st_table_list::register_want_access(ulong want_access)
+void TABLE_LIST::register_want_access(ulong want_access)
{
/* Remove SHOW_VIEW_ACL, because it will be checked during making view */
want_access&= ~SHOW_VIEW_ACL;
@@ -2473,7 +2473,7 @@ void st_table_list::register_want_access(ulong want_access)
Load security context information for this view
SYNOPSIS
- st_table_list::prepare_view_securety_context()
+ TABLE_LIST::prepare_view_securety_context()
thd [in] thread handler
RETURN
@@ -2482,9 +2482,9 @@ void st_table_list::register_want_access(ulong want_access)
*/
#ifndef NO_EMBEDDED_ACCESS_CHECKS
-bool st_table_list::prepare_view_securety_context(THD *thd)
+bool TABLE_LIST::prepare_view_securety_context(THD *thd)
{
- DBUG_ENTER("st_table_list::prepare_view_securety_context");
+ DBUG_ENTER("TABLE_LIST::prepare_view_securety_context");
DBUG_PRINT("enter", ("table: %s", alias));
DBUG_ASSERT(!prelocking_placeholder && view);
@@ -2533,17 +2533,17 @@ bool st_table_list::prepare_view_securety_context(THD *thd)
Find security context of current view
SYNOPSIS
- st_table_list::find_view_security_context()
+ TABLE_LIST::find_view_security_context()
thd [in] thread handler
*/
#ifndef NO_EMBEDDED_ACCESS_CHECKS
-Security_context *st_table_list::find_view_security_context(THD *thd)
+Security_context *TABLE_LIST::find_view_security_context(THD *thd)
{
Security_context *sctx;
TABLE_LIST *upper_view= this;
- DBUG_ENTER("st_table_list::find_view_security_context");
+ DBUG_ENTER("TABLE_LIST::find_view_security_context");
DBUG_ASSERT(view);
while (upper_view && !upper_view->view_suid)
@@ -2572,7 +2572,7 @@ Security_context *st_table_list::find_view_security_context(THD *thd)
Prepare security context and load underlying tables priveleges for view
SYNOPSIS
- st_table_list::prepare_security()
+ TABLE_LIST::prepare_security()
thd [in] thread handler
RETURN
@@ -2580,11 +2580,11 @@ Security_context *st_table_list::find_view_security_context(THD *thd)
TRUE Error
*/
-bool st_table_list::prepare_security(THD *thd)
+bool TABLE_LIST::prepare_security(THD *thd)
{
List_iterator_fast<TABLE_LIST> tb(*view_tables);
TABLE_LIST *tbl;
- DBUG_ENTER("st_table_list::prepare_security");
+ DBUG_ENTER("TABLE_LIST::prepare_security");
#ifndef NO_EMBEDDED_ACCESS_CHECKS
Security_context *save_security_ctx= thd->security_ctx;
@@ -3079,10 +3079,10 @@ Field_iterator_table_ref::get_natural_column_ref()
Cleanup this table for re-execution.
SYNOPSIS
- st_table_list::reinit_before_use()
+ TABLE_LIST::reinit_before_use()
*/
-void st_table_list::reinit_before_use(THD *thd)
+void TABLE_LIST::reinit_before_use(THD *thd)
{
/*
Reset old pointers to TABLEs: they are not valid since the tables
@@ -3109,7 +3109,7 @@ void st_table_list::reinit_before_use(THD *thd)
Return subselect that contains the FROM list this table is taken from
SYNOPSIS
- st_table_list::containing_subselect()
+ TABLE_LIST::containing_subselect()
RETURN
Subselect item for the subquery that contains the FROM list
@@ -3118,7 +3118,7 @@ void st_table_list::reinit_before_use(THD *thd)
*/
-Item_subselect *st_table_list::containing_subselect()
+Item_subselect *TABLE_LIST::containing_subselect()
{
return (select_lex ? select_lex->master_unit()->item : 0);
}
diff --git a/sql/table.h b/sql/table.h
index d4dc3e8c0b8..b29ef8c6566 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -237,7 +237,7 @@ struct st_table {
/* Table's triggers, 0 if there are no of them */
Table_triggers_list *triggers;
- struct st_table_list *pos_in_table_list;/* Element referring to this table */
+ TABLE_LIST *pos_in_table_list;/* Element referring to this table */
ORDER *group;
const char *alias; /* alias or table name */
uchar *null_flags;
@@ -392,7 +392,7 @@ typedef struct st_field_info
} ST_FIELD_INFO;
-struct st_table_list;
+struct TABLE_LIST;
typedef class Item COND;
typedef struct st_schema_table
@@ -400,12 +400,12 @@ typedef struct st_schema_table
const char* table_name;
ST_FIELD_INFO *fields_info;
/* Create information_schema table */
- TABLE *(*create_table) (THD *thd, struct st_table_list *table_list);
+ TABLE *(*create_table) (THD *thd, TABLE_LIST *table_list);
/* Fill table with data */
- int (*fill_table) (THD *thd, struct st_table_list *tables, COND *cond);
+ int (*fill_table) (THD *thd, TABLE_LIST *tables, COND *cond);
/* Handle fileds for old SHOW */
int (*old_format) (THD *thd, struct st_schema_table *schema_table);
- int (*process_table) (THD *thd, struct st_table_list *tables,
+ int (*process_table) (THD *thd, TABLE_LIST *tables,
TABLE *table, bool res, const char *base_name,
const char *file_name);
int idx_field1, idx_field2;
@@ -438,7 +438,7 @@ struct st_lex;
class select_union;
class TMP_TABLE_PARAM;
-Item *create_view_field(THD *thd, st_table_list *view, Item **field_ref,
+Item *create_view_field(THD *thd, TABLE_LIST *view, Item **field_ref,
const char *name);
struct Field_translator
@@ -459,7 +459,7 @@ class Natural_join_column: public Sql_alloc
public:
Field_translator *view_field; /* Column reference of merge view. */
Field *table_field; /* Column reference of table or temp view. */
- st_table_list *table_ref; /* Original base table/view reference. */
+ TABLE_LIST *table_ref; /* Original base table/view reference. */
/*
True if a common join column of two NATURAL/USING join operands. Notice
that when we have a hierarchy of nested NATURAL/USING joins, a column can
@@ -469,8 +469,8 @@ public:
*/
bool is_common;
public:
- Natural_join_column(Field_translator *field_param, st_table_list *tab);
- Natural_join_column(Field *field_param, st_table_list *tab);
+ Natural_join_column(Field_translator *field_param, TABLE_LIST *tab);
+ Natural_join_column(Field *field_param, TABLE_LIST *tab);
const char *name();
Item *create_item(THD *thd);
Field *field();
@@ -512,17 +512,17 @@ public:
(TABLE_LIST::join_using_fields != NULL)
*/
-typedef struct st_table_list
+struct TABLE_LIST
{
- st_table_list() {} /* Remove gcc warning */
+ TABLE_LIST() {} /* Remove gcc warning */
/*
List of tables local to a subquery (used by SQL_LIST). Considers
views as leaves (unlike 'next_leaf' below). Created at parse time
in st_select_lex::add_table_to_list() -> table_list.link_in_list().
*/
- struct st_table_list *next_local;
+ TABLE_LIST *next_local;
/* link in a global list of all queries tables */
- struct st_table_list *next_global, **prev_global;
+ TABLE_LIST *next_global, **prev_global;
char *db, *alias, *table_name, *schema_table_name;
char *option; /* Used by cache index */
Item *on_expr; /* Used with outer join */
@@ -542,7 +542,7 @@ typedef struct st_table_list
'this' represents a NATURAL or USING join operation. Thus after
parsing 'this' is a NATURAL/USING join iff (natural_join != NULL).
*/
- struct st_table_list *natural_join;
+ TABLE_LIST *natural_join;
/*
True if 'this' represents a nested join that is a NATURAL JOIN.
For one of the operands of 'this', the member 'natural_join' points
@@ -566,7 +566,7 @@ typedef struct st_table_list
base tables. All of these TABLE_LIST instances contain a
materialized list of columns. The list is local to a subquery.
*/
- struct st_table_list *next_name_resolution_table;
+ TABLE_LIST *next_name_resolution_table;
/* Index names in a "... JOIN ... USE/IGNORE INDEX ..." clause. */
List<String> *use_index, *ignore_index;
TABLE *table; /* opened table */
@@ -582,7 +582,7 @@ typedef struct st_table_list
here it will be reference of first occurrence of t1 to second (as you
can see this lists can't be merged)
*/
- st_table_list *correspondent_table;
+ TABLE_LIST *correspondent_table;
st_select_lex_unit *derived; /* SELECT_LEX_UNIT of derived table */
ST_SCHEMA_TABLE *schema_table; /* Information_schema table */
st_select_lex *schema_select_lex;
@@ -603,20 +603,20 @@ typedef struct st_table_list
does not include the tables of subqueries used in the view. Is set only
for merged views.
*/
- st_table_list *merge_underlying_list;
+ TABLE_LIST *merge_underlying_list;
/*
- 0 for base tables
- in case of the view it is the list of all (not only underlying
tables but also used in subquery ones) tables of the view.
*/
- List<st_table_list> *view_tables;
+ List<TABLE_LIST> *view_tables;
/* most upper view this table belongs to */
- st_table_list *belong_to_view;
+ TABLE_LIST *belong_to_view;
/*
The view directly referencing this table
(non-zero only for merged underlying tables of a view).
*/
- st_table_list *referencing_view;
+ TABLE_LIST *referencing_view;
/*
Security context (non-zero only for tables which belong
to view with SQL SECURITY DEFINER)
@@ -633,7 +633,7 @@ typedef struct st_table_list
leaves. Created in setup_tables() -> make_leaves_list().
*/
bool allowed_show;
- st_table_list *next_leaf;
+ TABLE_LIST *next_leaf;
Item *where; /* VIEW WHERE clause condition */
Item *check_option; /* WITH CHECK OPTION condition */
LEX_STRING query; /* text of (CRETE/SELECT) statement */
@@ -673,8 +673,8 @@ typedef struct st_table_list
table_map dep_tables; /* tables the table depends on */
table_map on_expr_dep_tables; /* tables on expression depends on */
struct st_nested_join *nested_join; /* if the element is a nested join */
- st_table_list *embedding; /* nested join containing the table */
- List<struct st_table_list> *join_list;/* join list the table belongs to */
+ TABLE_LIST *embedding; /* nested join containing the table */
+ List<TABLE_LIST> *join_list;/* join list the table belongs to */
bool cacheable_table; /* stop PS caching */
/* used in multi-upd/views privilege check */
bool table_in_first_from_clause;
@@ -714,15 +714,15 @@ typedef struct st_table_list
!table;
}
void print(THD *thd, String *str);
- bool check_single_table(st_table_list **table, table_map map,
- st_table_list *view);
+ bool check_single_table(TABLE_LIST **table, table_map map,
+ TABLE_LIST *view);
bool set_insert_values(MEM_ROOT *mem_root);
void hide_view_error(THD *thd);
- st_table_list *find_underlying_table(TABLE *table);
- st_table_list *first_leaf_for_name_resolution();
- st_table_list *last_leaf_for_name_resolution();
+ TABLE_LIST *find_underlying_table(TABLE *table);
+ TABLE_LIST *first_leaf_for_name_resolution();
+ TABLE_LIST *last_leaf_for_name_resolution();
bool is_leaf_for_name_resolution();
- inline st_table_list *top_table()
+ inline TABLE_LIST *top_table()
{ return belong_to_view ? belong_to_view : this; }
inline bool prepare_check_option(THD *thd)
{
@@ -759,7 +759,7 @@ private:
Cleanup for re-execution in a prepared statement or a stored
procedure.
*/
-} TABLE_LIST;
+};
class Item;