* fix: ZINTERSTORE bug
When a shard only contains the dest key, it returned an empty map which causes the resulting intersection to be empty
* chore(vscode): Add gdb launch setting
* feat: Implement ZINTERCARD
Initial implementation without LIMIT
* feat: Implement limit for ZINTERCARD
* feat: Handle sets in ZINTER* commands
* Fix crash in ZPOPMIN
Crash was due to an attempt to access nullptr[-1], which is bad :)
* Add test to repro crash.
There's some leftover debugging statements, they're somewhat useful so I
kept them as the bug is not yet fixed.
* Copy patch by romange to solve the crash
Also re-enable (uncomment) the test in utility.py.
Signed-off-by: chakaz <chakaz@chakaz>
---------
Signed-off-by: chakaz <chakaz@chakaz>
Signed-off-by: Chaka <chakaz@users.noreply.github.com>
Co-authored-by: chakaz <chakaz@chakaz>
fix(zset): Make count optional for zpop{min,max}
The commands should allow count to be optional and
default to 1 as per the official redis command documentation.
Additionally update command flags to write + fast
Signed-off-by: Ali-Akber Saifee <ali@indydevs.org>
1. Before that we did no support a real syntax with <numkey> argument,
now we do.
2. Fix warnings.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
The old code relied on c strtod function that expected some sort of delimiter
at the end. Coincidently my unit-testing code always passed proper c strings so
strod worked as expected. EVAL passes slices to non-c string and this is why the bug was
discovered via eval call. Fixes#148.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
1. Fix#12 - return number of added items for non-increment usecase.
2. Fix#15 - fix double precision response. I use a different printing algorithm that of Redis
therefore there could be string differences between 2 systems. However, both replies should
be equivalent numerically.
3. Fix#13. Reject ZADD with LT and GT options together.
4. Fix#11 - return correct error when parsing invalid scores.