1. 12 7月, 2013 3 次提交
    • A
      SORT ALPHA: use collation instead of binary comparison. · 18fabeb2
      antirez 提交于
      Note that we only do it when STORE is not used, otherwise we want an
      absolutely locale independent and binary safe sorting in order to ensure
      AOF / replication consistency.
      
      This is probably an unexpected behavior violating the least surprise
      rule, but there is currently no other simple / good alternative.
      18fabeb2
    • A
      Fixed compareStringObject() and introduced collateStringObject(). · d8fcbb66
      antirez 提交于
      compareStringObject was not always giving the same result when comparing
      two exact strings, but encoded as integers or as sds strings, since it
      switched to strcmp() when at least one of the strings were not sds
      encoded.
      
      For instance the two strings "123" and "123\x00456", where the first
      string was integer encoded, would result into the old implementation of
      compareStringObject() to return 0 as if the strings were equal, while
      instead the second string is "greater" than the first in a binary
      comparison.
      
      The same compasion, but with "123" encoded as sds string, would instead
      return a value < 0, as it is correct. It is not impossible that the
      above caused some obscure bug, since the comparison was not always
      deterministic, and compareStringObject() is used in the implementation
      of skiplists, hash tables, and so forth.
      
      At the same time, collateStringObject() was introduced by this commit, so
      that can be used by SORT command to return sorted strings usign
      collation instead of binary comparison. See next commit.
      d8fcbb66
    • J
      Wrap IPv6 in brackets in the prompt. · 1bcbb7a9
      Jan-Erik Rediger 提交于
      1bcbb7a9
  2. 11 7月, 2013 33 次提交
  3. 08 7月, 2013 4 次提交