diff options
author | sergefp@mysql.com <> | 2004-09-08 02:07:53 +0400 |
---|---|---|
committer | sergefp@mysql.com <> | 2004-09-08 02:07:53 +0400 |
commit | 2c9d2cf671d33f598dcec7eb5604f98638c96490 (patch) | |
tree | 5fb9bac74cdad46fce2efb3c783f9a02367489bd /include/heap.h | |
parent | 15eb33ab44b6af9f34e65d941739fadcd0026866 (diff) | |
download | mariadb-git-2c9d2cf671d33f598dcec7eb5604f98638c96490.tar.gz |
Fix for bug#5138: hash indexes on heap tables support statistics.
KEY::rec_per_key is updated every time 1/HEAP_STATS_UPDATE_THRESHOLD part of table records has been changed.
Diffstat (limited to 'include/heap.h')
-rw-r--r-- | include/heap.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/heap.h b/include/heap.h index 63f2abbabc7..e3e7f228421 100644 --- a/include/heap.h +++ b/include/heap.h @@ -87,6 +87,11 @@ typedef struct st_hp_keydef /* Key definition with open */ uint8 algorithm; /* HASH / BTREE */ HA_KEYSEG *seg; HP_BLOCK block; /* Where keys are saved */ + /* + Number of buckets used in hash table. Used only to provide + #records estimates for heap key scans. + */ + ha_rows hash_buckets; TREE rb_tree; int (*write_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo, const byte *record, byte *recpos); @@ -102,7 +107,7 @@ typedef struct st_heap_share ulong min_records,max_records; /* Params to open */ ulong data_length,index_length; uint records; /* records */ - uint blength; + uint blength; /* records rounded up to 2^n */ uint deleted; /* Deleted records in database */ uint reclength; /* Length of one record */ uint changed; |