Fixed semantics of CLUSTER SETSLOT, SELECT now only denied in cluster mode if selected DB is not 0 so that MIGRATE still works well.

This commit is contained in:
antirez
2011-05-05 18:10:02 +02:00
parent 46834808fe
commit a7b058dae6
2 changed files with 10 additions and 5 deletions

View File

@ -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;
}