summaryrefslogtreecommitdiff
path: root/mysql-test/t/statistics.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/statistics.test')
-rw-r--r--mysql-test/t/statistics.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/t/statistics.test b/mysql-test/t/statistics.test
index 3f08e2e133c..0463885e41a 100644
--- a/mysql-test/t/statistics.test
+++ b/mysql-test/t/statistics.test
@@ -730,6 +730,25 @@ select db_name, table_name, column_name,
drop table t1;
--echo #
+--echo # MDEB-9744: session optimizer_use_condition_selectivity=5 causing SQL Error (1918):
+--echo # Encountered illegal value '' when converting to DECIMAL
+--echo #
+
+set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
+set optimizer_use_condition_selectivity=3, use_stat_tables=preferably;
+
+create table t1 (id int(10),cost decimal(9,2)) engine=innodb;
+ANALYZE TABLE t1 PERSISTENT FOR ALL;
+
+create temporary table t2 (id int);
+insert into t2 (id) select id from t1 where cost > 0;
+select * from t2;
+
+set use_stat_tables=@save_use_stat_tables;
+set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
+drop table t1,t2;
+
+--echo #
--echo # MDEV-9590: Always print "Engine-independent statistic" warnings and
--echo # might be filtering columns unintentionally from engines
--echo #