diff options
author | unknown <pekka@mysql.com> | 2004-12-20 15:12:42 +0100 |
---|---|---|
committer | unknown <pekka@mysql.com> | 2004-12-20 15:12:42 +0100 |
commit | 5259a1cbce556ada0a4ba0cbdfc7db3bcc3d8f51 (patch) | |
tree | 04032ab23b65508ca2e1e162b122052a06269bb4 /mysql-test/t/ndb_index_ordered.test | |
parent | 2dab2c1e6629384dfb13ff2d25ae8e80dfdaad9b (diff) | |
download | mariadb-git-5259a1cbce556ada0a4ba0cbdfc7db3bcc3d8f51.tar.gz |
ndb: wl-1893: range scanning backwards, handler
mysql-test/ndb/ndb_range_bounds.pl:
test ordered scan
mysql-test/r/ndb_index_ordered.result:
test ordered scan
mysql-test/t/ndb_index_ordered.test:
test ordered scan
sql/ha_ndbcluster.cc:
wl-1893: range scanning backwards, handler
sql/ha_ndbcluster.h:
wl-1893: range scanning backwards, handler
Diffstat (limited to 'mysql-test/t/ndb_index_ordered.test')
-rw-r--r-- | mysql-test/t/ndb_index_ordered.test | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/t/ndb_index_ordered.test b/mysql-test/t/ndb_index_ordered.test index 53177511bc6..783ce99e739 100644 --- a/mysql-test/t/ndb_index_ordered.test +++ b/mysql-test/t/ndb_index_ordered.test @@ -148,6 +148,35 @@ select * from t1 use index (bc) where b IS NOT NULL order by a; drop table t1; # +# Order by again, including descending. +# + +create table t1 ( + a int unsigned primary key, + b int unsigned, + c char(10), + key bc (b, c) +) engine=ndb; + +insert into t1 values(1,1,'a'),(2,2,'b'),(3,3,'c'),(4,4,'d'),(5,5,'e'); +insert into t1 select a*7,10*b,'f' from t1; +insert into t1 select a*13,10*b,'g' from t1; +insert into t1 select a*17,10*b,'h' from t1; +insert into t1 select a*19,10*b,'i' from t1; +insert into t1 select a*23,10*b,'j' from t1; +insert into t1 select a*29,10*b,'k' from t1; +# +select b, c from t1 where b <= 10 and c <'f' order by b, c; +select b, c from t1 where b <= 10 and c <'f' order by b desc, c desc; +# +select b, c from t1 where b=4000 and c<'k' order by b, c; +select b, c from t1 where b=4000 and c<'k' order by b desc, c desc; +select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b, c; +select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b desc, c desc; +# +select min(b), max(b) from t1; + +# # Bug #6435 CREATE TABLE test1 ( SubscrID int(11) NOT NULL auto_increment, |