diff options
author | Igor Babaev <igor@askmonty.org> | 2013-04-05 23:48:49 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-04-05 23:48:49 -0700 |
commit | 1ae352afbe40a71f26cec2da0f08eefdef05f41f (patch) | |
tree | e3bd1f7a38f6911c1c95d9271908771a4ab0fe11 /mysql-test/t/statistics.test | |
parent | 503731d80f732a3a790443cc530fea2c3721b869 (diff) | |
download | mariadb-git-1ae352afbe40a71f26cec2da0f08eefdef05f41f.tar.gz |
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.
Diffstat (limited to 'mysql-test/t/statistics.test')
-rw-r--r-- | mysql-test/t/statistics.test | 53 |
1 files changed, 50 insertions, 3 deletions
diff --git a/mysql-test/t/statistics.test b/mysql-test/t/statistics.test index 2488e511bab..4d11e11f033 100644 --- a/mysql-test/t/statistics.test +++ b/mysql-test/t/statistics.test @@ -174,7 +174,7 @@ ANALYZE TABLE t1; SELECT db_name, table_name, column_name, min_value, max_value, nulls_ratio, avg_frequency, - hist_size, HEX(histogram) + hist_size, hist_type, HEX(histogram) FROM mysql.column_stats; DELETE FROM mysql.column_stats; @@ -186,7 +186,7 @@ ANALYZE TABLE t1; SELECT db_name, table_name, column_name, min_value, max_value, nulls_ratio, avg_frequency, - hist_size, HEX(histogram) + hist_size, hist_type, HEX(histogram) FROM mysql.column_stats; DELETE FROM mysql.column_stats; @@ -590,6 +590,53 @@ DELETE FROM mysql.table_stats; DELETE FROM mysql.column_stats; DELETE FROM mysql.index_stats; +--echo # +--echo # Bug mdev-4357: empty string as a value of the HIST_SIZE column +--echo # from mysql.column_stats +--echo # + +create table t1 (a int); +insert into t1 values (1),(2),(3); + +set histogram_size=10; + +analyze table t1 persistent for all; + +select db_name, table_name, column_name, + min_value, max_value, + nulls_ratio, avg_frequency, + hist_size, hist_type, HEX(histogram) + FROM mysql.column_stats; + +set histogram_size=default; + +drop table t1; + +--echo # +--echo # Bug mdev-4359: wrong setting of the HIST_SIZE column +--echo # (see also mdev-4357) from mysql.column_stats +--echo # + +create table t1 ( a int); +insert into t1 values (1),(2),(3),(4),(5); + +set histogram_size=10; +set histogram_type='double_prec_hb'; + +show variables like 'histogram%'; + +analyze table t1 persistent for all; + +select db_name, table_name, column_name, + min_value, max_value, + nulls_ratio, avg_frequency, + hist_size, hist_type, HEX(histogram) + FROM mysql.column_stats; + +set histogram_size=default; +set histogram_type=default; + +drop table t1; + set use_stat_tables=@save_use_stat_tables; -
\ No newline at end of file |