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 {
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;
int *keys = zmalloc(sizeof(int));
*numkeys = 1;
keys[0] = 1;
- return NULL;
+ return keys;
} else {
return getKeysUsingCommandTable(cmd,argv,argc,numkeys);
}
*numkeys = 0;
return NULL;
}
- keys = zmalloc(num);
+ keys = zmalloc(sizeof(int)*num);
for (i = 0; i < num; i++) keys[i] = 3+i;
*numkeys = num;
return keys;