diff options
author | unknown <bell@sanja.is.com.ua> | 2004-11-11 21:18:10 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-11-11 21:18:10 +0200 |
commit | 3bc1fcd409eb08474884a556fef193d707117212 (patch) | |
tree | b838d2bae358ea54b828bff0e3dfb8a0faf1bc8e /sql/table.h | |
parent | e5fd013fdf6c8664daa0bbdcaf0d22bf44e90d62 (diff) | |
parent | 5b82bc6644fb766c7a04b49d60e70c474450ce28 (diff) | |
download | mariadb-git-3bc1fcd409eb08474884a556fef193d707117212.tar.gz |
merge
sql/item_cmpfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_help.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_view.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/sql/table.h b/sql/table.h index f95be1fcccb..21ea31f832d 100644 --- a/sql/table.h +++ b/sql/table.h @@ -224,6 +224,12 @@ struct st_table { struct st_lex; struct select_union; +struct Field_translator +{ + Item *item; + const char *name; +}; + typedef struct st_table_list { /* link in a local table list (used by SQL_LIST) */ @@ -255,11 +261,13 @@ typedef struct st_table_list /* link to select_lex where this table was used */ st_select_lex *select_lex; st_lex *view; /* link on VIEW lex for merging */ - Item **field_translation; /* array of VIEW fields */ + Field_translator *field_translation; /* array of VIEW fields */ /* ancestor of this table (VIEW merge algorithm) */ st_table_list *ancestor; /* most upper view this table belongs to */ st_table_list *belong_to_view; + /* list of join table tree leaves */ + st_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 */ @@ -279,6 +287,7 @@ typedef struct st_table_list */ uint8 effective_with_check; uint effective_algorithm; /* which algorithm was really used */ + uint privilege_backup; /* place for saving privileges */ GRANT_INFO grant; thr_lock_type lock_type; uint outer_join; /* Which join type */ @@ -313,6 +322,11 @@ typedef struct st_table_list void cleanup_items(); bool placeholder() {return derived || view; } void print(THD *thd, String *str); + void save_and_clear_want_privilege(); + void restore_want_privilege(); + bool check_single_table(st_table_list **table, table_map map); + bool set_insert_values(MEM_ROOT *mem_root); + void clear_insert_values(); } TABLE_LIST; class Item; @@ -347,14 +361,14 @@ public: class Field_iterator_view: public Field_iterator { - Item **ptr, **array_end; + Field_translator *ptr, *array_end; public: Field_iterator_view() :ptr(0), array_end(0) {} void set(TABLE_LIST *table); void next() { ptr++; } bool end_of_fields() { return ptr == array_end; } const char *name(); - Item *item(THD *thd) { return *ptr; } + Item *item(THD *thd) { return ptr->item; } Field *field() { return 0; } }; |