summaryrefslogtreecommitdiff
path: root/sql/structs.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/structs.h')
-rw-r--r--sql/structs.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/sql/structs.h b/sql/structs.h
index c2bdf6db747..77c94058b40 100644
--- a/sql/structs.h
+++ b/sql/structs.h
@@ -102,6 +102,31 @@ typedef struct st_key {
For temporary heap tables this member is NULL.
*/
ulong *rec_per_key;
+
+ /* Statistical data on an index prefixes */
+ class Index_statistics
+ {
+ public:
+ /*
+ The k-th element of this array contains the ratio N/D,
+ where N is the number of index entries without nulls
+ in the first k components, and D is the number of distinct
+ k-component prefixes among them
+ */
+ double *avg_frequency;
+ };
+
+ /*
+ This structure is used for statistical data on the index
+ that has been read from the statistical table index_stat
+ */
+ Index_statistics read_stat;
+ /*
+ This structure is used for statistical data on the index that
+ is collected by the function collect_statistics_for_table
+ */
+ Index_statistics write_stat;
+
union {
int bdb_return_if_eq;
} handler;