Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
eos
QuarkDB
Commits
4c417d5a
Commit
4c417d5a
authored
Aug 03, 2018
by
Georgios Bitzes
Browse files
Prevent a crash when client issues EXEC without MULTI
parent
e5268c8c
Pipeline
#467605
canceled with stages
in 30 minutes and 44 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
4c417d5a
...
...
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
### Added
-
Command
`hclone`
for creating identical copies of entire hashes.
### Fixed
-
An
`EXEC`
when not inside a
`MULTI`
would cause a crash.
## 0.2.9 (2018-07-16)
### Added
-
Commands
`convert-string-to-int`
,
`convert-int-to-string`
to convert between
...
...
qclient
@
630fe4d1
Compare
1ad54a76
...
630fe4d1
Subproject commit
1ad54a7631b7a7e6db4c14fb4a33596b838724a6
Subproject commit
630fe4d17f673bfc476f10bbaf7b6ea82d0db0c3
src/Connection.cc
View file @
4c417d5a
...
...
@@ -244,6 +244,12 @@ LinkStatus Connection::processRequests(Dispatcher *dispatcher, const InFlightTra
continue
;
}
// EXEC without MULTI?
if
(
currentRequest
.
getCommand
()
==
RedisCommand
::
EXEC
&&
!
multiHandler
.
active
())
{
this
->
err
(
"EXEC without MULTI"
);
continue
;
}
if
(
currentRequest
.
getCommand
()
==
RedisCommand
::
TX_READWRITE
)
{
multiHandler
.
finalizePhantomTransaction
(
dispatcher
,
this
);
dispatcher
->
dispatch
(
this
,
currentRequest
);
...
...
test/multi.cc
View file @
4c417d5a
...
...
@@ -117,6 +117,11 @@ TEST_F(Multi, HandlerBasicSanity) {
ASSERT_REPLY
(
replies
[
1
],
"QUEUED"
);
ASSERT_REPLY
(
replies
[
2
],
"OK"
);
ASSERT_REPLY
(
replies
[
3
],
"v1"
);
// EXEC without MULTI
replies
.
clear
();
ASSERT_REPLY
(
tunnel
(
leaderID
)
->
exec
(
"EXEC"
),
"ERR EXEC without MULTI"
);
ASSERT_REPLY
(
tunnel
(
leaderID
)
->
exec
(
"HGET"
,
"myhash"
,
"f1"
),
"v1"
);
}
TEST_F
(
Multi
,
WithRaft
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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