summaryrefslogtreecommitdiff
path: root/src/db.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2011-05-05 18:10:02 +0200
committerantirez <antirez@gmail.com>2011-05-05 18:10:02 +0200
commita7b058dae612ad3ab31a2b2d6f07e5ff7fe06618 (patch)
tree8136e8d151e6362c8de07bea21c7c6d4a0a06146 /src/db.c
parent46834808fe31e7cbf08d6c9f7638a54c5c8bff8a (diff)
downloadredis-a7b058dae612ad3ab31a2b2d6f07e5ff7fe06618.tar.gz
Fixed semantics of CLUSTER SETSLOT, SELECT now only denied in cluster mode if selected DB is not 0 so that MIGRATE still works well.
Diffstat (limited to 'src/db.c')
-rw-r--r--src/db.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db.c b/src/db.c
index 670e2bce4..354f90456 100644
--- a/src/db.c
+++ b/src/db.c
@@ -317,7 +317,7 @@ void existsCommand(redisClient *c) {
void selectCommand(redisClient *c) {
int id = atoi(c->argv[1]->ptr);
- if (server.cluster_enabled) {
+ if (server.cluster_enabled && id != 0) {
addReplyError(c,"SELECT is not allowed in cluster mode");
return;
}