]> git.saurik.com Git - redis.git/blobdiff - src/multi.c
Make sure an automatic rewrite only gets triggered when no other child is in execution.
[redis.git] / src / multi.c
index 59fc9d9e8b80f16c649704147af18dcb68f86049..ba3a0cd6caaa0cf96e7fdb883ee0f1ad902efdbb 100644 (file)
@@ -110,6 +110,10 @@ void execCommand(redisClient *c) {
         c->argc = c->mstate.commands[j].argc;
         c->argv = c->mstate.commands[j].argv;
         call(c,c->mstate.commands[j].cmd);
+
+        /* Commands may alter argc/argv, restore mstate. */
+        c->mstate.commands[j].argc = c->argc;
+        c->mstate.commands[j].argv = c->argv;
     }
     c->argv = orig_argv;
     c->argc = orig_argc;