diff options
author | Igor Babaev <igor@askmonty.org> | 2012-07-26 17:50:08 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2012-07-26 17:50:08 -0700 |
commit | 8c499274da21af6226785d51dd24968bf2b1befe (patch) | |
tree | bfd5380bc3c0967fde27ec8966054767ef9cbc67 /sql/sql_base.h | |
parent | cb0a5c84b63a24d143160e38995cb35268f8eef4 (diff) | |
download | mariadb-git-8c499274da21af6226785d51dd24968bf2b1befe.tar.gz |
Performed re-factoring and re-structuring of the code for mwl#248:
- Moved the definitions of the classes to store data from persistent
statistical tables into statistics.h, leaving in other internal
data structures only references to the corresponding objects.
- Defined class Column_statistics_collected derived from the class
Column_statistics. This is a helper class to collect statistics
on columns.
- Moved references to read statistics to TABLE SHARE, leaving the
the reference to the collected statistics in TABLE.
- Added a new clone method for the class Field allowing to clone
fields attached to table shares. It was was used to create
fields for min/max values in the memory of the table share.
A lso:
- Added procedures to allocate memory for statistical data in
the table share memory and in table memory.
Also:
- Added a test case demonstrating how ANALYZE could work in parallel
to collect statistics on different indexes of the same table.
- Added a test two demonstrate how two connections working
simultaneously could allocate memory for statistical data in the
table share memory.
Diffstat (limited to 'sql/sql_base.h')
-rw-r--r-- | sql/sql_base.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_base.h b/sql/sql_base.h index 6c20022f7ee..a8d4951981e 100644 --- a/sql/sql_base.h +++ b/sql/sql_base.h @@ -314,6 +314,9 @@ int open_and_lock_tables_derived(THD *thd, TABLE_LIST *tables, bool derived); int read_statistics_for_table(THD *thd, TABLE *table); int collect_statistics_for_table(THD *thd, TABLE *table); +int alloc_statistics_for_table_share(THD* thd, TABLE_SHARE *share, + bool is_safe); +int alloc_statistics_for_table(THD *thd, TABLE *table); int update_statistics_for_table(THD *thd, TABLE *table); int delete_statistics_for_table(THD *thd, LEX_STRING *db, LEX_STRING *tab); int delete_statistics_for_column(THD *thd, TABLE *tab, Field *col); |