1. 18 7月, 2013 1 次提交
  2. 17 7月, 2013 1 次提交
  3. 16 7月, 2013 3 次提交
    • A
      Fixed typo in rio.h, simgle -> single. · 2e449d42
      antirez 提交于
      2e449d42
    • Y
    • A
      Make sure that ZADD can accept the full range of double values. · 112e7636
      antirez 提交于
      This fixes issue #1194, that contains many details.
      
      However in short, it was possible for ZADD to not accept as score values
      that was however possible to obtain with multiple calls to ZINCRBY, like
      in the following example:
      
      redis 127.0.0.1:6379> zadd k 2.5e-308 m
      (integer) 1
      redis 127.0.0.1:6379> zincrby k -2.4e-308 m
      "9.9999999999999694e-310"
      redis 127.0.0.1:6379> zscore k m
      "9.9999999999999694e-310"
      redis 127.0.0.1:6379> zadd k 9.9999999999999694e-310 m1
      (error) ERR value is not a valid float
      
      The problem was due to strtod() returning ERANGE in the following case
      specified by POSIX:
      
      "If the correct value would cause an underflow, a value whose magnitude
      is no greater than the smallest normalized positive number in the return
      type shall be returned and errno set to [ERANGE].".
      
      Now instead the returned value is accepted even when ERANGE is returned
      as long as the return value of the function is not negative or positive
      HUGE_VAL or zero.
      112e7636
  4. 13 7月, 2013 1 次提交
  5. 12 7月, 2013 4 次提交
    • A
      Use the environment locale for strcoll() collation. · 98757b4a
      antirez 提交于
      98757b4a
    • 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
  6. 11 7月, 2013 30 次提交