summaryrefslogtreecommitdiff
path: root/sql/structs.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-01-04 17:51:53 -0800
committerIgor Babaev <igor@askmonty.org>2012-01-04 17:51:53 -0800
commite8497370b9557e77c0a791f89712a6ae8505f925 (patch)
treee67d66f7fe58cd216be1c18b8a99f39160909026 /sql/structs.h
parentcd55894a52b5b2bf4a740eb0f39d91d7a82f673c (diff)
downloadmariadb-git-e8497370b9557e77c0a791f89712a6ae8505f925.tar.gz
The main patch for the MWL#248 back-ported from
lp:~igorb-seattle/mysql-server/mysql-azalea-wl4777.
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;