diff options
author | unknown <sergefp@pylon.mylan> | 2006-09-19 21:14:37 +0400 |
---|---|---|
committer | unknown <sergefp@pylon.mylan> | 2006-09-19 21:14:37 +0400 |
commit | d752b1a8da85f1d0ddc5b5e3e5bbe056e0e647e6 (patch) | |
tree | 986cdf8c6826c347038b7a850faba880076f6092 /mysql-test/t/range.test | |
parent | 86b4ca8480f3e0fea1720e4a84d4bf42294e46ce (diff) | |
parent | 5e34af32406bc9274dc6e58530f0272e2671e409 (diff) | |
download | mariadb-git-d752b1a8da85f1d0ddc5b5e3e5bbe056e0e647e6.tar.gz |
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into mysql.com:/home/psergey/mysql-5.1-bug22393
mysql-test/t/range.test:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/range.result:
Manual merge
Diffstat (limited to 'mysql-test/t/range.test')
-rw-r--r-- | mysql-test/t/range.test | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test index 89508f468a7..1a80234e485 100644 --- a/mysql-test/t/range.test +++ b/mysql-test/t/range.test @@ -740,3 +740,30 @@ SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-02 00:00:00'; DROP TABLE t1; # End of 5.0 tests + +# BUG#22393 fix: Adjust 'ref' estimate if we have 'range' estimate for +# a smaller scan interval +create table t1 (a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +create table t2 (a int, b int, filler char(100)); +insert into t2 select A.a + 10 * (B.a + 10 * C.a), 10, 'filler' from t1 A, +t1 B, t1 C where A.a < 5; + +insert into t2 select 1000, b, 'filler' from t2; +alter table t2 add index (a,b); +# t2 values +# ( 1 , 10, 'filler') +# ( 2 , 10, 'filler') +# ( 3 , 10, 'filler') +# (... , 10, 'filler') +# ... +# (1000, 10, 'filler') - 500 times + +# 500 rows, 1 row + +select 'In following EXPLAIN the access method should be ref, #rows~=500 (and not 2)' Z; +explain select * from t2 where a=1000 and b<11; + +drop table t1, t2; + |