summaryrefslogtreecommitdiff
path: root/mysql-test/t/statistics.test
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2015-11-09 17:58:35 +0300
committerSergei Petrunia <psergey@askmonty.org>2015-11-09 17:58:35 +0300
commit9f862ce026c9102695f01aaa3090d5e99ffd80a1 (patch)
treefcc061b69fd99f382ff5831eb54275ac4b7cd090 /mysql-test/t/statistics.test
parent1694d813997198e86f6a8aa6aefffb687c9992dd (diff)
downloadmariadb-git-9f862ce026c9102695f01aaa3090d5e99ffd80a1.tar.gz
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
Diffstat (limited to 'mysql-test/t/statistics.test')
-rw-r--r--mysql-test/t/statistics.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/t/statistics.test b/mysql-test/t/statistics.test
index 36e2c5a77bd..2c8dec307cc 100644
--- a/mysql-test/t/statistics.test
+++ b/mysql-test/t/statistics.test
@@ -701,3 +701,19 @@ drop table t1, t2;
set use_stat_tables=@save_use_stat_tables;
+--echo #
+--echo # Bug MDEV-7383: min/max value for a column not utf8 compatible
+--echo #
+
+create table t1 (a varchar(100)) engine=MyISAM;
+insert into t1 values(unhex('D879626AF872675F73E662F8'));
+analyze table t1 persistent for all;
+show warnings;
+
+select db_name, table_name, column_name,
+ HEX(min_value), HEX(max_value),
+ nulls_ratio, avg_frequency,
+ hist_size, hist_type, HEX(histogram)
+ FROM mysql.column_stats;
+
+drop table t1;