mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
bugfix: replace lastcmd with cmd when rewrite BRPOPLPUSH as RPOPLPUSH
There are two problems if we use lastcmd: 1. BRPOPLPUSH cannot be rewrited as RPOPLPUSH in multi/exec In mulit/exec context, the lastcmd is exec. 2. Redis will crash when execute RPOPLPUSH loading from AOF In fakeClient, the lastcmd is NULL.
This commit is contained in:
parent
0d6f11f4d1
commit
fc9b4e7958
@ -596,7 +596,7 @@ void rpoplpushCommand(client *c) {
|
||||
signalModifiedKey(c->db,touchedkey);
|
||||
decrRefCount(touchedkey);
|
||||
server.dirty++;
|
||||
if (c->lastcmd->proc == brpoplpushCommand) {
|
||||
if (c->cmd->proc == brpoplpushCommand) {
|
||||
rewriteClientCommandVector(c,3,shared.rpoplpush,c->argv[1],c->argv[2]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user