diff options
author | Konstantin Osipov <kostja@sun.com> | 2009-10-14 15:14:58 +0400 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2009-10-14 15:14:58 +0400 |
commit | 595b8f92ae89eb2ef2d502ca80668a525ed2fa99 (patch) | |
tree | d00e87e2bd51be32ad14dc200c4e45fa3db718ad /sql/table.h | |
parent | c84a238984f3c3726fb3df0b058cc814796e6479 (diff) | |
download | mariadb-git-595b8f92ae89eb2ef2d502ca80668a525ed2fa99.tar.gz |
Backport of:
----------------------------------------------------------
revno: 2630.22.8
committer: Konstantin Osipov <konstantin@mysql.com>
branch nick: mysql-6.0-runtime
timestamp: Sun 2008-08-10 18:49:52 +0400
message:
Get rid of typedef struct for the most commonly used types:
TABLE, TABLE_SHARE, LEX. This simplifies use of tags
and forward declarations.
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/sql/table.h b/sql/table.h index 40372fa91cf..d7b6a0d9344 100644 --- a/sql/table.h +++ b/sql/table.h @@ -290,9 +290,9 @@ TABLE_CATEGORY get_table_category(const LEX_STRING *db, instance of table share per one table in the database. */ -typedef struct st_table_share +struct TABLE_SHARE { - st_table_share() {} /* Remove gcc warning */ + TABLE_SHARE() {} /* Remove gcc warning */ /** Category of this table. */ TABLE_CATEGORY table_category; @@ -305,11 +305,7 @@ typedef struct st_table_share TYPELIB *intervals; /* pointer to interval info */ pthread_mutex_t mutex; /* For locking the share */ pthread_cond_t cond; /* To signal that share is ready */ - struct st_table_share *next, /* Link to unused shares */ - **prev; -#ifdef NOT_YET - struct st_table *open_tables; /* link to open tables */ -#endif + TABLE_SHARE *next, **prev; /* Link to unused shares */ /* The following is copied to each TABLE on OPEN */ Field **field; @@ -592,7 +588,7 @@ typedef struct st_table_share return (tmp_table == SYSTEM_TMP_TABLE || is_view) ? 0 : table_map_id; } -} TABLE_SHARE; +}; extern ulong refresh_version; @@ -605,19 +601,16 @@ enum index_hint_type INDEX_HINT_FORCE }; -struct st_table { - st_table() {} /* Remove gcc warning */ +struct TABLE +{ + TABLE() {} /* Remove gcc warning */ TABLE_SHARE *s; handler *file; -#ifdef NOT_YET - struct st_table *used_next, **used_prev; /* Link to used tables */ - struct st_table *open_next, **open_prev; /* Link to open tables */ -#endif - struct st_table *next, *prev; + TABLE *next, *prev; /* For the below MERGE related members see top comment in ha_myisammrg.cc */ - struct st_table *parent; /* Set in MERGE child. Ptr to parent */ + TABLE *parent; /* Set in MERGE child. Ptr to parent */ TABLE_LIST *child_l; /* Set in MERGE parent. List of children */ TABLE_LIST **child_last_l; /* Set in MERGE parent. End of list */ @@ -999,7 +992,6 @@ typedef struct st_schema_table /** The threshold size a blob field buffer before it is freed */ #define MAX_TDC_BLOB_SIZE 65536 -struct st_lex; class select_union; class TMP_TABLE_PARAM; @@ -1077,6 +1069,7 @@ public: (TABLE_LIST::join_using_fields != NULL) */ +struct LEX; class Index_hint; struct TABLE_LIST { @@ -1197,7 +1190,7 @@ struct TABLE_LIST TMP_TABLE_PARAM *schema_table_param; /* link to select_lex where this table was used */ st_select_lex *select_lex; - st_lex *view; /* link on VIEW lex for merging */ + LEX *view; /* link on VIEW lex for merging */ Field_translator *field_translation; /* array of VIEW fields */ /* pointer to element after last one in translation table above */ Field_translator *field_translation_end; @@ -1412,9 +1405,9 @@ struct TABLE_LIST Item_subselect *containing_subselect(); /* - Compiles the tagged hints list and fills up st_table::keys_in_use_for_query, - st_table::keys_in_use_for_group_by, st_table::keys_in_use_for_order_by, - st_table::force_index and st_table::covering_keys. + Compiles the tagged hints list and fills up TABLE::keys_in_use_for_query, + TABLE::keys_in_use_for_group_by, TABLE::keys_in_use_for_order_by, + TABLE::force_index and TABLE::covering_keys. */ bool process_index_hints(TABLE *table); |