summaryrefslogtreecommitdiff
path: root/mysql-test/r/range.result
diff options
context:
space:
mode:
authormonty@narttu.mysql.fi <>2003-08-29 13:44:35 +0300
committermonty@narttu.mysql.fi <>2003-08-29 13:44:35 +0300
commit77a70a0a24ce658a3ee55248cb2e76f84afc1b88 (patch)
treeaeb2314adbd714c7e2b032209bfd7914e3cfda3d /mysql-test/r/range.result
parent6cad89775b4ed78c02c2fa9f3e49181f63b7fb65 (diff)
parent5e04e2370f05bc42437f8be476eba9e204888b65 (diff)
downloadmariadb-git-77a70a0a24ce658a3ee55248cb2e76f84afc1b88.tar.gz
merge with 4.0.15
Diffstat (limited to 'mysql-test/r/range.result')
-rw-r--r--mysql-test/r/range.result28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result
index 247221a92f3..86203fb6786 100644
--- a/mysql-test/r/range.result
+++ b/mysql-test/r/range.result
@@ -226,3 +226,31 @@ insert into t1 values (0,1,NULL,"aaa"), (1,1,NULL,"aaa"), (2,1,NULL,"aaa"),
select a.id1, b.idnull from t1 as a, t1 as b where a.id2=1 and a.id1=1 and b.id1=a.idnull order by b.id2 desc limit 1;
id1 idnull
drop table t1;
+create table t1 (x int, y int, index(x), index(y));
+insert into t1 (x) values (1),(2),(3),(4),(5),(6),(7),(8),(9);
+update t1 set y=x;
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x between 7 and t1.y+0;
+table type possible_keys key key_len ref rows Extra
+t1 ref y y 5 const 1 Using where
+t2 range x x 5 NULL 4 Using where
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 7 and t2.x <= t1.y+0;
+table type possible_keys key key_len ref rows Extra
+t1 ref y y 5 const 1 Using where
+t2 range x x 5 NULL 4 Using where
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x between t1.y-1 and t1.y+1;
+table type possible_keys key key_len ref rows Extra
+t1 ref y y 5 const 1 Using where
+t2 ALL x NULL NULL NULL 9 Range checked for each record (index map: 1)
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= t1.y-1 and t2.x <= t1.y+1;
+table type possible_keys key key_len ref rows Extra
+t1 ref y y 5 const 1 Using where
+t2 ALL x NULL NULL NULL 9 Range checked for each record (index map: 1)
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x between 0 and t1.y;
+table type possible_keys key key_len ref rows Extra
+t1 ref y y 5 const 1 Using where
+t2 ALL x NULL NULL NULL 9 Using where
+explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 0 and t2.x <= t1.y;
+table type possible_keys key key_len ref rows Extra
+t1 ref y y 5 const 1 Using where
+t2 range x x 5 NULL 2 Using where
+drop table t1;