diff options
author | serg@serg.mysql.com <> | 2002-10-14 11:36:48 +0000 |
---|---|---|
committer | serg@serg.mysql.com <> | 2002-10-14 11:36:48 +0000 |
commit | fcb8bc061d4f6d139512670caf92c4648216b686 (patch) | |
tree | 50e53348aa9b2bb4539eb9061d6dbaf5b3bb646f /sql/table.h | |
parent | 7ba2242803837b411394b154e476dc577f957718 (diff) | |
parent | fd8e2337f51e41aed080e50972f407b82a517049 (diff) | |
download | mariadb-git-fcb8bc061d4f6d139512670caf92c4648216b686.tar.gz |
merged
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/sql/table.h b/sql/table.h index ca86269b625..d09194442c8 100644 --- a/sql/table.h +++ b/sql/table.h @@ -105,6 +105,7 @@ struct st_table { *rowid_field; Field_timestamp *timestamp_field; my_string comment; /* Comment about table */ + CHARSET_INFO *table_charset; /* Default charset of string fields */ REGINFO reginfo; /* field connections */ MEM_ROOT mem_root; GRANT_INFO grant; @@ -127,6 +128,9 @@ struct st_table { uint temp_pool_slot; + /* number of select if it is derived table */ + uint derived_select_number; + THD *in_use; /* Which thread uses this */ struct st_table *next,*prev; }; @@ -142,9 +146,18 @@ typedef struct st_table_list Item *on_expr; /* Used with outer join */ struct st_table_list *natural_join; /* natural join on this table*/ /* ... join ... USE INDEX ... IGNORE INDEX */ - List<String> *use_index,*ignore_index; - TABLE *table; - GRANT_INFO grant; + List<String> *use_index, *ignore_index; + /* + Usually hold reference on opened table, but may hold reference + to node of complete list of tables used in UNION & subselect. + */ + union + { + TABLE *table; /* opened table */ + st_table_list *table_list; /* pointer to node of list of all tables */ + }; + void *derived; /* SELECT_LEX_UNIT of derived table */ + GRANT_INFO grant; thr_lock_type lock_type; uint outer_join; /* Which join type */ uint32 db_length, real_name_length; @@ -154,7 +167,6 @@ typedef struct st_table_list bool do_redirect; /* To get the struct in UNION's */ } TABLE_LIST; - typedef struct st_changed_table_list { struct st_changed_table_list *next; @@ -162,7 +174,6 @@ typedef struct st_changed_table_list uint32 key_length; } CHANGED_TABLE_LIST; - typedef struct st_open_table_list { struct st_open_table_list *next; |