diff options
author | bell@sanja.is.com.ua <> | 2004-11-21 20:08:12 +0200 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2004-11-21 20:08:12 +0200 |
commit | 072d38eb129bcecb1afba5c5efb61bcc21e78fea (patch) | |
tree | 76a673d7a9b20f184988993cc14ce455b1d73f70 /sql/table.h | |
parent | 97a19706581e1cb0fce88fd6ba3ec8ca726a69ff (diff) | |
parent | 21eb2e2eae5387aa01f8e600180a194f1f2d6a37 (diff) | |
download | mariadb-git-072d38eb129bcecb1afba5c5efb61bcc21e78fea.tar.gz |
merge
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sql/table.h b/sql/table.h index b12e82f3c73..c942b038eae 100644 --- a/sql/table.h +++ b/sql/table.h @@ -274,6 +274,11 @@ typedef struct st_schema_table struct st_lex; class select_union; +struct Field_translator +{ + Item *item; + const char *name; +}; typedef struct st_table_list { @@ -308,11 +313,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 */ @@ -332,6 +339,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 */ @@ -366,6 +374,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; @@ -400,14 +413,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; } }; |