Regression tests for SETNX and MSETNX bugs added

This commit is contained in:
antirez
2009-12-06 01:16:12 +01:00
parent 906573e78d
commit 5acdc75d66
2 changed files with 15 additions and 1 deletions

View File

@ -2978,7 +2978,7 @@ static void echoCommand(redisClient *c) {
static void setGenericCommand(redisClient *c, int nx) {
int retval;
lookupKeyWrite(c->db,c->argv[1]);
deleteIfVolatile(c->db,c->argv[1]);
retval = dictAdd(c->db->dict,c->argv[1],c->argv[2]);
if (retval == DICT_ERR) {
if (!nx) {