Hi, I see strange behaviour of search_near() function after switching on 2.9.0, output of attached test builded with 2.9.0:
$ LD_LIBRARY_PATH=wt_290/.libs/ ./search_near key = 10, search_near_key = 1, exact = -1, expected_exact = 1 key = 15, search_near_key = 11, exact = -1, expected_exact = 1 key = 15, search_near_key = 15, exact = 0, expected_exact = 0 key = 20, search_near_key = 19, exact = -1, expected_exact = 1 cursor->search_near(cursor, &exact) at (search_near.c:57) failed: WT_NOTFOUND: item not found [-31803]
with 2.8.0:
$ LD_LIBRARY_PATH=wt_280/.libs/ ./search_near key = 10, search_near_key = 1, exact = 1, expected_exact = 1 key = 15, search_near_key = 11, exact = 1, expected_exact = 1 key = 15, search_near_key = 15, exact = 1, expected_exact = 0 key = 20, search_near_key = 19, exact = 1, expected_exact = 1 key = 20, search_near_key = 21, exact = -1, expected_exact = -1
I once again checked function documentation, it seems attached test should works. Also strange that for 2.8.0 in my test exact = 1 when it should be 0:
key = 15, search_near_key = 15, exact = 1, expected_exact = 0
Can you please have a look, probably I missing something?
- is duplicated by
-
WT-3135 search_near() for index with custom collator
- Closed