fix ZRANK (realize that rank is 1-based due to the skip list header)

This commit is contained in:
Pieter Noordhuis
2010-03-04 01:33:37 +01:00
parent 3919155375
commit 67cac14343
2 changed files with 7 additions and 4 deletions

View File

@ -1545,7 +1545,7 @@ proc main {server port} {
set ele [lindex [$r zrange myzset $index $index] 0]
set rank [$r zrank myzset $ele]
if {$rank != $index} {
set err "$ele RANK is wrong! ($rank != [expr $index+1])"
set err "$ele RANK is wrong! ($rank != $index)"
break
}
}