summaryrefslogtreecommitdiff
path: root/sql/structs.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-03-19 01:35:32 -0700
committerIgor Babaev <igor@askmonty.org>2012-03-19 01:35:32 -0700
commitff3d16fba898efa68677f3b0049668a341f27a06 (patch)
treef56fddecdc49cf5ccd55680c14dc5b27371b2f03 /sql/structs.h
parent51c77ec5d406843bb8c8131f0687f4f75839d045 (diff)
parent7b845f551b8f206c886366499e21b790991f5418 (diff)
downloadmariadb-git-ff3d16fba898efa68677f3b0049668a341f27a06.tar.gz
Merge maria-5.3-mwl248 -> 5.5 = maria-5.5-mwl248.
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 ae71819ae09..51c71db7cd2 100644
--- a/sql/structs.h
+++ b/sql/structs.h
@@ -115,6 +115,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;