Commit 935eb4e
SINTER[STORE] requires keys to be sets
Starting with Redis 6.0.15 this behaviour changed.
The definition of SINTER[STORE] states:
"Keys that do not exist are considered to be empty sets."
At the same time SINTER only accepts set:
"intersection of all the given sets"
Both quotes from: https://redis.io/commands/sinter.
The behaviour of Redis 6.0.14 was that it ignored the type of later keys
if it found an empty set and returned that. Radis 6.0.15 changed this
behaviour to return a WRONGTYPE if it finds a non set key in the
arguments.
Example to reproduce:
127.0.0.1:6379> FLUSHALL
OK
127.0.0.1:6379> SINTER a b
(empty array)
127.0.0.1:6379> SET b something
OK
127.0.0.1:6379> SINTER a b
(error) WRONGTYPE Operation against a key holding the wrong kind of value
Cf. redis/redis#9273.1 parent 5df7d58 commit 935eb4e
1 file changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1902 | 1902 | | |
1903 | 1903 | | |
1904 | 1904 | | |
1905 | | - | |
1906 | | - | |
1907 | | - | |
| 1905 | + | |
1908 | 1906 | | |
1909 | 1907 | | |
1910 | 1908 | | |
1911 | | - | |
| 1909 | + | |
1912 | 1910 | | |
1913 | 1911 | | |
1914 | 1912 | | |
| |||
0 commit comments