• Ozan Tezcan's avatar
    Fix hscan return value (#13297) · 6a11d458
    Ozan Tezcan authored
    In the last step of hscan, while replying to client, we assume all items
    in the result list are keys which are mstr instances. Though, there 
    might be values which are sds instances. 
    
    Added a check to avoid calling mstrlen() for value objects.
    
    To reproduce:
    ```
    127.0.0.1:6379> hset myhash1 a 11111111111111111111111111111111111111111111111111111111111111111
    (integer) 0
    127.0.0.1:6379> hscan myhash1 0
    1) "0"
    2) 1) "a"
       2) "11111111111111111111111111111111111111111111111111111111111111111\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
    ```
    6a11d458
scan.tcl 14.2 KB