summaryrefslogtreecommitdiff
path: root/mysql-test/main/stat_tables.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-09-23 10:25:34 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-09-23 10:25:34 +0300
commitc016ea660ede8b7ff75f8ca65f73e2958262263a (patch)
treec8bc8579c738792f0769ea70f49348dc1baf51b3 /mysql-test/main/stat_tables.test
parent1bbe8c5e0f6823acd4780d7563e8c02f8b4c5a01 (diff)
parent2931fd2917cc130e34e5f3d9d6c571a2b013e49c (diff)
downloadmariadb-git-c016ea660ede8b7ff75f8ca65f73e2958262263a.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'mysql-test/main/stat_tables.test')
-rw-r--r--mysql-test/main/stat_tables.test27
1 files changed, 25 insertions, 2 deletions
diff --git a/mysql-test/main/stat_tables.test b/mysql-test/main/stat_tables.test
index 4c49df82ca6..4c21e21ea70 100644
--- a/mysql-test/main/stat_tables.test
+++ b/mysql-test/main/stat_tables.test
@@ -540,10 +540,33 @@ analyze table t1;
update mysql.column_stats set min_value='2004-0-31123' where db_name='test' and table_name='t1';
select min_value from mysql.column_stats where db_name='test' and table_name='t1';
select * from t1;
-drop table t1;
-
set @@sql_mode= @save_sql_mode;
set use_stat_tables=@save_use_stat_tables;
set @@histogram_size= @save_histogram_size;
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
+drop table t1;
+
+--echo #
+--echo # MDEV-20589: Server still crashes in Field::set_warning_truncated_wrong_value
+--echo #
+
+set names utf8;
+create table t1 ( a varchar(255) character set utf8);
+insert into t1 values (REPEAT('ӥ',255)), (REPEAT('ç',255));
+
+set use_stat_tables='preferably';
+analyze table t1 persistent for all;
+
+set @save_sql_mode= @@sql_mode;
+set sql_mode='ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
+update mysql.column_stats set min_value= REPEAT('ӥ',256) where db_name='test' and table_name='t1';
+set @@sql_mode= @save_sql_mode;
+
+select length(a) from t1 where a=REPEAT('ӥ',255);
+
+set names latin1;
+set @@use_stat_tables=@save_use_stat_tables;
+drop table t1;
+
+--echo # please keep this at the last
set @@global.histogram_size=@save_histogram_size;