Commit graph

24 commits

Author SHA1 Message Date
Sergei Petrunia
9f862ce026 MDEV#7383: engine-independent-stats column_stats has limited values for max/min values
Patch from Daniel Black:
- Change the charset of mysql.column_stats.{min_value, max_value} from
  utf8_bin varchar to varbinary
- Adjust the code that saves/reads the data accordingly.
- Also provide upgrade statement in mysql_system_tables_fix.sql
2015-11-09 17:58:35 +03:00
Sergey Petrunya
68015a99cd Change the order of parameters in DECODE_HISTOGRAM to match the order of fields in
mysql.column_stats.
2014-03-28 23:18:33 +04:00
unknown
7a565cd961 Make test working on case insensitive file system 2013-04-22 12:18:46 +03:00
unknown
c076f7302b Removed comparison of table names. 2013-04-22 06:46:26 +03:00
unknown
3fccd933dd Fix of the test suite. 2013-04-21 21:39:01 +03:00
Igor Babaev
c0034df25e Changed a test case. 2013-04-20 18:18:01 -07:00
unknown
2e830cfbc8 MDEV-4402 A function to visualize histograms data. 2013-04-20 23:30:21 +03:00
Igor Babaev
10f0530b22 Fixed bug mdev-4369.
The function was adjusted to be able to aggregate
the counters of the merged elements. 
Before this change it was not possible to guarantee the correctness
of the counters passed to the the call-back parameter walk_action.
As a result, when some elements of a Unique object were flushed into
disk the function passed to merge_walk() as the call-back parameter
could return wrong counters of elements. This could lead to building
wrong histograms.
2013-04-06 15:36:28 -07:00
Igor Babaev
1ae352afbe Fixed bugs mdev-4357 and mdev-4359.
The values of the column HIST_TYPE from the statistical table
mysql.column_stats were stored in the table and read from the
table incorrectly.
2013-04-05 23:48:49 -07:00
Igor Babaev
9e1ca1053b Added the type of histogram for mwl #253.
Introduced double precision height-balanced histograms.
2013-03-30 18:57:07 -07:00
Igor Babaev
1009832c13 Added histogams for table columns. 2013-03-25 23:48:29 -07:00
Igor Babaev
2447bc4c81 Addressed the following issue from the review of the patch for
engine-independent statistics.
When the primary key was dropped or changed statistics on secondary
indexes for the prefixes that included components of the primary 
key was not removed from the table mysql.index_stats.

Also fixed: in the some cases when a column was changed statistics
on the indexes that included this column was not removed from the
table mysql.index_stats.

Also disabled the test mdev-504 for --ps-protocol.
2012-12-08 15:38:15 -08:00
Igor Babaev
dd119466c3 Addressed the following issues from the review of the patch:
1. The PERSISTENT FOR clause of the ANALYZE command overrides
the setting of the system variable use_stat_tables: 
with this clause ANALYZE unconditionally collects persistent
statistics.
2. ANALYZE collects persistent statistics only for tables of
the USER category. So it never collects persistent statistics
for system tables.
2012-12-05 22:51:11 -08:00
Igor Babaev
b110132516 Changed the names of the system tables for statistical data:
table_stat  -> table_stats
  column_stat -> column_stats
  index_stat  -> index_stats
to be in line with the names of innodb statistical tables 
from mysql-5.6: innodb_table_stats and innodb_index_stats.
2012-12-05 00:31:05 -08:00
Igor Babaev
fd7059d208 Fixed the following problem: the syntax of the ANALYZE command did not
returned an error if the list of the specified index names contained
the name 'primary'.
2012-08-18 22:18:46 -07:00
Igor Babaev
cb0a5c84b6 Made the output of the newly added test cases from statistics.test
platform independent.

Adjusted results of funcs_1.is_columns_mysql_embedded.
2012-07-10 22:12:23 -07:00
Igor Babaev
47fae7f08f Added procedures to delete records by keys from statistical tables.
Now when a table is dropped the statistics on the table is removed 
from the statistical tables. If the table is altered in such a way
that a column is dropped or the type of the column is changed then
statistics on the column is removed from the table column_stat.
It also triggers removal of the statistics on the indexes who use
this column as its component.

Added procedures that changes the names of the tables or columns
in the statistical tables for. 
These procedures are used when tables/columns are renamed.

Also partly re-factored the code that introduced the persistent
statistical tables.

Added test cases into statistics.test to cover the new code.
2012-07-10 16:34:39 -07:00
Igor Babaev
4ff6fd34da Changed the type of all double columns in the system statistical tables
mysql.column_stat, mysql.table_stat for the type DECIMAL(12,4).
When cached the values from these columns are multiplied by factor 10^5
and stored as ulong numbers now.
2012-06-25 22:33:07 -07:00
Igor Babaev
f549f495f7 Removed the server option --stat-tables.
Renamed the system variable optimizer_use_stat_tables to use_stat_tables.
This variable now has only 3 possible values:
'never', 'complementary', 'preferably'.
If the server has been launched with
--use-stat-tables='complementary'|'preferably'
then the statictics tables can be employed by the optimizer and by the
ANALYZE command.
2012-06-02 17:19:01 -07:00
Igor Babaev
055477ae52 Support of the extended syntax for ANALYZE. 2012-05-22 20:55:07 -07:00
Igor Babaev
2a1afc29f2 Inverted the option --skip-stat-tables for --stat-tables.
Set it to 0 by default.
Now only the tests that use persistent statistics tables require
starting the server with --stat-tables set on.
2012-05-08 16:42:55 -07:00
Igor Babaev
d0dc6e07f6 Made statistics.test platform independent. 2012-01-07 00:34:30 -08:00
Igor Babaev
7895f510a4 In statistics.test:
Saved at the very beginning and restored at the very end
the value of optimizer_use_stat_tables.
2012-01-04 18:32:21 -08:00
Igor Babaev
e8497370b9 The main patch for the MWL#248 back-ported from
lp:~igorb-seattle/mysql-server/mysql-azalea-wl4777.
2012-01-04 17:51:53 -08:00