diff options
Diffstat (limited to 'storage/rocksdb/mysql-test/rocksdb/t/iterator_bounds.test')
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb/t/iterator_bounds.test | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/iterator_bounds.test b/storage/rocksdb/mysql-test/rocksdb/t/iterator_bounds.test new file mode 100644 index 00000000000..2cced2a1d7a --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb/t/iterator_bounds.test @@ -0,0 +1,29 @@ +# +# Issue #878: Descending scans from reverse column families return no results +# due to iterator bounds +# + +create table t (i int primary key) engine=rocksdb; + +let $cond=1; +while ($cond) +{ + --disable_query_log + truncate table t; + --enable_query_log + let $cond=`select RIGHT(HEX(index_number), 2) != "FD" from information_schema.rocksdb_ddl where table_name = 't'`; +} + +# Index id is now at FD. Create a table with primary and secondary key, so +# that the secondary key index id ends in 0xFF. + +drop table t; +create table t (i int primary key, j int, key(j) comment 'rev:bf5_2') engine=rocksdb; +select RIGHT(HEX(index_number), 2) from information_schema.rocksdb_ddl where table_name = 't'; + +insert into t values (1, 1); + +select j from t order by j asc; +select j from t order by j desc; + +drop table t; |