diff options
author | unknown <bell@sanja.is.com.ua> | 2004-10-05 13:41:51 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-10-05 13:41:51 +0300 |
commit | 75730fb37e4a730df1dca83da9c8ff63c7122491 (patch) | |
tree | eff9942a59480da2e462c761af70d6bde1a856fc /sql/table.h | |
parent | dc25de58e58bf64c82e290b5c625fb68caa82953 (diff) | |
parent | 9aa459f0df7e000224e4ac54c5009eac42ef365a (diff) | |
download | mariadb-git-75730fb37e4a730df1dca83da9c8ff63c7122491.tar.gz |
merge
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
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_yacc.yy:
Auto merged
sql/table.h:
Auto merged
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/sql/table.h b/sql/table.h index ddc21261e48..ad75f13cbc5 100644 --- a/sql/table.h +++ b/sql/table.h @@ -200,6 +200,13 @@ struct st_table { struct st_lex; + +struct Field_translator +{ + Item *item; + const char *name; +}; + typedef struct st_table_list { /* link in a local table list (used by SQL_LIST) */ @@ -225,13 +232,15 @@ 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; /* next_global before adding VIEW tables */ st_table_list *old_next; + /* 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 */ @@ -246,6 +255,7 @@ typedef struct st_table_list ulonglong algorithm; /* 0 any, 1 tmp tables , 2 merging */ ulonglong with_check; /* WITH CHECK OPTION */ 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 */ @@ -279,6 +289,11 @@ typedef struct st_table_list bool setup_ancestor(THD *thd, Item **conds); 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(); inline st_table_list *next_independent() { if (view) @@ -319,14 +334,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; } }; |