summaryrefslogtreecommitdiff
path: root/sql/table.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-11-02 20:38:05 -0700
committerIgor Babaev <igor@askmonty.org>2012-11-02 20:38:05 -0700
commit8d612adf70c53dcb741b097133e09d176d0780e1 (patch)
tree278a83cc5caaccbfb408471cef6bde5e5171d802 /sql/table.h
parent4ffc9c3b01459a2904a7154a6c750d128864fc7b (diff)
parent32443e744d354fbba93c8761486462b5820b74bb (diff)
downloadmariadb-git-8d612adf70c53dcb741b097133e09d176d0780e1.tar.gz
Merge 5.5 -> 5.5-mwl248.
Diffstat (limited to 'sql/table.h')
-rw-r--r--sql/table.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/sql/table.h b/sql/table.h
index 1a24fde6111..0daa1947b52 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -45,6 +45,7 @@ struct TABLE_LIST;
class ACL_internal_schema_access;
class ACL_internal_table_access;
class Field;
+class Table_statistics;
/*
Used to identify NESTED_JOIN structures within a join (applicable only to
@@ -577,6 +578,15 @@ struct TABLE_SHARE
KEY *key_info; /* data of keys in database */
uint *blob_field; /* Index to blobs in Field arrray*/
+ bool stats_can_be_read; /* Memory for statistical data is allocated */
+ bool stats_is_read; /* Statistical data for table has been read
+ from statistical tables */
+ /*
+ This structure is used for statistical data on the table
+ that has been read from the statistical table table_stat
+ */
+ Table_statistics *read_stats;
+
uchar *default_values; /* row with default values */
LEX_STRING comment; /* Comment about table */
CHARSET_INFO *table_charset; /* Default charset of string fields */
@@ -1007,6 +1017,15 @@ public:
*/
query_id_t query_id;
+ /*
+ This structure is used for statistical data on the table that
+ is collected by the function collect_statistics_for_table
+ */
+ Table_statistics *collected_stats;
+
+ /* The estimate of the number of records in the table used by optimizer */
+ ha_rows used_stat_records;
+
/*
For each key that has quick_keys.is_set(key) == TRUE: estimate of #records
and max #key parts that range access would use.
@@ -1258,6 +1277,7 @@ public:
bool update_const_key_parts(COND *conds);
uint actual_n_key_parts(KEY *keyinfo);
ulong actual_key_flags(KEY *keyinfo);
+ inline ha_rows stat_records() { return used_stat_records; }
};