LTRIM now returns +OK against non existing keys. More tests in test-redis.tcl

This commit is contained in:
antirez
2009-12-18 06:45:26 -05:00
parent c3a7dc32c9
commit ab9d4cb1e3
2 changed files with 29 additions and 3 deletions

View File

@ -3631,7 +3631,7 @@ static void ltrimCommand(redisClient *c) {
o = lookupKeyWrite(c->db,c->argv[1]);
if (o == NULL) {
addReply(c,shared.nokeyerr);
addReply(c,shared.ok);
} else {
if (o->type != REDIS_LIST) {
addReply(c,shared.wrongtypeerr);