1. 12 Jul, 2013 1 commit
    • antirez's avatar
      Fixed compareStringObject() and introduced collateStringObject(). · 81e55ec0
      antirez authored
      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.
      81e55ec0
  2. 28 Jan, 2013 2 commits
  3. 19 Jan, 2013 1 commit
  4. 08 Nov, 2012 1 commit
  5. 02 Apr, 2012 1 commit
  6. 27 Mar, 2012 1 commit
  7. 22 Mar, 2012 2 commits
  8. 03 Jan, 2012 1 commit
  9. 14 Nov, 2011 1 commit
  10. 12 Nov, 2011 1 commit
  11. 08 Nov, 2011 1 commit
  12. 04 Oct, 2011 1 commit
  13. 13 Jul, 2011 1 commit
  14. 25 Jun, 2011 1 commit
  15. 03 Jun, 2011 1 commit
  16. 05 May, 2011 1 commit
  17. 06 Apr, 2011 3 commits
  18. 08 Mar, 2011 2 commits
  19. 01 Jan, 2011 1 commit
  20. 30 Dec, 2010 1 commit
  21. 29 Dec, 2010 1 commit
  22. 28 Dec, 2010 1 commit
  23. 04 Nov, 2010 1 commit
  24. 15 Oct, 2010 1 commit
  25. 14 Oct, 2010 2 commits
  26. 02 Sep, 2010 2 commits
  27. 30 Aug, 2010 1 commit
  28. 26 Aug, 2010 1 commit
  29. 23 Aug, 2010 1 commit
  30. 20 Aug, 2010 1 commit
  31. 29 Jul, 2010 1 commit
  32. 22 Jul, 2010 2 commits