Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
254f06c1
Unverified
Commit
254f06c1
authored
Jun 08, 2020
by
Salvatore Sanfilippo
Committed by
GitHub
Jun 08, 2020
Browse files
Merge pull request #7370 from oranagra/no_queue_in_aborted_multi
Don't queue commands in an already aborted MULTI state
parents
8183a4ca
2bb297b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/multi.c
View file @
254f06c1
...
@@ -58,6 +58,13 @@ void queueMultiCommand(client *c) {
...
@@ -58,6 +58,13 @@ void queueMultiCommand(client *c) {
multiCmd
*
mc
;
multiCmd
*
mc
;
int
j
;
int
j
;
/* No sense to waste memory if the transaction is already aborted.
* this is useful in case client sends these in a pipeline, or doesn't
* bother to read previous responses and didn't notice the multi was already
* aborted. */
if
(
c
->
flags
&
CLIENT_DIRTY_EXEC
)
return
;
c
->
mstate
.
commands
=
zrealloc
(
c
->
mstate
.
commands
,
c
->
mstate
.
commands
=
zrealloc
(
c
->
mstate
.
commands
,
sizeof
(
multiCmd
)
*
(
c
->
mstate
.
count
+
1
));
sizeof
(
multiCmd
)
*
(
c
->
mstate
.
count
+
1
));
mc
=
c
->
mstate
.
commands
+
c
->
mstate
.
count
;
mc
=
c
->
mstate
.
commands
+
c
->
mstate
.
count
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment