diff options
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/sql/table.h b/sql/table.h index da2c90ab212..952b575c00e 100644 --- a/sql/table.h +++ b/sql/table.h @@ -137,7 +137,12 @@ typedef struct st_table_share const char *table_name; /* Table name (for open) */ const char *path; /* Path to .frm file (from datadir) */ LEX_STRING connect_string; - key_map keys_in_use; /* Keys in use for table */ + + /* + Set of keys in use, implemented as a Bitmap. + Excludes keys disabled by ALTER TABLE ... DISABLE KEYS. + */ + key_map keys_in_use; key_map keys_for_keyread; ulong avg_row_length; /* create information */ ulong raid_chunksize; @@ -208,7 +213,21 @@ struct st_table { byte *record[2]; /* Pointer to records */ byte *insert_values; /* used by INSERT ... UPDATE */ - key_map quick_keys, used_keys, keys_in_use_for_query; + key_map quick_keys, used_keys; + + /* + A set of keys that can be used in the query that references this + table + + All indexes disabled on the table's TABLE_SHARE (see TABLE::s) will be + subtracted from this set upon instantiation. Thus for any TABLE t it holds + that t.keys_in_use_for_query is a subset of t.s.keys_in_use. Generally we + must not introduce any new keys here (see setup_tables). + + The set is implemented as a bitmap. + */ + key_map keys_in_use_for_query; + key_map merge_keys; KEY *key_info; /* data of keys in database */ Field *next_number_field, /* Set if next_number is activated */ |