diff options
author | unknown <sergefp@mysql.com> | 2004-09-08 02:07:53 +0400 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2004-09-08 02:07:53 +0400 |
commit | 99e1b8179eb88ad64e8cae7a6acd7822b94dda1f (patch) | |
tree | 5fb9bac74cdad46fce2efb3c783f9a02367489bd /include | |
parent | c1f297058d39408e64902c852fb141e4c3dd64c1 (diff) | |
download | mariadb-git-99e1b8179eb88ad64e8cae7a6acd7822b94dda1f.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.
heap/_check.c:
Hash indexes on heap tables now support statistics - number of hash buckets. The value is updated on any insert/delete operation.
heap/hp_clear.c:
Hash indexes on heap tables now support statistics - number of hash buckets. The value is updated on any insert/delete operation.
heap/hp_create.c:
Hash indexes on heap tables now support statistics - number of hash buckets. The value is updated on any insert/delete operation.
heap/hp_delete.c:
Hash indexes on heap tables now support statistics - number of hash buckets. The value is updated on any insert/delete operation.
heap/hp_hash.c:
Hash indexes on heap tables now support statistics - number of hash buckets. The value is updated on any insert/delete operation.
heap/hp_write.c:
Hash indexes on heap tables now support statistics - number of hash buckets. The value is updated on any insert/delete operation.
include/heap.h:
Hash indexes on heap tables now support statistics - number of hash buckets. The value is updated on any insert/delete operation.
mysql-test/r/heap.result:
Fix for bug#5138: store/use statistics for hash indexes on heap tables
mysql-test/r/heap_hash.result:
Fix for bug#5138: store/use statistics for hash indexes on heap tables
mysql-test/r/myisam.result:
Fix for bug#5138: store/use statistics for hash indexes on heap tables
mysql-test/t/heap_hash.test:
Fix for bug#5138: store/use statistics for hash indexes on heap tables
sql/structs.h:
Added comments
Diffstat (limited to 'include')
-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; |