summaryrefslogtreecommitdiff
path: root/sql/structs.h
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2004-09-08 02:07:53 +0400
committerunknown <sergefp@mysql.com>2004-09-08 02:07:53 +0400
commit99e1b8179eb88ad64e8cae7a6acd7822b94dda1f (patch)
tree5fb9bac74cdad46fce2efb3c783f9a02367489bd /sql/structs.h
parentc1f297058d39408e64902c852fb141e4c3dd64c1 (diff)
downloadmariadb-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 'sql/structs.h')
-rw-r--r--sql/structs.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/structs.h b/sql/structs.h
index c30d85f59cb..846b3400fab 100644
--- a/sql/structs.h
+++ b/sql/structs.h
@@ -89,7 +89,12 @@ typedef struct st_key {
enum ha_key_alg algorithm;
KEY_PART_INFO *key_part;
char *name; /* Name of key */
- ulong *rec_per_key; /* Key part distribution */
+ /*
+ Array of AVG(#records with the same field value) for 1st ... Nth key part.
+ 0 means 'not known'.
+ For temporary heap tables this member is NULL.
+ */
+ ulong *rec_per_key;
union {
int bdb_return_if_eq;
} handler;