summaryrefslogtreecommitdiff
path: root/mysql-test/r/myisam_mrr.result
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2010-11-08 20:37:01 +0300
committerSergey Petrunya <psergey@askmonty.org>2010-11-08 20:37:01 +0300
commit0fb342ba566c0fe65ec62593b7ef254ae53e44bd (patch)
treea501aa3f01e98ce14f7a7d4d4e5d605e0173bb64 /mysql-test/r/myisam_mrr.result
parent197c99427dc0119c6d24072faefaeb614a02e350 (diff)
downloadmariadb-git-0fb342ba566c0fe65ec62593b7ef254ae53e44bd.tar.gz
BUG#670417: Diverging results in maria-5.3-mwl128-dsmrr-cpk with join buffer, attempt 4
- Disable identical key handling optimization when IndexConditionPushdown is used
Diffstat (limited to 'mysql-test/r/myisam_mrr.result')
-rw-r--r--mysql-test/r/myisam_mrr.result45
1 files changed, 45 insertions, 0 deletions
diff --git a/mysql-test/r/myisam_mrr.result b/mysql-test/r/myisam_mrr.result
index 467a643571b..8befb17e5ac 100644
--- a/mysql-test/r/myisam_mrr.result
+++ b/mysql-test/r/myisam_mrr.result
@@ -462,3 +462,48 @@ FROM t1
WHERE `key1` LIKE CONCAT( LEFT( '1' , 7 ) , '%' )
ORDER BY col1 LIMIT 7;
drop table t0, t1, t2;
+#
+# BUG#670417: Diverging results in maria-5.3-mwl128-dsmrr-cpk with join buffer (incremental, BKA join)
+#
+set @save_join_cache_level = @@join_cache_level;
+set join_cache_level = 6;
+set @save_join_buffer_size=@@join_buffer_size;
+set join_buffer_size = 136;
+CREATE TABLE t1 (
+pk int(11) NOT NULL AUTO_INCREMENT,
+col_int_key int(11) NOT NULL,
+col_varchar_key varchar(1) NOT NULL,
+col_varchar_nokey varchar(1) NOT NULL,
+PRIMARY KEY (pk),
+KEY col_varchar_key (col_varchar_key,col_int_key)
+);
+INSERT INTO t1 VALUES
+(10,8,'v','v'),(11,8,'f','f'), (12,5,'v','v'),
+(13,8,'s','s'),(14,8,'a','a'),(15,6,'p','p'),
+(16,7,'z','z'),(17,2,'a','a'),(18,5,'h','h'),
+(19,7,'h','h'),(20,2,'v','v'),(21,9,'v','v'),
+(22,142,'b','b'),(23,3,'y','y'),(24,0,'v','v'),
+(25,3,'m','m'),(26,5,'z','z'),(27,9,'n','n'),
+(28,1,'d','d'),(29,107,'a','a');
+SELECT COUNT(*)
+FROM
+t1 AS table2, t1 AS table3
+where
+table3.col_varchar_key = table2.col_varchar_key AND
+table3.col_varchar_key = table2.col_varchar_nokey AND
+table3.pk<>0;
+COUNT(*)
+50
+EXPLAIN SELECT COUNT(*)
+FROM
+t1 AS table2, t1 AS table3
+where
+table3.col_varchar_key = table2.col_varchar_key AND
+table3.col_varchar_key = table2.col_varchar_nokey AND
+table3.pk<>0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE table2 ALL col_varchar_key NULL NULL NULL 20 Using where
+1 SIMPLE table3 ref PRIMARY,col_varchar_key col_varchar_key 3 test.table2.col_varchar_key 3 Using index condition(BKA); Using where; Using join buffer (flat, BKA join)
+set join_cache_level= @save_join_cache_level;
+set join_buffer_size= @save_join_buffer_size;
+drop table t1;