X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/6e1b9b58ec6ae895da686015d82d4f121f1bfb85..8c4c50906cc91d8dffbb22cb4a520d11a1c6344b:/src/db.c?ds=sidebyside diff --git a/src/db.c b/src/db.c index 7a9c9c4c..85a22062 100644 --- a/src/db.c +++ b/src/db.c @@ -307,6 +307,10 @@ void existsCommand(redisClient *c) { void selectCommand(redisClient *c) { int id = atoi(c->argv[1]->ptr); + if (server.cluster_enabled) { + addReplyError(c,"SELECT is not allowed in cluster mode"); + return; + } if (selectDb(c,id) == REDIS_ERR) { addReplyError(c,"invalid DB index"); } else { @@ -428,6 +432,11 @@ void moveCommand(redisClient *c) { redisDb *src, *dst; int srcid; + if (server.cluster_enabled) { + addReplyError(c,"MOVE is not allowed in cluster mode"); + return; + } + /* Obtain source and target DB pointers */ src = c->db; srcid = c->db->id; @@ -666,7 +675,7 @@ int *renameGetKeys(struct redisCommand *cmd,robj **argv, int argc, int *numkeys, int *keys = zmalloc(sizeof(int)); *numkeys = 1; keys[0] = 1; - return NULL; + return keys; } else { return getKeysUsingCommandTable(cmd,argv,argc,numkeys); }