Commit a64be676 authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime

into  bodhi.(none):/opt/local/work/mysql-5.0-runtime


sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
parents e8966dee 360a5ebc
......@@ -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;
......
......@@ -19,7 +19,7 @@
#endif
class Protocol;
struct st_table_list;
struct TABLE_LIST;
void item_init(void); /* Init item functions */
class Item_field;
......
......@@ -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,
......
......@@ -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)
{
......
......@@ -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())
......
......@@ -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
......
......@@ -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)
{
......
......@@ -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)
......
......@@ -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
{
......
This diff is collapsed.
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment