diff options
author | unknown <ram@mysql.r18.ru> | 2003-09-02 21:09:28 +0500 |
---|---|---|
committer | unknown <ram@mysql.r18.ru> | 2003-09-02 21:09:28 +0500 |
commit | e1af4a65dcfd53db807bf08fb4f06a465073cb57 (patch) | |
tree | 64dd3eb7aacee6048ce2101a1dcda308b5ed9dfd /mysql-test | |
parent | d63ce665c7dc2e0308950267eee7059c7f1b3ce5 (diff) | |
download | mariadb-git-e1af4a65dcfd53db807bf08fb4f06a465073cb57.tar.gz |
Fix for the bug #971: ORDER BY DESC doesn't return correct num of rows with BDB and an indexed column.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/bdb.result | 31 | ||||
-rw-r--r-- | mysql-test/t/bdb.test | 13 |
2 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index eb97d19136d..ebc2866183c 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -1123,3 +1123,34 @@ a b select * from t2; a b drop table t1,t2; +create table t1 (x int not null, index(x)) type=bdb; +insert into t1 values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); +select * from t1 where x <= 10 and x >= 7; +x +7 +8 +9 +10 +select * from t1 where x <= 10 and x >= 7 order by x; +x +7 +8 +9 +10 +select * from t1 where x <= 10 and x >= 7 order by x desc; +x +10 +9 +8 +7 +select * from t1 where x <= 8 and x >= 5 order by x desc; +x +8 +7 +6 +5 +select * from t1 where x < 8 and x > 5 order by x desc; +x +7 +6 +drop table t1; diff --git a/mysql-test/t/bdb.test b/mysql-test/t/bdb.test index 608d4bf5042..d0cc63a9389 100644 --- a/mysql-test/t/bdb.test +++ b/mysql-test/t/bdb.test @@ -783,3 +783,16 @@ select * from t1; select * from t2; select * from t2; drop table t1,t2; + +# +# The bug #971 +# + +create table t1 (x int not null, index(x)) type=bdb; +insert into t1 values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); +select * from t1 where x <= 10 and x >= 7; +select * from t1 where x <= 10 and x >= 7 order by x; +select * from t1 where x <= 10 and x >= 7 order by x desc; +select * from t1 where x <= 8 and x >= 5 order by x desc; +select * from t1 where x < 8 and x > 5 order by x desc; +drop table t1; |