X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/4b61ca460c5d043b9d199a4e4991bfac5dde66c5..f797c7dc176c833e6aa412c557d7fedd59dc1124:/src/db.c diff --git a/src/db.c b/src/db.c index fea2f12e..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;