diff options
author | sergefp@mysql.com <> | 2005-09-21 21:36:15 +0400 |
---|---|---|
committer | sergefp@mysql.com <> | 2005-09-21 21:36:15 +0400 |
commit | 7aca974fc851400aa52d97d6fa1e4f50f3b40d9c (patch) | |
tree | dd26e7b03cdfca2dfb2b321b628e267396d5f5e2 /mysql-test/r/range.result | |
parent | 468610635b535a0d750cee46f27c4e320f17b84f (diff) | |
download | mariadb-git-7aca974fc851400aa52d97d6fa1e4f50f3b40d9c.tar.gz |
Fix for BUG#13317: Make range optimizer able to produce ranges for "view.field IN (c1,c2)"
and "view.field BETWEEN c1 AND c2"
Diffstat (limited to 'mysql-test/r/range.result')
-rw-r--r-- | mysql-test/r/range.result | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index f490c2e1383..6adbea973df 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -768,3 +768,22 @@ SELECT * FROM t1; a 2 DROP TABLE t1; +create table t1 (a int, b int, primary key(a,b)); +create view v1 as select a, b from t1; +INSERT INTO `t1` VALUES +(0,0),(1,0),(2,0),(3,0),(4,0),(5,1),(6,1),(7,1),(8,1),(9,1),(10,2),(11,2),(12,2) +,(13,2),(14,2),(15,3),(16,3),(17,3),(18,3),(19,3); +explain select * from t1 where a in (3,4) and b in (1,2,3); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index +explain select * from v1 where a in (3,4) and b in (1,2,3); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index +explain select * from t1 where a between 3 and 4 and b between 1 and 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index +explain select * from v1 where a between 3 and 4 and b between 1 and 2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index +drop view v1; +drop table t1; |