Cluster branch merged to unstable.

This commit is contained in:
antirez
2011-03-29 17:51:15 +02:00
parent b46251d929
commit ecc9109434
11 changed files with 1727 additions and 9 deletions

View File

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