summaryrefslogtreecommitdiff
path: root/mysql-test/r/selectivity_innodb.result
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2014-10-06 15:29:22 +0400
committerSergey Petrunya <psergey@askmonty.org>2014-10-06 15:29:22 +0400
commitfd4c9af3987814e0e13f429c900ea0256a435cbe (patch)
tree49864d7aa239cf0a46a121b0d1415b8f790f747b /mysql-test/r/selectivity_innodb.result
parent689ffe3559a4b7bacd13503ba93659b2f4560bbb (diff)
downloadmariadb-git-fd4c9af3987814e0e13f429c900ea0256a435cbe.tar.gz
MDEV-6442: Assertion `join->best_read < double(...)' failed with optimizer_use_condition_selectivity >=3
- Fix the crash by making get_column_range_cardinality() to handle the special case where Column_stats objects is an all-zeros object (the question of what is the point of having Field::read_stats point to such object remains a mystery) - Added a few comments. Learning the code still.
Diffstat (limited to 'mysql-test/r/selectivity_innodb.result')
-rw-r--r--mysql-test/r/selectivity_innodb.result20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/selectivity_innodb.result b/mysql-test/r/selectivity_innodb.result
index 96eedc0b415..0dc678f0c0d 100644
--- a/mysql-test/r/selectivity_innodb.result
+++ b/mysql-test/r/selectivity_innodb.result
@@ -1358,6 +1358,8 @@ set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivit
DROP TABLE t1,t2;
set use_stat_tables=@save_use_stat_tables;
set optimizer_switch=@save_optimizer_switch_for_selectivity_test;
+set @tmp_ust= @@use_stat_tables;
+set @tmp_oucs= @@optimizer_use_condition_selectivity;
#
# MDEV-6808: MariaDB 10.0.13 crash with optimizer_use_condition_selectivity > 1
#
@@ -1393,4 +1395,22 @@ t2.subject_type in ('user')
repost_id subject_type subject_id object_type object_id is_private event_id
DROP TABLE t1, t2;
set optimizer_use_condition_selectivity=@tmp_mdev6808;
+#
+# MDEV-6442: Assertion `join->best_read < double(...)' failed with optimizer_use_condition_selectivity >=3, ...
+#
+SET use_stat_tables = PREFERABLY;
+SET optimizer_use_condition_selectivity = 3;
+CREATE TABLE t1 ( a VARCHAR(3), b VARCHAR(8), KEY (a,b) ) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('USA','Chinese'),('USA','English');
+CREATE TABLE t2 (i INT) ENGINE=InnoDB;
+SELECT * FROM t1, t2 WHERE ( 't', 'o' ) IN (
+SELECT t1_2.b, t1_1.a FROM t1 AS t1_1 STRAIGHT_JOIN t1 AS t1_2 ON ( t1_2.a = t1_1.b )
+);
+a b i
+DROP TABLE t1,t2;
+#
+# End of 10.0 tests
+#
+set use_stat_tables= @tmp_ust;
+set optimizer_use_condition_selectivity= @tmp_oucs;
SET SESSION STORAGE_ENGINE=DEFAULT;