b0a2093956
Fixed issue #516 (ZINTERSTORE mixing sets and zsets).
...
Weeks ago trying to fix an harmless GCC warning I introduced a bug in
the ziplist-encoded implementations of sorted sets.
The bug completely broke zuiNext() iterator, that is used in the
ZINTERSTORE and ZUNIONSTORE implementation, so those two commands are no
longer reliable starting from Redis version 2.4.12 and latest 2.6.0-RC
releases.
This commit fixes the problem and adds a regression test.
2012-05-23 11:08:33 +02:00
63bae7c553
A few compiler warnings suppressed.
2012-04-29 17:20:56 +02:00
f1654434de
zzlIsInRange() now is capable of handling empty sorted sets that may end inside the data set when loading very old RDB files produced by early-stage versions of Redis.
2012-02-22 09:52:39 +01:00
68897a5bbe
bzero -> memset
2012-02-21 10:07:06 +01:00
d0f37e247c
error in comment fixed
2012-01-11 20:25:41 +01:00
0692d060b3
Prevent NaN scores in sorted sets resulting from calls to ZUNIONSTORE and ZINTERSTORE.
2011-12-23 09:28:51 +01:00
61e44f614d
added assertion in zslInsert() that ensures the inserted element score is not NaN
2011-12-18 11:13:13 +01:00
19453556d4
dataspace change hook functions backported to 2.4. They are just wrappers at this point but this makes simpler to cherry-pick between branches.
2011-07-12 09:56:41 +02:00
ac1eda60b0
Fixed warning on Linux
2011-06-01 18:06:30 +02:00
cd7a497164
revert ZADD implementation to 2.4 WATCH API.
2011-05-31 20:40:24 +02:00
45df42c9fe
Variadic ZADD
2011-05-31 20:37:08 +02:00
6e326c81dc
prepare to cherry pick variadic ZADD without conflicts
2011-05-31 20:36:17 +02:00
913090ec63
Variadic ZREM
2011-05-31 20:33:47 +02:00
7dd1e95288
Fixed typo in comment
2011-05-24 10:35:48 +02:00
10e4b58312
Fix for ZUNIONSTORE bug when there is an empty set among input sets. Regression test added.
2011-05-19 17:59:13 +02:00
de6ba77bc4
Fixed misuse of the new iterator semantics in ZUNIONSTORE
2011-05-15 17:28:22 +02:00
5d64f21792
Fix for a possible bug related to ZINTER/UNIONSTORE called with the same source set more than one time.
2011-05-15 17:23:59 +02:00
cf7a138684
Explicitly zero zval since it is stored on the stack
2011-04-06 16:57:08 +02:00
edfd6ae76b
Test for ENCODING_SKIPLIST instead of ENCODING_RAW
2011-04-06 16:10:40 +02:00
8b2449dca0
Backport patch: signalModifiedKey (unstable) -> touchWatchedKey (2.2)
2011-03-22 16:12:26 +01:00
2e18193f5b
Remove sorted set when empty after ZREMRANGEBY*
2011-03-22 16:09:22 +01:00
4d8f13ddc3
Offset should be size_t
2011-03-22 16:09:21 +01:00
3e518093b6
Remove unused function
2011-03-22 16:09:21 +01:00
99cec798bb
Test for empty inner range when looking for elements in range
2011-03-22 16:09:21 +01:00
ccf96e197b
Make zzl API unaware of the robj where the ziplist is stored
2011-03-22 16:09:21 +01:00
8f0a41be98
Encode sorted set after loading from dump
2011-03-22 16:09:21 +01:00
63b29390b2
Convert encoding of result when in limits
2011-03-22 16:08:42 +01:00
46aa0e2472
Remove comment
2011-03-22 16:08:03 +01:00
07d9e35637
Generic iterator code for usage in ZUNIONSTORE/ZINTERSTORE
2011-03-22 16:08:03 +01:00
2e12082b3e
Make zzlLength take a ziplist argument
2011-03-22 16:08:03 +01:00
771ea6e1a6
Fix used function in ZCARD
2011-03-22 16:08:03 +01:00
c5802e3f4a
Convert encoding when thresholds overflow
2011-03-22 16:08:03 +01:00
a3886e29a6
Support dual encoding for more commands
2011-03-22 16:06:07 +01:00
db912c5a93
Support dual encoding for ZRANGEBYSCORE et al
2011-03-22 16:06:07 +01:00
2165ac5573
Helpers to move around in encoded sorted set
2011-03-22 16:06:07 +01:00
f8224a4f90
Support dual encoding for ZREMRANGEBYRANK
2011-03-22 16:06:07 +01:00
679de7ae2f
Support dual encoding for ZRANGE
2011-03-22 16:05:45 +01:00
0b8c9eac68
Look up and remove elements by range
2011-03-22 16:05:45 +01:00
4c36024f51
Typo
2011-03-22 16:05:05 +01:00
8e1db6a05f
Little less obfuscation
2011-03-22 16:05:05 +01:00
d3882605c0
Support dual encoding in ZREM
2011-03-22 16:05:05 +01:00
3d6eade781
Don't encode element argument when dealing with ziplist
2011-03-22 16:04:33 +01:00
6b017e615f
Initial work for ziplist backed sorted sets
2011-03-22 16:04:33 +01:00
5b40d6e656
Rename zset range functions
2011-03-22 16:03:22 +01:00
8c3b630561
Test for ranges where min > max
2011-03-22 16:03:22 +01:00
4484e3b591
Compiler should decide on inlining
2011-03-22 16:03:22 +01:00
453a906fc9
Move logic concerned with zset ranges
...
This also optimizes ZREVRANGEBYSCORE for pathological cases where a
sorted set contains many elements with the same score. Previously,
it would traverse the list from back to front in such a case.
2011-03-22 16:03:22 +01:00
3becef9ee6
Reverse commits changing sorted set code for 2.2
2011-01-17 11:15:50 +01:00
1b2b8cbbde
Compiler should decide on inlining
2011-01-13 16:06:03 +01:00
4769dc7826
Undo rename of function names where something went wrong
2010-12-09 10:37:35 +01:00